mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
71
Commits
@@ -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: v2-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
|
||||
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
|
||||
@@ -63,7 +63,7 @@ runs:
|
||||
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
|
||||
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
|
||||
|
||||
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
||||
cmake -S hermes -B build_release -G 'Visual Studio 17 2022' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
||||
if (-not $?) { throw "Failed to configure Hermes" }
|
||||
echo "Running windows build..."
|
||||
cd build_release
|
||||
@@ -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\
|
||||
|
||||
@@ -24,6 +24,6 @@ jobs:
|
||||
with:
|
||||
script: |
|
||||
const {createDraftRelease} = require('./.github/workflow-scripts/createDraftRelease.js');
|
||||
const version = ${{ github.ref_name }}';
|
||||
const version = '${{ github.ref_name }}';
|
||||
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
|
||||
await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}');
|
||||
|
||||
@@ -120,12 +120,12 @@ jobs:
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermesc_windows:
|
||||
runs-on: windows-2019
|
||||
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'
|
||||
|
||||
@@ -116,12 +116,12 @@ jobs:
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermesc_windows:
|
||||
runs-on: windows-2019
|
||||
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'
|
||||
@@ -134,27 +134,6 @@ jobs:
|
||||
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_android:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs: [set_release_type]
|
||||
container:
|
||||
image: reactnativecommunity/react-native-android:latest
|
||||
env:
|
||||
TERM: "dumb"
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
||||
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build Android
|
||||
uses: ./.github/actions/build-android
|
||||
with:
|
||||
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
|
||||
|
||||
build_npm_package:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs:
|
||||
@@ -164,7 +143,6 @@ jobs:
|
||||
build_hermes_macos,
|
||||
build_hermesc_linux,
|
||||
build_hermesc_windows,
|
||||
build_android,
|
||||
prebuild_apple_dependencies,
|
||||
]
|
||||
container:
|
||||
|
||||
@@ -424,12 +424,12 @@ jobs:
|
||||
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
build_hermesc_windows:
|
||||
runs-on: windows-2019
|
||||
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'
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
## Summary:
|
||||
This change fixes the script that updates the RN Version to also update the Codegen snapshots so that they are in sync with the current version of React Native.
|
||||
It also updates the Snapshot as it was failing in rc.0
|
||||
|
||||
## Changelog:
|
||||
[Internal] - Fixed script that updates the react native versions
|
||||
|
||||
## Test Plan:
|
||||
Tested locally by running `node ./scripts/releases/set-rn-artifacts-version --built-type release --to-version 0.80.0-rc.0` and verifying that the snapshot file was getting updated. I then run the `yarn test
|
||||
generate-artifacts-executor-test.js` command to verify that the tests were passing.
|
||||
@@ -55,6 +55,8 @@ nexusPublishing {
|
||||
sonatype {
|
||||
username.set(sonatypeUsername)
|
||||
password.set(sonatypePassword)
|
||||
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
|
||||
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+3
-5
@@ -30,8 +30,7 @@
|
||||
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
|
||||
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
|
||||
"test-ios": "./scripts/objc-test.sh test",
|
||||
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
|
||||
"test-typescript": "dtslint packages/react-native/types",
|
||||
"test-typescript": "tsc -p packages/react-native/types/tsconfig.test.json",
|
||||
"test": "jest",
|
||||
"fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js",
|
||||
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
|
||||
@@ -50,10 +49,9 @@
|
||||
"@babel/plugin-transform-regenerator": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.7.0",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"@react-native/metro-config": "0.80.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.80.2",
|
||||
"@react-native/metro-config": "0.80.2",
|
||||
"@tsconfig/node18": "1.0.1",
|
||||
"@types/react": "^19.0.0",
|
||||
"@typescript-eslint/parser": "^7.1.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/assets-registry",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Asset support code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-plugin-codegen",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Babel plugin to generate native module and view manager code for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,7 +26,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/traverse": "^7.25.3",
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
"@react-native/codegen": "0.80.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/community-cli-plugin",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Core CLI commands for React Native",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@@ -22,7 +22,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/dev-middleware": "0.80.0-main",
|
||||
"@react-native/dev-middleware": "0.80.2",
|
||||
"chalk": "^4.0.0",
|
||||
"debug": "^4.4.0",
|
||||
"invariant": "^2.2.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/core-cli-utils",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "React Native CLI library for Frameworks to build on",
|
||||
"license": "MIT",
|
||||
"main": "./src/index.flow.js",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@generated SignedSource<<c5f3f1de013841faf72c0a6052f5dc08>>
|
||||
Git revision: bc635fa428baf08a0667f89e3ee03f92c2f96416
|
||||
@generated SignedSource<<5409495e2dce8fc29e2085031ea1d9f7>>
|
||||
Git revision: 343405ba784fca9290486cbce57e7f2ca953dc14
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
Remote branch: main
|
||||
Remote branch: 0.80-stable
|
||||
GN build args (overrides only):
|
||||
is_official_build = true
|
||||
Git status in checkout:
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+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
+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
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+31
-24
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import*as e from"../../core/common/common.js";import"../../core/root/root.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";const n={performance:"Performance",showPerformance:"Show Performance",record:"Record",stop:"Stop",recordAndReload:"Record and reload",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view"},o=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",n),a=i.i18n.getLazilyComputedLocalizedString.bind(void 0,o);let r;async function l(){return r||(r=await import("./timeline.js")),r}function c(e){return void 0===r?[]:e(r)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:a(n.performance),commandPrompt:a(n.showPerformance),order:50,experiment:"enable-performance-panel",loadView:async()=>(await l()).TimelinePanel.TimelinePanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:"PERFORMANCE",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),options:[{value:!0,title:a(n.record)},{value:!1,title:a(n.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),category:"PERFORMANCE",title:a(n.recordAndReload),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}],experiment:"!react-native-specific-ui"}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.save-to-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.load-from-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:"PERFORMANCE",title:a(n.previousFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:"PERFORMANCE",title:a(n.nextFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),category:"PERFORMANCE",title:a(n.showRecentTimelineSessions),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.previousRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.nextRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),e.Settings.registerSettingExtension({category:"PERFORMANCE",storageType:"Synced",title:a(n.hideChromeFrameInLayersView),settingName:"frame-viewer-hide-chrome-window",settingType:"boolean",defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>c((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await l()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.save-to-file",order:15});
|
||||
import*as e from"../../core/common/common.js";import"../../core/root/root.js";import*as i from"../../core/i18n/i18n.js";import*as t from"../../ui/legacy/legacy.js";const n={performance:"Performance",showPerformance:"Show Performance",record:"Record",stop:"Stop",recordAndReload:"Record and reload",saveProfile:"Save profile…",loadProfile:"Load profile…",previousFrame:"Previous frame",nextFrame:"Next frame",showRecentTimelineSessions:"Show recent timeline sessions",previousRecording:"Previous recording",nextRecording:"Next recording",hideChromeFrameInLayersView:"Hide `chrome` frame in Layers view"},o=i.i18n.registerUIStrings("panels/timeline/timeline-meta.ts",n),a=i.i18n.getLazilyComputedLocalizedString.bind(void 0,o);let r;async function l(){return r||(r=await import("./timeline.js")),r}function c(e){return void 0===r?[]:e(r)}t.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:a(n.performance),commandPrompt:a(n.showPerformance),order:50,experiment:!0===globalThis.FB_ONLY__enablePerformance?void 0:"enable-performance-panel",loadView:async()=>(await l()).TimelinePanel.TimelinePanel.instance()}),t.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:"PERFORMANCE",iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),options:[{value:!0,title:a(n.record)},{value:!1,title:a(n.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),category:"PERFORMANCE",title:a(n.recordAndReload),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}],experiment:"!react-native-specific-ui"}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.save-to-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.saveProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+S"},{platform:"mac",shortcut:"Meta+S"}]}),t.ActionRegistration.registerActionExtension({category:"PERFORMANCE",actionId:"timeline.load-from-file",contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.loadProfile),bindings:[{platform:"windows,linux",shortcut:"Ctrl+O"},{platform:"mac",shortcut:"Meta+O"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-previous-frame",category:"PERFORMANCE",title:a(n.previousFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"["}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.jump-to-next-frame",category:"PERFORMANCE",title:a(n.nextFrame),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),bindings:[{shortcut:"]"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),category:"PERFORMANCE",title:a(n.showRecentTimelineSessions),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.previous-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.previousRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Left"},{platform:"mac",shortcut:"Meta+Left"}]}),t.ActionRegistration.registerActionExtension({actionId:"timeline.next-recording",category:"PERFORMANCE",loadActionDelegate:async()=>new((await l()).TimelinePanel.ActionDelegate),title:a(n.nextRecording),contextTypes:()=>c((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Alt+Right"},{platform:"mac",shortcut:"Meta+Right"}]}),e.Settings.registerSettingExtension({category:"PERFORMANCE",storageType:"Synced",title:a(n.hideChromeFrameInLayersView),settingName:"frame-viewer-hide-chrome-window",settingType:"boolean",defaultValue:!1}),e.Linkifier.registerLinkifier({contextTypes:()=>c((e=>[e.CLSLinkifier.CLSRect])),loadLinkifier:async()=>(await l()).CLSLinkifier.Linkifier.instance()}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.load-from-file",order:10}),t.ContextMenu.registerItem({location:"timelineMenu/open",actionId:"timeline.save-to-file",order:15});
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/debugger-frontend",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Debugger frontend for React Native based on Chrome DevTools",
|
||||
"keywords": [
|
||||
"react-native",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/dev-middleware",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"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.80.0-main",
|
||||
"@react-native/debugger-frontend": "0.80.2",
|
||||
"chrome-launcher": "^0.15.2",
|
||||
"chromium-edge-launcher": "^0.2.0",
|
||||
"connect": "^3.6.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-config",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "ESLint config for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -22,7 +22,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/eslint-parser": "^7.25.1",
|
||||
"@react-native/eslint-plugin": "0.80.0-main",
|
||||
"@react-native/eslint-plugin": "0.80.2",
|
||||
"@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.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "ESLint rules for @react-native/eslint-config",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/eslint-plugin-specs",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"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.80.0-main",
|
||||
"@react-native/codegen": "0.80.2",
|
||||
"make-dir": "^2.1.0",
|
||||
"pirates": "^4.0.1",
|
||||
"source-map-support": "0.5.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/gradle-plugin",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Gradle Plugin for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
+28
-1
@@ -8,12 +8,14 @@
|
||||
package com.facebook.react.utils
|
||||
|
||||
import com.facebook.react.utils.PropertyUtils.DEFAULT_INTERNAL_PUBLISHING_GROUP
|
||||
import com.facebook.react.utils.PropertyUtils.EXCLUSIVE_ENTEPRISE_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY_DEFAULT
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_PUBLISHING_GROUP
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_USE_HERMES_NIGHTLY
|
||||
import com.facebook.react.utils.PropertyUtils.INTERNAL_VERSION_NAME
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY
|
||||
import com.facebook.react.utils.PropertyUtils.SCOPED_INCLUDE_JITPACK_REPOSITORY
|
||||
import java.io.File
|
||||
import java.net.URI
|
||||
@@ -28,6 +30,12 @@ internal object DependencyUtils {
|
||||
* party libraries which are auto-linked.
|
||||
*/
|
||||
fun configureRepositories(project: Project) {
|
||||
val exclusiveEnterpriseRepository = project.rootProject.exclusiveEnterpriseRepository()
|
||||
if (exclusiveEnterpriseRepository != null) {
|
||||
project.logger.lifecycle(
|
||||
"Replacing ALL Maven Repositories with: $exclusiveEnterpriseRepository")
|
||||
}
|
||||
|
||||
project.rootProject.allprojects { eachProject ->
|
||||
with(eachProject) {
|
||||
if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) {
|
||||
@@ -36,8 +44,18 @@ internal object DependencyUtils {
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
}
|
||||
}
|
||||
|
||||
if (exclusiveEnterpriseRepository != null) {
|
||||
// We remove all previously set repositories and only configure the proxy provided by the
|
||||
// user.
|
||||
rootProject.repositories.clear()
|
||||
mavenRepoFromUrl(exclusiveEnterpriseRepository)
|
||||
// We return here as we don't want to configure other repositories as well.
|
||||
return@allprojects
|
||||
}
|
||||
|
||||
// We add the snapshot for users on nightlies.
|
||||
mavenRepoFromUrl("https://oss.sonatype.org/content/repositories/snapshots/") { repo ->
|
||||
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
|
||||
repo.content { it.excludeGroup("org.webkit") }
|
||||
}
|
||||
repositories.mavenCentral { repo ->
|
||||
@@ -181,4 +199,13 @@ internal object DependencyUtils {
|
||||
property(INCLUDE_JITPACK_REPOSITORY).toString().toBoolean()
|
||||
else -> INCLUDE_JITPACK_REPOSITORY_DEFAULT
|
||||
}
|
||||
|
||||
internal fun Project.exclusiveEnterpriseRepository() =
|
||||
when {
|
||||
hasProperty(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|
||||
property(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
|
||||
hasProperty(EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
|
||||
property(EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -30,6 +30,12 @@ object PropertyUtils {
|
||||
const val INCLUDE_JITPACK_REPOSITORY = "includeJitpackRepository"
|
||||
const val SCOPED_INCLUDE_JITPACK_REPOSITORY = "react.includeJitpackRepository"
|
||||
|
||||
/**
|
||||
* Public property that allows to configure an enterprise repository proxy as exclusive repository
|
||||
*/
|
||||
const val EXCLUSIVE_ENTEPRISE_REPOSITORY = "exclusiveEnterpriseRepository"
|
||||
const val SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY = "react.exclusiveEnterpriseRepository"
|
||||
|
||||
/** By default we include JitPack to avoid breaking user builds */
|
||||
internal const val INCLUDE_JITPACK_REPOSITORY_DEFAULT = true
|
||||
|
||||
|
||||
+46
-3
@@ -10,6 +10,7 @@ package com.facebook.react.utils
|
||||
import com.facebook.react.tests.createProject
|
||||
import com.facebook.react.utils.DependencyUtils.configureDependencies
|
||||
import com.facebook.react.utils.DependencyUtils.configureRepositories
|
||||
import com.facebook.react.utils.DependencyUtils.exclusiveEnterpriseRepository
|
||||
import com.facebook.react.utils.DependencyUtils.getDependencySubstitutions
|
||||
import com.facebook.react.utils.DependencyUtils.mavenRepoFromURI
|
||||
import com.facebook.react.utils.DependencyUtils.mavenRepoFromUrl
|
||||
@@ -45,7 +46,7 @@ class DependencyUtilsTest {
|
||||
|
||||
@Test
|
||||
fun configureRepositories_containsSnapshotRepo() {
|
||||
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
|
||||
val project = createProject()
|
||||
|
||||
configureRepositories(project)
|
||||
@@ -99,6 +100,24 @@ class DependencyUtilsTest {
|
||||
.isNotNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun configureRepositories_withExclusiveEnterpriseRepository_replacesAllRepositories() {
|
||||
val repositoryURI = URI.create("https://maven.myfabolousorganization.it")
|
||||
|
||||
val project = createProject()
|
||||
project.rootProject.extensions.extraProperties.set(
|
||||
"exclusiveEnterpriseRepository", repositoryURI.toString())
|
||||
|
||||
configureRepositories(project)
|
||||
|
||||
assertThat(project.repositories).hasSize(1)
|
||||
assertThat(
|
||||
project.repositories.firstOrNull {
|
||||
it is MavenArtifactRepository && it.url == repositoryURI
|
||||
})
|
||||
.isNotNull()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun configureRepositories_withIncludeJitpackRepositoryFalse_doesNotContainJitPack() {
|
||||
val repositoryURI = URI.create("https://www.jitpack.io")
|
||||
@@ -176,7 +195,7 @@ class DependencyUtilsTest {
|
||||
|
||||
@Test
|
||||
fun configureRepositories_snapshotRepoHasHigherPriorityThanMavenCentral() {
|
||||
val repositoryURI = URI.create("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
val repositoryURI = URI.create("https://central.sonatype.com/repository/maven-snapshots/")
|
||||
val mavenCentralURI = URI.create("https://repo.maven.apache.org/maven2/")
|
||||
val project = createProject()
|
||||
|
||||
@@ -470,7 +489,7 @@ class DependencyUtilsTest {
|
||||
@Test
|
||||
fun shouldAddJitPack_withUnscopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set("react.includeJitpackRepository", "false")
|
||||
project.extensions.extraProperties.set("includeJitpackRepository", "false")
|
||||
assertThat(project.shouldAddJitPack()).isFalse()
|
||||
}
|
||||
|
||||
@@ -479,4 +498,28 @@ class DependencyUtilsTest {
|
||||
val project = createProject(tempFolder.root)
|
||||
assertThat(project.shouldAddJitPack()).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_withScopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set(
|
||||
"react.exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
|
||||
assertThat(project.exclusiveEnterpriseRepository())
|
||||
.isEqualTo("https://maven.myfabolousorganization.it")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_withUnscopedProperty() {
|
||||
val project = createProject(tempFolder.root)
|
||||
project.extensions.extraProperties.set(
|
||||
"exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
|
||||
assertThat(project.exclusiveEnterpriseRepository())
|
||||
.isEqualTo("https://maven.myfabolousorganization.it")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun exclusiveEnterpriseRepository_defaultIsTrue() {
|
||||
val project = createProject(tempFolder.root)
|
||||
assertThat(project.exclusiveEnterpriseRepository()).isNull()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "helloworld",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"bootstrap": "node ./cli.js bootstrap",
|
||||
@@ -13,16 +13,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "19.1.0",
|
||||
"react-native": "1000.0.0"
|
||||
"react-native": "0.80.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/runtime": "^7.25.0",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"@react-native/core-cli-utils": "0.80.0-main",
|
||||
"@react-native/eslint-config": "0.80.0-main",
|
||||
"@react-native/metro-config": "0.80.0-main",
|
||||
"@react-native/babel-preset": "0.80.2",
|
||||
"@react-native/core-cli-utils": "0.80.2",
|
||||
"@react-native/eslint-config": "0.80.2",
|
||||
"@react-native/metro-config": "0.80.2",
|
||||
"chalk": "^4.1.2",
|
||||
"commander": "^12.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-config",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Metro configuration for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -26,8 +26,8 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/js-polyfills": "0.80.0-main",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"@react-native/js-polyfills": "0.80.2",
|
||||
"@react-native/metro-babel-transformer": "0.80.2",
|
||||
"metro-config": "^0.82.2",
|
||||
"metro-runtime": "^0.82.2"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/new-app-screen",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "NewAppScreen component for React Native",
|
||||
"keywords": [
|
||||
"react-native"
|
||||
|
||||
@@ -51,7 +51,7 @@ const Links: Array<{
|
||||
{
|
||||
title: 'Networking',
|
||||
description: 'Use the Fetch API',
|
||||
url: 'https://reactnative.dev/docs/navigation',
|
||||
url: 'https://reactnative.dev/docs/network',
|
||||
},
|
||||
{
|
||||
title: 'Showcase',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/normalize-colors",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Color normalization for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/js-polyfills",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Polyfills for React Native.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/babel-preset",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Babel preset for React Native applications",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -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.80.0-main",
|
||||
"@react-native/babel-plugin-codegen": "0.80.2",
|
||||
"babel-plugin-syntax-hermes-parser": "0.28.1",
|
||||
"babel-plugin-transform-flow-enums": "^0.0.2",
|
||||
"react-refresh": "^0.14.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/metro-babel-transformer",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Babel transformer for React Native applications.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -27,7 +27,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"@react-native/babel-preset": "0.80.2",
|
||||
"hermes-parser": "0.28.1",
|
||||
"nullthrows": "^1.1.1"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/bots",
|
||||
"description": "React Native Bots",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen-typescript-test",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"private": true,
|
||||
"description": "TypeScript related unit test for @react-native/codegen",
|
||||
"license": "MIT",
|
||||
@@ -19,7 +19,7 @@
|
||||
"prepare": "yarn run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
"@react-native/codegen": "0.80.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/codegen",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Code generation tools for React Native",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/compatibility-check",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -29,7 +29,7 @@
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
"@react-native/codegen": "0.80.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"flow-remove-types": "^2.237.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@react-native/fantom",
|
||||
"private": true,
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"main": "src/index.js",
|
||||
"description": "Internal integration testing and benchmarking tool for React Native",
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/popup-menu-android",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"description": "PopupMenu for the Android platform",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@react-native/codegen": "0.80.0-main"
|
||||
"@react-native/codegen": "0.80.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@react-native/oss-library-example",
|
||||
"version": "0.80.0-main",
|
||||
"version": "0.80.2",
|
||||
"private": true,
|
||||
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
|
||||
"license": "MIT",
|
||||
@@ -26,8 +26,8 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@react-native/babel-preset": "0.80.0-main",
|
||||
"react-native": "1000.0.0"
|
||||
"@react-native/babel-preset": "0.80.2",
|
||||
"react-native": "0.80.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "*",
|
||||
|
||||
@@ -25,7 +25,7 @@ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
|
||||
: AnimatedImplementation;
|
||||
|
||||
export default {
|
||||
get FlatList(): AnimatedFlatList {
|
||||
get FlatList(): AnimatedFlatList<any> {
|
||||
return require('./components/AnimatedFlatList').default;
|
||||
},
|
||||
get Image(): AnimatedImage {
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
get ScrollView(): AnimatedScrollView {
|
||||
return require('./components/AnimatedScrollView').default;
|
||||
},
|
||||
get SectionList(): AnimatedSectionList {
|
||||
get SectionList(): AnimatedSectionList<any, any> {
|
||||
return require('./components/AnimatedSectionList').default;
|
||||
},
|
||||
get Text(): AnimatedText {
|
||||
|
||||
@@ -37,7 +37,7 @@ export type {default as AnimatedDivision} from './nodes/AnimatedDivision';
|
||||
export type {default as AnimatedModulo} from './nodes/AnimatedModulo';
|
||||
export type {default as AnimatedMultiplication} from './nodes/AnimatedMultiplication';
|
||||
export type {default as AnimatedSubtraction} from './nodes/AnimatedSubtraction';
|
||||
export type {WithAnimatedValue} from './createAnimatedComponent';
|
||||
export type {WithAnimatedValue, AnimatedProps} from './createAnimatedComponent';
|
||||
export type {AnimatedComponentType as AnimatedComponent} from './createAnimatedComponent';
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,13 +8,14 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {AnimatedComponentType} from '../createAnimatedComponent';
|
||||
import type {AnimatedProps} from '../createAnimatedComponent';
|
||||
|
||||
import FlatList from '../../Lists/FlatList';
|
||||
import FlatList, {type FlatListProps} from '../../Lists/FlatList';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent(FlatList): AnimatedComponentType<
|
||||
React.ElementConfig<typeof FlatList>,
|
||||
FlatList<mixed>,
|
||||
>);
|
||||
// $FlowExpectedError[unclear-type]
|
||||
export default (createAnimatedComponent(FlatList): component<ItemT = any>(
|
||||
ref?: React.RefSetter<FlatList<ItemT>>,
|
||||
...props: AnimatedProps<FlatListProps<ItemT>>
|
||||
));
|
||||
|
||||
+11
-7
@@ -8,15 +8,19 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {SectionBase} from '../../Lists/SectionList';
|
||||
import type {AnimatedComponentType} from '../createAnimatedComponent';
|
||||
import type {AnimatedProps} from '../createAnimatedComponent';
|
||||
|
||||
import SectionList from '../../Lists/SectionList';
|
||||
import SectionList, {type SectionListProps} from '../../Lists/SectionList';
|
||||
import createAnimatedComponent from '../createAnimatedComponent';
|
||||
import * as React from 'react';
|
||||
|
||||
export default (createAnimatedComponent(SectionList): AnimatedComponentType<
|
||||
React.ElementConfig<typeof SectionList>,
|
||||
// $FlowFixMe
|
||||
export default (createAnimatedComponent(SectionList): component<
|
||||
// $FlowExpectedError[unclear-type]
|
||||
SectionList<any, SectionBase<any>>,
|
||||
>);
|
||||
ItemT = any,
|
||||
// $FlowExpectedError[unclear-type]
|
||||
SectionT = any,
|
||||
>(
|
||||
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
|
||||
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
|
||||
));
|
||||
|
||||
@@ -22,7 +22,7 @@ import invariant from 'invariant';
|
||||
|
||||
export type AnimatedPropsAllowlist = $ReadOnly<{
|
||||
style?: ?AnimatedStyleAllowlist,
|
||||
[string]: true,
|
||||
[key: string]: true | AnimatedStyleAllowlist,
|
||||
}>;
|
||||
|
||||
type TargetView = {
|
||||
|
||||
+6
-1
@@ -22,7 +22,12 @@ import NativeAppState from './NativeAppState';
|
||||
* - @platform android - on another Activity (even if it was launched by your app)
|
||||
* @platform ios - inactive - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
|
||||
*/
|
||||
export type AppStateStatus = 'inactive' | 'background' | 'active';
|
||||
export type AppStateStatus =
|
||||
| 'inactive'
|
||||
| 'background'
|
||||
| 'active'
|
||||
| 'extension'
|
||||
| 'unknown';
|
||||
|
||||
/**
|
||||
* change - This even is received when the app state has changed.
|
||||
|
||||
+1
@@ -110,6 +110,7 @@ const ActivityIndicator = (
|
||||
style={StyleSheet.compose(styles.container, style)}>
|
||||
{Platform.OS === 'android' ? (
|
||||
// $FlowFixMe[prop-missing] Flow doesn't know when this is the android component
|
||||
// $FlowFixMe[incompatible-type]
|
||||
<PlatformActivityIndicator {...nativeProps} {...androidProps} />
|
||||
) : (
|
||||
/* $FlowFixMe[incompatible-type] (>=0.106.0 site=react_native_android_fb) This comment
|
||||
|
||||
+13
-1
@@ -17,11 +17,23 @@ import Platform from '../../Utilities/Platform';
|
||||
|
||||
export type {ProgressBarAndroidProps};
|
||||
|
||||
// A utility type to preserve the semantics of the union uses in the definition
|
||||
// of ProgressBarAndroidProps. TS's Omit does not distribute over unions, so
|
||||
// we define our own version which does. This does not affect Flow.
|
||||
// $FlowExpectedError[unclear-type]
|
||||
type Omit<T, K> = T extends any ? Pick<T, Exclude<$Keys<T>, K>> : T;
|
||||
|
||||
/**
|
||||
* ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
|
||||
* It can now be installed and imported from `@react-native-community/progress-bar-android` instead of 'react-native'.
|
||||
* @see https://github.com/react-native-community/progress-bar-android
|
||||
* @deprecated
|
||||
*/
|
||||
let ProgressBarAndroid: component(
|
||||
ref?: React.RefSetter<
|
||||
React.ElementRef<ProgressBarAndroidNativeComponentType>,
|
||||
>,
|
||||
...props: ProgressBarAndroidProps
|
||||
...props: Omit<ProgressBarAndroidProps, empty>
|
||||
);
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
|
||||
+29
-20
@@ -17,28 +17,25 @@ import type {ViewProps} from '../View/ViewPropTypes';
|
||||
* `indeterminate` can only be false if `styleAttr` is Horizontal, and requires a
|
||||
* `progress` value.
|
||||
*/
|
||||
type ProgressBarAndroidStyleAttrProp =
|
||||
| {
|
||||
styleAttr: 'Horizontal',
|
||||
indeterminate: false,
|
||||
progress: number,
|
||||
}
|
||||
| {
|
||||
styleAttr:
|
||||
| 'Horizontal'
|
||||
| 'Normal'
|
||||
| 'Small'
|
||||
| 'Large'
|
||||
| 'Inverse'
|
||||
| 'SmallInverse'
|
||||
| 'LargeInverse',
|
||||
indeterminate: true,
|
||||
};
|
||||
type DeterminateProgressBarAndroidStyleAttrProp = {
|
||||
styleAttr: 'Horizontal',
|
||||
indeterminate: false,
|
||||
progress: number,
|
||||
};
|
||||
|
||||
export type ProgressBarAndroidProps = $ReadOnly<{
|
||||
...ViewProps,
|
||||
...ProgressBarAndroidStyleAttrProp,
|
||||
type IndeterminateProgressBarAndroidStyleAttrProp = {
|
||||
styleAttr:
|
||||
| 'Horizontal'
|
||||
| 'Normal'
|
||||
| 'Small'
|
||||
| 'Large'
|
||||
| 'Inverse'
|
||||
| 'SmallInverse'
|
||||
| 'LargeInverse',
|
||||
indeterminate: true,
|
||||
};
|
||||
|
||||
type ProgressBarAndroidBaseProps = $ReadOnly<{
|
||||
/**
|
||||
* Whether to show the ProgressBar (true, the default) or hide it (false).
|
||||
*/
|
||||
@@ -52,3 +49,15 @@ export type ProgressBarAndroidProps = $ReadOnly<{
|
||||
*/
|
||||
testID?: ?string,
|
||||
}>;
|
||||
|
||||
export type ProgressBarAndroidProps =
|
||||
| $ReadOnly<{
|
||||
...ViewProps,
|
||||
...ProgressBarAndroidBaseProps,
|
||||
...DeterminateProgressBarAndroidStyleAttrProp,
|
||||
}>
|
||||
| $ReadOnly<{
|
||||
...ViewProps,
|
||||
...ProgressBarAndroidBaseProps,
|
||||
...IndeterminateProgressBarAndroidStyleAttrProp,
|
||||
}>;
|
||||
|
||||
@@ -14,8 +14,8 @@ export const version: $ReadOnly<{
|
||||
patch: number,
|
||||
prerelease: string | null,
|
||||
}> = {
|
||||
major: 1000,
|
||||
minor: 0,
|
||||
patch: 0,
|
||||
major: 0,
|
||||
minor: 80,
|
||||
patch: 2,
|
||||
prerelease: null,
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ export default class NativeEventEmitter<
|
||||
{
|
||||
_nativeModule: ?NativeModule;
|
||||
|
||||
constructor(nativeModule: ?NativeModule) {
|
||||
constructor(nativeModule?: ?NativeModule) {
|
||||
if (Platform.OS === 'ios') {
|
||||
invariant(
|
||||
nativeModule != null,
|
||||
|
||||
@@ -18,10 +18,23 @@ export type ResolvedAssetSource = {
|
||||
+scale: number,
|
||||
};
|
||||
|
||||
import type {
|
||||
AssetDestPathResolver,
|
||||
PackagerAsset,
|
||||
} from '@react-native/assets-registry/registry';
|
||||
// From @react-native/assets-registry
|
||||
type AssetDestPathResolver = 'android' | 'generic';
|
||||
|
||||
// From @react-native/assets-registry
|
||||
type PackagerAsset = $ReadOnly<{
|
||||
__packager_asset: boolean,
|
||||
fileSystemLocation: string,
|
||||
httpServerLocation: string,
|
||||
width: ?number,
|
||||
height: ?number,
|
||||
scales: Array<number>,
|
||||
hash: string,
|
||||
name: string,
|
||||
type: string,
|
||||
resolver?: AssetDestPathResolver,
|
||||
...
|
||||
}>;
|
||||
|
||||
const PixelRatio = require('../Utilities/PixelRatio').default;
|
||||
const Platform = require('../Utilities/Platform').default;
|
||||
|
||||
@@ -107,4 +107,6 @@ declare export const setStyleAttributePreprocessor: (
|
||||
* An identity function for creating style sheets.
|
||||
*/
|
||||
// $FlowFixMe[unsupported-variance-annotation]
|
||||
declare export const create: <+S: ____Styles_Internal>(obj: S) => $ReadOnly<S>;
|
||||
declare export const create: <+S: ____Styles_Internal>(
|
||||
obj: S & ____Styles_Internal,
|
||||
) => $ReadOnly<S>;
|
||||
|
||||
@@ -21,6 +21,7 @@ import type {
|
||||
____ViewStyle_InternalOverrides,
|
||||
} from './private/_StyleSheetTypesOverrides';
|
||||
import type {____TransformStyle_Internal} from './private/_TransformStyle';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
|
||||
export type {____TransformStyle_Internal};
|
||||
|
||||
@@ -1001,7 +1002,8 @@ export type ____ImageStyle_InternalCore = $ReadOnly<{
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
overlayColor?: ColorValue,
|
||||
overflow?: 'visible' | 'hidden',
|
||||
}>;
|
||||
|
||||
export type ____ImageStyle_Internal = $ReadOnly<{
|
||||
@@ -1014,7 +1016,7 @@ export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
overlayColor?: ColorValue,
|
||||
}>;
|
||||
|
||||
export type ____DangerouslyImpreciseStyle_Internal = $ReadOnly<{
|
||||
|
||||
@@ -10,6 +10,25 @@
|
||||
|
||||
import type AnimatedNode from '../../Animated/nodes/AnimatedNode';
|
||||
|
||||
// Helper types to enforce that a single key is used in a transform object
|
||||
// after generating a TypeScript definition file from the Flow types.
|
||||
// $FlowExpectedError[unclear-type]
|
||||
type KeysOfUnion<T> = T extends any ? $Keys<T> : empty;
|
||||
// $FlowExpectedError[unclear-type]
|
||||
type ValueOfUnion<T, K> = T extends any
|
||||
? K extends $Keys<T>
|
||||
? T[K]
|
||||
: empty
|
||||
: empty;
|
||||
type MergeUnion<T> = {
|
||||
[K in KeysOfUnion<T>]?: ValueOfUnion<T, K>,
|
||||
};
|
||||
type MaximumOneOf<T: {...}> = $Values<{
|
||||
[K in keyof T]: $Exact<{
|
||||
[P in keyof T]?: P extends K ? T[P] : empty,
|
||||
}>,
|
||||
}>;
|
||||
|
||||
export type ____TransformStyle_Internal = $ReadOnly<{
|
||||
/**
|
||||
* `transform` accepts an array of transformation objects. Each object specifies
|
||||
@@ -29,27 +48,36 @@ export type ____TransformStyle_Internal = $ReadOnly<{
|
||||
*/
|
||||
transform?:
|
||||
| $ReadOnlyArray<
|
||||
| {+perspective: number | AnimatedNode}
|
||||
| {+rotate: string | AnimatedNode}
|
||||
| {+rotateX: string | AnimatedNode}
|
||||
| {+rotateY: string | AnimatedNode}
|
||||
| {+rotateZ: string | AnimatedNode}
|
||||
| {+scale: number | AnimatedNode}
|
||||
| {+scaleX: number | AnimatedNode}
|
||||
| {+scaleY: number | AnimatedNode}
|
||||
| {+translateX: number | string | AnimatedNode}
|
||||
| {+translateY: number | string | AnimatedNode}
|
||||
| {
|
||||
+translate:
|
||||
| [number | string | AnimatedNode, number | string | AnimatedNode]
|
||||
| AnimatedNode,
|
||||
}
|
||||
| {+skewX: string | AnimatedNode}
|
||||
| {+skewY: string | AnimatedNode}
|
||||
// TODO: what is the actual type it expects?
|
||||
| {
|
||||
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
|
||||
},
|
||||
$ReadOnly<
|
||||
MaximumOneOf<
|
||||
MergeUnion<
|
||||
| {+perspective: number | AnimatedNode}
|
||||
| {+rotate: string | AnimatedNode}
|
||||
| {+rotateX: string | AnimatedNode}
|
||||
| {+rotateY: string | AnimatedNode}
|
||||
| {+rotateZ: string | AnimatedNode}
|
||||
| {+scale: number | AnimatedNode}
|
||||
| {+scaleX: number | AnimatedNode}
|
||||
| {+scaleY: number | AnimatedNode}
|
||||
| {+translateX: number | string | AnimatedNode}
|
||||
| {+translateY: number | string | AnimatedNode}
|
||||
| {
|
||||
+translate:
|
||||
| [
|
||||
number | string | AnimatedNode,
|
||||
number | string | AnimatedNode,
|
||||
]
|
||||
| AnimatedNode,
|
||||
}
|
||||
| {+skewX: string | AnimatedNode}
|
||||
| {+skewY: string | AnimatedNode}
|
||||
// TODO: what is the actual type it expects?
|
||||
| {
|
||||
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
|
||||
},
|
||||
>,
|
||||
>,
|
||||
>,
|
||||
>
|
||||
| string,
|
||||
/**
|
||||
|
||||
+2
-31
@@ -13,6 +13,7 @@
|
||||
import type {
|
||||
AccessibilityActionEvent,
|
||||
AccessibilityActionInfo,
|
||||
AccessibilityProps,
|
||||
AccessibilityRole,
|
||||
AccessibilityState,
|
||||
Role,
|
||||
@@ -124,20 +125,7 @@ export type TextPropsAndroid = {
|
||||
};
|
||||
|
||||
type TextBaseProps = $ReadOnly<{
|
||||
/**
|
||||
* Indicates whether the view is an accessibility element.
|
||||
*
|
||||
* See https://reactnative.dev/docs/text#accessible
|
||||
*/
|
||||
accessible?: ?boolean,
|
||||
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
|
||||
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,
|
||||
accessibilityHint?: ?Stringish,
|
||||
accessibilityLanguage?: ?Stringish,
|
||||
accessibilityLabel?: ?Stringish,
|
||||
accessibilityRole?: ?AccessibilityRole,
|
||||
accessibilityState?: ?AccessibilityState,
|
||||
'aria-label'?: ?string,
|
||||
|
||||
/**
|
||||
* Whether fonts should scale to respect Text Size accessibility settings.
|
||||
@@ -152,24 +140,6 @@ type TextBaseProps = $ReadOnly<{
|
||||
*
|
||||
*/
|
||||
android_hyphenationFrequency?: ?('normal' | 'none' | 'full'),
|
||||
|
||||
/**
|
||||
* alias for accessibilityState
|
||||
*
|
||||
* see https://reactnative.dev/docs/accessibility#accessibilitystate
|
||||
*/
|
||||
'aria-busy'?: ?boolean,
|
||||
'aria-checked'?: ?boolean | 'mixed',
|
||||
'aria-disabled'?: ?boolean,
|
||||
'aria-expanded'?: ?boolean,
|
||||
'aria-selected'?: ?boolean,
|
||||
|
||||
/**
|
||||
* Represents the nativeID of the associated label text. When the assistive technology focuses on the component with this props, the text is read aloud.
|
||||
* This prop is listed for cross-platform reasons and has no real effect on Android or iOS.
|
||||
*/
|
||||
'aria-labelledby'?: ?string,
|
||||
|
||||
children?: ?React.Node,
|
||||
|
||||
/**
|
||||
@@ -306,4 +276,5 @@ export type TextProps = $ReadOnly<{
|
||||
...TextPropsIOS,
|
||||
...TextPropsAndroid,
|
||||
...TextBaseProps,
|
||||
...AccessibilityProps,
|
||||
}>;
|
||||
|
||||
@@ -156,10 +156,10 @@ declare export class AnimatedEvent {
|
||||
exports[`public API should not change unintentionally Libraries/Animated/AnimatedExports.js 1`] = `
|
||||
"declare const Animated: typeof AnimatedImplementation;
|
||||
declare export default {
|
||||
get FlatList(): AnimatedFlatList,
|
||||
get FlatList(): AnimatedFlatList<any>,
|
||||
get Image(): AnimatedImage,
|
||||
get ScrollView(): AnimatedScrollView,
|
||||
get SectionList(): AnimatedSectionList,
|
||||
get SectionList(): AnimatedSectionList<any, any>,
|
||||
get Text(): AnimatedText,
|
||||
get View(): AnimatedView,
|
||||
...typeof Animated,
|
||||
@@ -190,7 +190,10 @@ export type { default as AnimatedDivision } from \\"./nodes/AnimatedDivision\\";
|
||||
export type { default as AnimatedModulo } from \\"./nodes/AnimatedModulo\\";
|
||||
export type { default as AnimatedMultiplication } from \\"./nodes/AnimatedMultiplication\\";
|
||||
export type { default as AnimatedSubtraction } from \\"./nodes/AnimatedSubtraction\\";
|
||||
export type { WithAnimatedValue } from \\"./createAnimatedComponent\\";
|
||||
export type {
|
||||
WithAnimatedValue,
|
||||
AnimatedProps,
|
||||
} from \\"./createAnimatedComponent\\";
|
||||
export type { AnimatedComponentType as AnimatedComponent } from \\"./createAnimatedComponent\\";
|
||||
declare export const add: typeof AnimatedImplementation.add;
|
||||
declare export const attachNativeEvent: typeof AnimatedImplementation.attachNativeEvent;
|
||||
@@ -611,10 +614,10 @@ exports[`public API should not change unintentionally Libraries/Animated/bezier.
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedFlatList.js 1`] = `
|
||||
"declare export default AnimatedComponentType<
|
||||
React.ElementConfig<typeof FlatList>,
|
||||
FlatList<mixed>,
|
||||
>;
|
||||
"declare export default component<ItemT = any>(
|
||||
ref?: React.RefSetter<FlatList<ItemT>>,
|
||||
...props: AnimatedProps<FlatListProps<ItemT>>
|
||||
);
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -638,10 +641,10 @@ declare export default typeof AnimatedScrollView;
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Animated/components/AnimatedSectionList.js 1`] = `
|
||||
"declare export default AnimatedComponentType<
|
||||
React.ElementConfig<typeof SectionList>,
|
||||
SectionList<any, SectionBase<any>>,
|
||||
>;
|
||||
"declare export default component<ItemT = any, SectionT = any>(
|
||||
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
|
||||
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
|
||||
);
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -904,7 +907,7 @@ declare export default class AnimatedObject extends AnimatedWithChildren {
|
||||
exports[`public API should not change unintentionally Libraries/Animated/nodes/AnimatedProps.js 1`] = `
|
||||
"export type AnimatedPropsAllowlist = $ReadOnly<{
|
||||
style?: ?AnimatedStyleAllowlist,
|
||||
[string]: true,
|
||||
[key: string]: true | AnimatedStyleAllowlist,
|
||||
}>;
|
||||
type TargetViewInstance = React.ElementRef<React.ElementType>;
|
||||
declare export default class AnimatedProps extends AnimatedNode {
|
||||
@@ -1077,7 +1080,12 @@ exports[`public API should not change unintentionally Libraries/Animated/useAnim
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/AppState/AppState.js 1`] = `
|
||||
"export type AppStateStatus = \\"inactive\\" | \\"background\\" | \\"active\\";
|
||||
"export type AppStateStatus =
|
||||
| \\"inactive\\"
|
||||
| \\"background\\"
|
||||
| \\"active\\"
|
||||
| \\"extension\\"
|
||||
| \\"unknown\\";
|
||||
type AppStateEventDefinitions = {
|
||||
change: [AppStateStatus],
|
||||
memoryWarning: [],
|
||||
@@ -1818,11 +1826,12 @@ declare export default function useAndroidRippleForView(
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js 1`] = `
|
||||
"export type { ProgressBarAndroidProps };
|
||||
type Omit<T, K> = T extends any ? Pick<T, Exclude<$Keys<T>, K>> : T;
|
||||
declare let ProgressBarAndroid: component(
|
||||
ref?: React.RefSetter<
|
||||
React.ElementRef<ProgressBarAndroidNativeComponentType>,
|
||||
>,
|
||||
...props: ProgressBarAndroidProps
|
||||
...props: Omit<ProgressBarAndroidProps, empty>
|
||||
);
|
||||
declare export default typeof ProgressBarAndroid;
|
||||
"
|
||||
@@ -1835,30 +1844,38 @@ declare export default typeof ProgressBarAndroidNativeComponent;
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js 1`] = `
|
||||
"type ProgressBarAndroidStyleAttrProp =
|
||||
| {
|
||||
styleAttr: \\"Horizontal\\",
|
||||
indeterminate: false,
|
||||
progress: number,
|
||||
}
|
||||
| {
|
||||
styleAttr:
|
||||
| \\"Horizontal\\"
|
||||
| \\"Normal\\"
|
||||
| \\"Small\\"
|
||||
| \\"Large\\"
|
||||
| \\"Inverse\\"
|
||||
| \\"SmallInverse\\"
|
||||
| \\"LargeInverse\\",
|
||||
indeterminate: true,
|
||||
};
|
||||
export type ProgressBarAndroidProps = $ReadOnly<{
|
||||
...ViewProps,
|
||||
...ProgressBarAndroidStyleAttrProp,
|
||||
"type DeterminateProgressBarAndroidStyleAttrProp = {
|
||||
styleAttr: \\"Horizontal\\",
|
||||
indeterminate: false,
|
||||
progress: number,
|
||||
};
|
||||
type IndeterminateProgressBarAndroidStyleAttrProp = {
|
||||
styleAttr:
|
||||
| \\"Horizontal\\"
|
||||
| \\"Normal\\"
|
||||
| \\"Small\\"
|
||||
| \\"Large\\"
|
||||
| \\"Inverse\\"
|
||||
| \\"SmallInverse\\"
|
||||
| \\"LargeInverse\\",
|
||||
indeterminate: true,
|
||||
};
|
||||
type ProgressBarAndroidBaseProps = $ReadOnly<{
|
||||
animating?: ?boolean,
|
||||
color?: ?ColorValue,
|
||||
testID?: ?string,
|
||||
}>;
|
||||
export type ProgressBarAndroidProps =
|
||||
| $ReadOnly<{
|
||||
...ViewProps,
|
||||
...ProgressBarAndroidBaseProps,
|
||||
...DeterminateProgressBarAndroidStyleAttrProp,
|
||||
}>
|
||||
| $ReadOnly<{
|
||||
...ViewProps,
|
||||
...ProgressBarAndroidBaseProps,
|
||||
...IndeterminateProgressBarAndroidStyleAttrProp,
|
||||
}>;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -4152,7 +4169,7 @@ declare export default class NativeEventEmitter<
|
||||
> = $ReadOnly<Record<string, $ReadOnlyArray<UnsafeObject>>>,
|
||||
> implements IEventEmitter<TEventToArgsMap>
|
||||
{
|
||||
constructor(nativeModule: ?NativeModule): void;
|
||||
constructor(nativeModule?: ?NativeModule): void;
|
||||
addListener<TEvent: $Keys<TEventToArgsMap>>(
|
||||
eventType: TEvent,
|
||||
listener: (...args: TEventToArgsMap[TEvent]) => mixed,
|
||||
@@ -4202,6 +4219,19 @@ exports[`public API should not change unintentionally Libraries/Image/AssetSourc
|
||||
+uri: string,
|
||||
+scale: number,
|
||||
};
|
||||
type AssetDestPathResolver = \\"android\\" | \\"generic\\";
|
||||
type PackagerAsset = $ReadOnly<{
|
||||
fileSystemLocation: string,
|
||||
httpServerLocation: string,
|
||||
width: ?number,
|
||||
height: ?number,
|
||||
scales: Array<number>,
|
||||
hash: string,
|
||||
name: string,
|
||||
type: string,
|
||||
resolver?: AssetDestPathResolver,
|
||||
...
|
||||
}>;
|
||||
declare class AssetSourceResolver {
|
||||
serverUrl: ?string;
|
||||
jsbundleUrl: ?string;
|
||||
@@ -7080,7 +7110,9 @@ declare export const setStyleAttributePreprocessor: (
|
||||
property: string,
|
||||
process: (nextProp: any) => any
|
||||
) => void;
|
||||
declare export const create: <+S: ____Styles_Internal>(obj: S) => $ReadOnly<S>;
|
||||
declare export const create: <+S: ____Styles_Internal>(
|
||||
obj: S & ____Styles_Internal
|
||||
) => $ReadOnly<S>;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -7485,7 +7517,8 @@ export type ____ImageStyle_InternalCore = $ReadOnly<{
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
overlayColor?: ColorValue,
|
||||
overflow?: \\"visible\\" | \\"hidden\\",
|
||||
}>;
|
||||
export type ____ImageStyle_Internal = $ReadOnly<{
|
||||
...____ImageStyle_InternalCore,
|
||||
@@ -7496,7 +7529,7 @@ export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
overlayColor?: ColorValue,
|
||||
}>;
|
||||
export type ____DangerouslyImpreciseStyle_Internal = $ReadOnly<{
|
||||
...____DangerouslyImpreciseStyle_InternalCore,
|
||||
@@ -7580,29 +7613,52 @@ export type ____ViewStyle_InternalOverrides = $ReadOnly<{}>;
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/StyleSheet/private/_TransformStyle.js 1`] = `
|
||||
"export type ____TransformStyle_Internal = $ReadOnly<{
|
||||
"type KeysOfUnion<T> = T extends any ? $Keys<T> : empty;
|
||||
type ValueOfUnion<T, K> = T extends any
|
||||
? K extends $Keys<T>
|
||||
? T[K]
|
||||
: empty
|
||||
: empty;
|
||||
type MergeUnion<T> = {
|
||||
[K in KeysOfUnion<T>]?: ValueOfUnion<T, K>,
|
||||
};
|
||||
type MaximumOneOf<T: { ... }> = $Values<{
|
||||
[K in keyof T]: $Exact<{
|
||||
[P in keyof T]?: P extends K ? T[P] : empty,
|
||||
}>,
|
||||
}>;
|
||||
export type ____TransformStyle_Internal = $ReadOnly<{
|
||||
transform?:
|
||||
| $ReadOnlyArray<
|
||||
| { +perspective: number | AnimatedNode }
|
||||
| { +rotate: string | AnimatedNode }
|
||||
| { +rotateX: string | AnimatedNode }
|
||||
| { +rotateY: string | AnimatedNode }
|
||||
| { +rotateZ: string | AnimatedNode }
|
||||
| { +scale: number | AnimatedNode }
|
||||
| { +scaleX: number | AnimatedNode }
|
||||
| { +scaleY: number | AnimatedNode }
|
||||
| { +translateX: number | string | AnimatedNode }
|
||||
| { +translateY: number | string | AnimatedNode }
|
||||
| {
|
||||
+translate:
|
||||
| [number | string | AnimatedNode, number | string | AnimatedNode]
|
||||
| AnimatedNode,
|
||||
}
|
||||
| { +skewX: string | AnimatedNode }
|
||||
| { +skewY: string | AnimatedNode }
|
||||
| {
|
||||
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
|
||||
},
|
||||
$ReadOnly<
|
||||
MaximumOneOf<
|
||||
MergeUnion<
|
||||
| { +perspective: number | AnimatedNode }
|
||||
| { +rotate: string | AnimatedNode }
|
||||
| { +rotateX: string | AnimatedNode }
|
||||
| { +rotateY: string | AnimatedNode }
|
||||
| { +rotateZ: string | AnimatedNode }
|
||||
| { +scale: number | AnimatedNode }
|
||||
| { +scaleX: number | AnimatedNode }
|
||||
| { +scaleY: number | AnimatedNode }
|
||||
| { +translateX: number | string | AnimatedNode }
|
||||
| { +translateY: number | string | AnimatedNode }
|
||||
| {
|
||||
+translate:
|
||||
| [
|
||||
number | string | AnimatedNode,
|
||||
number | string | AnimatedNode,
|
||||
]
|
||||
| AnimatedNode,
|
||||
}
|
||||
| { +skewX: string | AnimatedNode }
|
||||
| { +skewY: string | AnimatedNode }
|
||||
| {
|
||||
+matrix: $ReadOnlyArray<number | AnimatedNode> | AnimatedNode,
|
||||
},
|
||||
>,
|
||||
>,
|
||||
>,
|
||||
>
|
||||
| string,
|
||||
transformOrigin?:
|
||||
@@ -7818,23 +7874,9 @@ export type TextPropsAndroid = {
|
||||
minimumFontScale?: ?number,
|
||||
};
|
||||
type TextBaseProps = $ReadOnly<{
|
||||
accessible?: ?boolean,
|
||||
accessibilityActions?: ?$ReadOnlyArray<AccessibilityActionInfo>,
|
||||
onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed,
|
||||
accessibilityHint?: ?Stringish,
|
||||
accessibilityLanguage?: ?Stringish,
|
||||
accessibilityLabel?: ?Stringish,
|
||||
accessibilityRole?: ?AccessibilityRole,
|
||||
accessibilityState?: ?AccessibilityState,
|
||||
\\"aria-label\\"?: ?string,
|
||||
allowFontScaling?: ?boolean,
|
||||
android_hyphenationFrequency?: ?(\\"normal\\" | \\"none\\" | \\"full\\"),
|
||||
\\"aria-busy\\"?: ?boolean,
|
||||
\\"aria-checked\\"?: ?boolean | \\"mixed\\",
|
||||
\\"aria-disabled\\"?: ?boolean,
|
||||
\\"aria-expanded\\"?: ?boolean,
|
||||
\\"aria-selected\\"?: ?boolean,
|
||||
\\"aria-labelledby\\"?: ?string,
|
||||
children?: ?React.Node,
|
||||
ellipsizeMode?: ?(\\"clip\\" | \\"head\\" | \\"middle\\" | \\"tail\\"),
|
||||
id?: string,
|
||||
@@ -7865,6 +7907,7 @@ export type TextProps = $ReadOnly<{
|
||||
...TextPropsIOS,
|
||||
...TextPropsAndroid,
|
||||
...TextBaseProps,
|
||||
...AccessibilityProps,
|
||||
}>;
|
||||
"
|
||||
`;
|
||||
@@ -8892,8 +8935,33 @@ declare export default typeof rejectionTrackingOptions;
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/vendor/core/ErrorUtils.js 1`] = `
|
||||
"export type ErrorUtils = ErrorUtilsT;
|
||||
declare export default ErrorUtilsT;
|
||||
"type ErrorHandler = (error: mixed, isFatal: boolean) => void;
|
||||
type Fn<Args: $ReadOnlyArray<mixed>, Return> = (...Args) => Return;
|
||||
export type ErrorUtils = {
|
||||
applyWithGuard<TArgs: $ReadOnlyArray<mixed>, TOut>(
|
||||
fun: Fn<TArgs, TOut>,
|
||||
context?: mixed,
|
||||
args?: ?TArgs,
|
||||
unused_onError?: null,
|
||||
unused_name?: ?string
|
||||
): ?TOut,
|
||||
applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<mixed>, TOut>(
|
||||
fun: Fn<TArgs, TOut>,
|
||||
context?: mixed,
|
||||
args?: ?TArgs
|
||||
): ?TOut,
|
||||
getGlobalHandler(): ErrorHandler,
|
||||
guard<TArgs: $ReadOnlyArray<mixed>, TOut>(
|
||||
fun: Fn<TArgs, TOut>,
|
||||
name?: ?string,
|
||||
context?: mixed
|
||||
): ?(...TArgs) => ?TOut,
|
||||
inGuard(): boolean,
|
||||
reportError(error: mixed): void,
|
||||
reportFatalError(error: mixed): void,
|
||||
setGlobalHandler(fun: ErrorHandler): void,
|
||||
};
|
||||
declare export default ErrorUtils;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -9010,6 +9078,7 @@ export type {
|
||||
SectionListProps,
|
||||
SectionListRenderItem,
|
||||
SectionListRenderItemInfo,
|
||||
SectionListData,
|
||||
} from \\"./Libraries/Lists/SectionList\\";
|
||||
export { default as SectionList } from \\"./Libraries/Lists/SectionList\\";
|
||||
export type {
|
||||
|
||||
+28
-4
@@ -8,9 +8,33 @@
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
import type {ErrorUtilsT} from '@react-native/js-polyfills/error-guard';
|
||||
|
||||
export type ErrorUtils = ErrorUtilsT;
|
||||
// From @react-native/js-polyfills
|
||||
type ErrorHandler = (error: mixed, isFatal: boolean) => void;
|
||||
type Fn<Args: $ReadOnlyArray<mixed>, Return> = (...Args) => Return;
|
||||
export type ErrorUtils = {
|
||||
applyWithGuard<TArgs: $ReadOnlyArray<mixed>, TOut>(
|
||||
fun: Fn<TArgs, TOut>,
|
||||
context?: mixed,
|
||||
args?: ?TArgs,
|
||||
unused_onError?: null,
|
||||
unused_name?: ?string,
|
||||
): ?TOut,
|
||||
applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<mixed>, TOut>(
|
||||
fun: Fn<TArgs, TOut>,
|
||||
context?: mixed,
|
||||
args?: ?TArgs,
|
||||
): ?TOut,
|
||||
getGlobalHandler(): ErrorHandler,
|
||||
guard<TArgs: $ReadOnlyArray<mixed>, TOut>(
|
||||
fun: Fn<TArgs, TOut>,
|
||||
name?: ?string,
|
||||
context?: mixed,
|
||||
): ?(...TArgs) => ?TOut,
|
||||
inGuard(): boolean,
|
||||
reportError(error: mixed): void,
|
||||
reportFatalError(error: mixed): void,
|
||||
setGlobalHandler(fun: ErrorHandler): void,
|
||||
};
|
||||
|
||||
/**
|
||||
* The particular require runtime that we are using looks for a global
|
||||
@@ -24,4 +48,4 @@ export type ErrorUtils = ErrorUtilsT;
|
||||
* that use it aren't just using a global variable, so simply export the global
|
||||
* variable here. ErrorUtils is originally defined in a file named error-guard.js.
|
||||
*/
|
||||
export default (global.ErrorUtils: ErrorUtilsT);
|
||||
export default global.ErrorUtils as ErrorUtils;
|
||||
|
||||
@@ -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: @(80),
|
||||
RCTVersionPatch: @(2),
|
||||
RCTVersionPrerelease: [NSNull null],
|
||||
};
|
||||
});
|
||||
|
||||
+18
-4
@@ -170,10 +170,24 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
||||
|
||||
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
||||
{
|
||||
[_viewsToBeMounted addObject:@{
|
||||
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
|
||||
kRCTLegacyInteropChildComponentKey : childComponentView
|
||||
}];
|
||||
if (_adapter && index == _adapter.paperView.reactSubviews.count) {
|
||||
// This is a new child view that is being added to the end of the children array.
|
||||
// After the children is added, we need to call didUpdateReactSubviews to make sure that it is rendered.
|
||||
// Without this change, the new child will not be rendered right away because the didUpdateReactSubviews is not
|
||||
// called and the `finalizeUpdate` is not invoked.
|
||||
if ([childComponentView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
|
||||
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childComponentView).contentView;
|
||||
[_adapter.paperView insertReactSubview:target atIndex:index];
|
||||
} else {
|
||||
[_adapter.paperView insertReactSubview:childComponentView atIndex:index];
|
||||
}
|
||||
[_adapter.paperView didUpdateReactSubviews];
|
||||
} else {
|
||||
[_viewsToBeMounted addObject:@{
|
||||
kRCTLegacyInteropChildIndexKey : [NSNumber numberWithInteger:index],
|
||||
kRCTLegacyInteropChildComponentKey : childComponentView
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
||||
|
||||
@@ -2006,7 +2006,7 @@ public final class com/facebook/react/devsupport/DefaultDevLoadingViewImplementa
|
||||
public final fun setDevLoadingEnabled (Z)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/devsupport/DevServerHelper {
|
||||
public class com/facebook/react/devsupport/DevServerHelper {
|
||||
public fun <init> (Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;Landroid/content/Context;Lcom/facebook/react/packagerconnection/PackagerConnectionSettings;)V
|
||||
public final fun closeInspectorConnection ()V
|
||||
public final fun closePackagerConnection ()V
|
||||
@@ -2015,12 +2015,12 @@ public final class com/facebook/react/devsupport/DevServerHelper {
|
||||
public final fun downloadBundleFromURL (Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;Ljava/io/File;Ljava/lang/String;Lcom/facebook/react/devsupport/BundleDownloader$BundleInfo;Lokhttp3/Request$Builder;)V
|
||||
public static synthetic fun downloadBundleFromURL$default (Lcom/facebook/react/devsupport/DevServerHelper;Lcom/facebook/react/devsupport/interfaces/DevBundleDownloadListener;Ljava/io/File;Ljava/lang/String;Lcom/facebook/react/devsupport/BundleDownloader$BundleInfo;Lokhttp3/Request$Builder;ILjava/lang/Object;)V
|
||||
public final fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
|
||||
public final fun getDevServerBundleURL (Ljava/lang/String;)Ljava/lang/String;
|
||||
public final fun getDevServerSplitBundleURL (Ljava/lang/String;)Ljava/lang/String;
|
||||
public final fun getSourceMapUrl (Ljava/lang/String;)Ljava/lang/String;
|
||||
public final fun getSourceUrl (Ljava/lang/String;)Ljava/lang/String;
|
||||
public fun getDevServerBundleURL (Ljava/lang/String;)Ljava/lang/String;
|
||||
public fun getDevServerSplitBundleURL (Ljava/lang/String;)Ljava/lang/String;
|
||||
public fun getSourceMapUrl (Ljava/lang/String;)Ljava/lang/String;
|
||||
public fun getSourceUrl (Ljava/lang/String;)Ljava/lang/String;
|
||||
public final fun getWebsocketProxyURL ()Ljava/lang/String;
|
||||
public final fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
|
||||
public fun isPackagerRunning (Lcom/facebook/react/devsupport/interfaces/PackagerStatusCallback;)V
|
||||
public final fun openDebugger (Lcom/facebook/react/bridge/ReactContext;Ljava/lang/String;)V
|
||||
public final fun openInspectorConnection ()V
|
||||
public final fun openPackagerConnection (Ljava/lang/String;Lcom/facebook/react/devsupport/DevServerHelper$PackagerCommandListener;)V
|
||||
@@ -4656,7 +4656,7 @@ public abstract class com/facebook/react/uimanager/ViewGroupManager : com/facebo
|
||||
public fun getShadowNodeClass ()Ljava/lang/Class;
|
||||
public static final fun getViewZIndex (Landroid/view/View;)Ljava/lang/Integer;
|
||||
public fun needsCustomLayoutForChildren ()Z
|
||||
public final fun removeView (Landroid/view/ViewGroup;Landroid/view/View;)V
|
||||
public fun removeView (Landroid/view/ViewGroup;Landroid/view/View;)V
|
||||
public synthetic fun removeViewAt (Landroid/view/View;I)V
|
||||
public fun removeViewAt (Landroid/view/ViewGroup;I)V
|
||||
public static final fun setViewZIndex (Landroid/view/View;I)V
|
||||
@@ -5123,13 +5123,13 @@ public final class com/facebook/react/uimanager/events/TouchEventType$Companion
|
||||
public final fun getJSEventName (Lcom/facebook/react/uimanager/events/TouchEventType;)Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/uimanager/layoutanimation/LayoutAnimationController {
|
||||
public class com/facebook/react/uimanager/layoutanimation/LayoutAnimationController {
|
||||
public fun <init> ()V
|
||||
public final fun applyLayoutUpdate (Landroid/view/View;IIII)V
|
||||
public final fun deleteView (Landroid/view/View;Lcom/facebook/react/uimanager/layoutanimation/LayoutAnimationListener;)V
|
||||
public fun applyLayoutUpdate (Landroid/view/View;IIII)V
|
||||
public fun deleteView (Landroid/view/View;Lcom/facebook/react/uimanager/layoutanimation/LayoutAnimationListener;)V
|
||||
public final fun initializeFromConfig (Lcom/facebook/react/bridge/ReadableMap;Lcom/facebook/react/bridge/Callback;)V
|
||||
public final fun reset ()V
|
||||
public final fun shouldAnimateLayout (Landroid/view/View;)Z
|
||||
public fun reset ()V
|
||||
public fun shouldAnimateLayout (Landroid/view/View;)Z
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/uimanager/layoutanimation/LayoutAnimationListener {
|
||||
@@ -6565,7 +6565,6 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp
|
||||
public fun addTextChangedListener (Landroid/text/TextWatcher;)V
|
||||
protected final fun applyTextAttributes ()V
|
||||
public final fun canUpdateWithEventCount (I)Z
|
||||
public fun clearFocus ()V
|
||||
protected final fun finalize ()V
|
||||
public final fun getBorderColor (I)I
|
||||
protected final fun getContainsImages ()Z
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0
|
||||
VERSION_NAME=0.80.2
|
||||
react.internal.publishingGroup=com.facebook.react
|
||||
|
||||
android.useAndroidX=true
|
||||
|
||||
+20
@@ -11,11 +11,13 @@ import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import androidx.activity.OnBackPressedCallback;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
|
||||
import com.facebook.react.modules.core.PermissionAwareActivity;
|
||||
import com.facebook.react.modules.core.PermissionListener;
|
||||
import com.facebook.react.util.AndroidVersion;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/** Base Activity for React Native applications. */
|
||||
@@ -24,6 +26,18 @@ public abstract class ReactActivity extends AppCompatActivity
|
||||
|
||||
private final ReactActivityDelegate mDelegate;
|
||||
|
||||
// Due to enforced predictive back on targetSdk 36, 'onBackPressed()' is disabled by default.
|
||||
// Using a workaround to trigger it manually.
|
||||
private final OnBackPressedCallback mBackPressedCallback =
|
||||
new OnBackPressedCallback(true) {
|
||||
@Override
|
||||
public void handleOnBackPressed() {
|
||||
setEnabled(false);
|
||||
onBackPressed();
|
||||
setEnabled(true);
|
||||
}
|
||||
};
|
||||
|
||||
protected ReactActivity() {
|
||||
mDelegate = createReactActivityDelegate();
|
||||
}
|
||||
@@ -45,6 +59,9 @@ public abstract class ReactActivity extends AppCompatActivity
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mDelegate.onCreate(savedInstanceState);
|
||||
if (AndroidVersion.isAtLeastTargetSdk36(this)) {
|
||||
getOnBackPressedDispatcher().addCallback(this, mBackPressedCallback);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -103,6 +120,9 @@ public abstract class ReactActivity extends AppCompatActivity
|
||||
|
||||
@Override
|
||||
public void invokeDefaultOnBackPressed() {
|
||||
// Disabling callback so the fallback logic (finish activity) can run
|
||||
// as super.onBackPressed() will call all enabled callbacks in the dispatcher.
|
||||
mBackPressedCallback.setEnabled(false);
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -1076,6 +1076,10 @@ public class ReactInstanceManager {
|
||||
if (reactPackage instanceof ViewManagerOnDemandReactPackage) {
|
||||
Collection<String> names =
|
||||
((ViewManagerOnDemandReactPackage) reactPackage).getViewManagerNames(context);
|
||||
// When converting this class to Kotlin, you need to retain this null check
|
||||
// or wrap around a try/catch otherwise this will cause a crash for OSS libraries
|
||||
// that are not migrated to Kotlin yet and are returning null for
|
||||
// `getViewManagerNames`
|
||||
if (names != null) {
|
||||
uniqueNames.addAll(names);
|
||||
}
|
||||
|
||||
+6
-6
@@ -59,7 +59,7 @@ import okio.Okio
|
||||
*/
|
||||
@SuppressLint(
|
||||
"StaticFieldLeak") // TODO: This entire class should be rewritten to don't use AsyncTask
|
||||
public class DevServerHelper(
|
||||
public open class DevServerHelper(
|
||||
private val settings: DeveloperSettings,
|
||||
private val applicationContext: Context,
|
||||
private val packagerConnectionSettings: PackagerConnectionSettings
|
||||
@@ -287,20 +287,20 @@ public class DevServerHelper(
|
||||
additionalOptionsBuilder.toString())
|
||||
}
|
||||
|
||||
public fun getDevServerBundleURL(jsModulePath: String): String =
|
||||
public open fun getDevServerBundleURL(jsModulePath: String): String =
|
||||
createBundleURL(jsModulePath, BundleType.BUNDLE, packagerConnectionSettings.debugServerHost)
|
||||
|
||||
public fun getDevServerSplitBundleURL(jsModulePath: String): String =
|
||||
public open fun getDevServerSplitBundleURL(jsModulePath: String): String =
|
||||
createSplitBundleURL(jsModulePath, packagerConnectionSettings.debugServerHost)
|
||||
|
||||
public fun isPackagerRunning(callback: PackagerStatusCallback) {
|
||||
public open fun isPackagerRunning(callback: PackagerStatusCallback) {
|
||||
packagerStatusCheck.run(packagerConnectionSettings.debugServerHost, callback)
|
||||
}
|
||||
|
||||
public fun getSourceMapUrl(mainModuleName: String): String =
|
||||
public open fun getSourceMapUrl(mainModuleName: String): String =
|
||||
createBundleURL(mainModuleName, BundleType.MAP)
|
||||
|
||||
public fun getSourceUrl(mainModuleName: String): String =
|
||||
public open fun getSourceUrl(mainModuleName: String): String =
|
||||
createBundleURL(mainModuleName, BundleType.BUNDLE)
|
||||
|
||||
/**
|
||||
|
||||
+27
-16
@@ -9,6 +9,7 @@
|
||||
|
||||
package com.facebook.react.fabric.internal.interop
|
||||
|
||||
import androidx.annotation.VisibleForTesting
|
||||
import com.facebook.react.bridge.UIManager
|
||||
import com.facebook.react.bridge.UIManagerListener
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
||||
@@ -24,9 +25,9 @@ import com.facebook.react.fabric.interop.UIBlockViewResolver
|
||||
*/
|
||||
@OptIn(UnstableReactNativeAPI::class)
|
||||
internal class InteropUIBlockListener : UIManagerListener {
|
||||
@VisibleForTesting internal val beforeUIBlocks: MutableList<UIBlock> = mutableListOf()
|
||||
|
||||
internal val beforeUIBlocks: MutableList<UIBlock> = mutableListOf()
|
||||
internal val afterUIBlocks: MutableList<UIBlock> = mutableListOf()
|
||||
@VisibleForTesting internal val afterUIBlocks: MutableList<UIBlock> = mutableListOf()
|
||||
|
||||
@Synchronized
|
||||
fun prependUIBlock(block: UIBlock) {
|
||||
@@ -39,27 +40,37 @@ internal class InteropUIBlockListener : UIManagerListener {
|
||||
}
|
||||
|
||||
override fun willMountItems(uiManager: UIManager) {
|
||||
if (beforeUIBlocks.isEmpty()) {
|
||||
if (uiManager !is UIBlockViewResolver) {
|
||||
return
|
||||
}
|
||||
beforeUIBlocks.forEach {
|
||||
if (uiManager is UIBlockViewResolver) {
|
||||
it.execute(uiManager)
|
||||
}
|
||||
}
|
||||
beforeUIBlocks.clear()
|
||||
|
||||
// avoid ConcurrentModificationException by iterating over a copy
|
||||
val blocks =
|
||||
synchronized(this) {
|
||||
if (beforeUIBlocks.isEmpty()) {
|
||||
return
|
||||
}
|
||||
beforeUIBlocks.toList().also { beforeUIBlocks.clear() }
|
||||
}
|
||||
|
||||
blocks.forEach { block -> block.execute(uiManager) }
|
||||
}
|
||||
|
||||
override fun didMountItems(uiManager: UIManager) {
|
||||
if (afterUIBlocks.isEmpty()) {
|
||||
if (uiManager !is UIBlockViewResolver) {
|
||||
return
|
||||
}
|
||||
afterUIBlocks.forEach {
|
||||
if (uiManager is UIBlockViewResolver) {
|
||||
it.execute(uiManager)
|
||||
}
|
||||
}
|
||||
afterUIBlocks.clear()
|
||||
|
||||
// avoid ConcurrentModificationException by iterating over a copy
|
||||
val blocks =
|
||||
synchronized(this) {
|
||||
if (afterUIBlocks.isEmpty()) {
|
||||
return
|
||||
}
|
||||
afterUIBlocks.toList().also { afterUIBlocks.clear() }
|
||||
}
|
||||
|
||||
blocks.forEach { block -> block.execute(uiManager) }
|
||||
}
|
||||
|
||||
override fun didDispatchMountItems(uiManager: UIManager) = didMountItems(uiManager)
|
||||
|
||||
-2
@@ -18,7 +18,5 @@ public class ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android(
|
||||
|
||||
override fun useTurboModules(): Boolean = bridgelessEnabled || turboModulesEnabled
|
||||
|
||||
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = true
|
||||
|
||||
override fun useShadowNodeStateOnClone(): Boolean = true
|
||||
}
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@ package com.facebook.react.modules.systeminfo
|
||||
public object ReactNativeVersion {
|
||||
@JvmField
|
||||
public val VERSION: Map<String, Any?> = mapOf(
|
||||
"major" to 1000,
|
||||
"minor" to 0,
|
||||
"patch" to 0,
|
||||
"major" to 0,
|
||||
"minor" to 80,
|
||||
"patch" to 2,
|
||||
"prerelease" to null
|
||||
)
|
||||
}
|
||||
|
||||
+13
-1
@@ -69,6 +69,7 @@ import com.facebook.react.uimanager.ViewManager
|
||||
import com.facebook.react.uimanager.ViewManagerRegistry
|
||||
import com.facebook.react.uimanager.ViewManagerResolver
|
||||
import com.facebook.react.uimanager.events.EventDispatcher
|
||||
import com.facebook.react.util.RNLog
|
||||
import com.facebook.soloader.SoLoader
|
||||
import com.facebook.systrace.Systrace
|
||||
import com.facebook.systrace.SystraceMessage
|
||||
@@ -544,7 +545,18 @@ internal class ReactInstance(
|
||||
for (reactPackage in reactPackages) {
|
||||
if (reactPackage is ViewManagerOnDemandReactPackage) {
|
||||
val names = reactPackage.getViewManagerNames(context)
|
||||
uniqueNames.addAll(names)
|
||||
// We need to null check here because some Java implementation of the
|
||||
// `ViewManagerOnDemandReactPackage` interface could still return null even
|
||||
// if the method is marked as returning a non-nullable collection in Kotlin.
|
||||
// See https://github.com/facebook/react-native/issues/52014
|
||||
@Suppress("SENSELESS_COMPARISON")
|
||||
if (names == null) {
|
||||
RNLog.w(
|
||||
context,
|
||||
"The ReactPackage called: `${reactPackage.javaClass.simpleName}` is returning null for getViewManagerNames(). This is violating the signature of the method. That method should be updated to return an empty collection.")
|
||||
} else {
|
||||
uniqueNames.addAll(names)
|
||||
}
|
||||
}
|
||||
}
|
||||
return uniqueNames
|
||||
|
||||
+2
-2
@@ -462,9 +462,9 @@ public class NativeViewHierarchyOptimizer {
|
||||
return false;
|
||||
}
|
||||
|
||||
ReadableMapKeySetIterator keyIterator = props.backingMap.keySetIterator();
|
||||
ReadableMapKeySetIterator keyIterator = props.internal_backingMap().keySetIterator();
|
||||
while (keyIterator.hasNextKey()) {
|
||||
if (!ViewProps.isLayoutOnly(props.backingMap, keyIterator.nextKey())) {
|
||||
if (!ViewProps.isLayoutOnly(props.internal_backingMap(), keyIterator.nextKey())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
+6
-1
@@ -31,7 +31,12 @@ import com.facebook.react.bridge.ReadableMap
|
||||
*/
|
||||
public class ReactStylesDiffMap(props: ReadableMap) {
|
||||
|
||||
@JvmField internal val backingMap: ReadableMap = props
|
||||
/**
|
||||
* This backing map is annotated as JvmName("internal_backingMap") so can be accessed by Java
|
||||
* consumers. This is used in Expo to override setting properties in some subclassed view-manager
|
||||
* as this provides faster access to the underlying values.
|
||||
*/
|
||||
@get:JvmName("internal_backingMap") internal val backingMap: ReadableMap = props
|
||||
|
||||
public fun toMap(): Map<String, Any?> = backingMap.toHashMap()
|
||||
|
||||
|
||||
+6
-1
@@ -49,7 +49,12 @@ constructor(reactContext: ReactApplicationContext? = null) :
|
||||
parent.removeViewAt(index)
|
||||
}
|
||||
|
||||
public fun removeView(parent: T, view: View) {
|
||||
/**
|
||||
* Expo overrides this function GroupViewManagerWrapper.kt`, which is a replacement view manager
|
||||
* adding support for delegates receiving callbacks whenever one of the methods in the view
|
||||
* manager are called.
|
||||
*/
|
||||
public open fun removeView(parent: T, view: View) {
|
||||
UiThreadUtil.assertOnUiThread()
|
||||
|
||||
for (i in 0 until getChildCount(parent)) {
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
|
||||
*/
|
||||
public void updateProperties(@NonNull T viewToUpdate, ReactStylesDiffMap props) {
|
||||
ViewManagerDelegate<T> delegate = getOrCreateViewManagerDelegate();
|
||||
Iterator<Map.Entry<String, Object>> iterator = props.backingMap.getEntryIterator();
|
||||
Iterator<Map.Entry<String, Object>> iterator = props.internal_backingMap().getEntryIterator();
|
||||
while (iterator.hasNext()) {
|
||||
Map.Entry<String, Object> entry = iterator.next();
|
||||
delegate.setProperty(viewToUpdate, entry.getKey(), entry.getValue());
|
||||
|
||||
+5
-5
@@ -29,7 +29,7 @@ import javax.annotation.concurrent.NotThreadSafe
|
||||
*/
|
||||
@NotThreadSafe
|
||||
@LegacyArchitecture
|
||||
public class LayoutAnimationController {
|
||||
public open class LayoutAnimationController {
|
||||
private val layoutCreateAnimation: AbstractLayoutAnimation = LayoutCreateAnimation()
|
||||
private val layoutUpdateAnimation: AbstractLayoutAnimation = LayoutUpdateAnimation()
|
||||
private val layoutDeleteAnimation: AbstractLayoutAnimation = LayoutDeleteAnimation()
|
||||
@@ -68,7 +68,7 @@ public class LayoutAnimationController {
|
||||
}
|
||||
}
|
||||
|
||||
public fun reset() {
|
||||
public open fun reset() {
|
||||
layoutCreateAnimation.reset()
|
||||
layoutUpdateAnimation.reset()
|
||||
layoutDeleteAnimation.reset()
|
||||
@@ -83,7 +83,7 @@ public class LayoutAnimationController {
|
||||
}
|
||||
}
|
||||
|
||||
public fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
|
||||
public open fun shouldAnimateLayout(viewToAnimate: View?): Boolean {
|
||||
// if view parent is null, skip animation: view have been clipped, we don't want animation to
|
||||
// resume when view is re-attached to parent, which is the standard android animation behavior.
|
||||
// If there's a layout handling animation going on, it should be animated nonetheless since the
|
||||
@@ -106,7 +106,7 @@ public class LayoutAnimationController {
|
||||
* @param width the new width value for the view
|
||||
* @param height the new height value for the view
|
||||
*/
|
||||
public fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
|
||||
public open fun applyLayoutUpdate(view: View, x: Int, y: Int, width: Int, height: Int) {
|
||||
assertOnUiThread()
|
||||
|
||||
val reactTag = view.id
|
||||
@@ -167,7 +167,7 @@ public class LayoutAnimationController {
|
||||
* @param listener Called once the animation is finished, should be used to completely remove the
|
||||
* view.
|
||||
*/
|
||||
public fun deleteView(view: View, listener: LayoutAnimationListener) {
|
||||
public open fun deleteView(view: View, listener: LayoutAnimationListener) {
|
||||
assertOnUiThread()
|
||||
|
||||
val animation =
|
||||
|
||||
+2
-2
@@ -143,11 +143,11 @@ internal data class BorderRadiusStyle(
|
||||
CornerRadii(it, width, height)
|
||||
} ?: zeroRadii,
|
||||
bottomLeft =
|
||||
(endEnd ?: bottomStart ?: bottomRight ?: uniform)?.let {
|
||||
(endEnd ?: bottomEnd ?: bottomRight ?: uniform)?.let {
|
||||
CornerRadii(it, width, height)
|
||||
} ?: zeroRadii,
|
||||
bottomRight =
|
||||
(startEnd ?: bottomEnd ?: bottomLeft ?: uniform)?.let {
|
||||
(startEnd ?: bottomStart ?: bottomLeft ?: uniform)?.let {
|
||||
CornerRadii(it, width, height)
|
||||
} ?: zeroRadii,
|
||||
width = width,
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.react.util
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
|
||||
/** Helper class for checking Android version-related information. */
|
||||
internal object AndroidVersion {
|
||||
|
||||
/**
|
||||
* This is the version code for Android 16 (SDK Level 36). Delete it once we bump up the default
|
||||
* compile SDK version to 36.
|
||||
*/
|
||||
private const val VERSION_CODE_BAKLAVA: Int = 36
|
||||
|
||||
/**
|
||||
* This method is used to check if the current device is running Android 16 (SDK Level 36) or
|
||||
* higher and the app is targeting Android 16 (SDK Level 36) or higher.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isAtLeastTargetSdk36(context: Context): Boolean =
|
||||
Build.VERSION.SDK_INT >= VERSION_CODE_BAKLAVA &&
|
||||
context.applicationInfo.targetSdkVersion >= VERSION_CODE_BAKLAVA
|
||||
}
|
||||
+31
-17
@@ -20,11 +20,12 @@ import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewStructure
|
||||
import android.view.Window
|
||||
import android.view.WindowManager
|
||||
import android.view.accessibility.AccessibilityEvent
|
||||
import android.view.accessibility.AccessibilityNodeInfo
|
||||
import android.widget.FrameLayout
|
||||
import androidx.activity.ComponentDialog
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
@@ -49,10 +50,10 @@ import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.UIManagerModule
|
||||
import com.facebook.react.uimanager.events.EventDispatcher
|
||||
import com.facebook.react.views.common.ContextUtils
|
||||
import com.facebook.react.views.modal.ReactModalHostView.DialogRootViewGroup
|
||||
import com.facebook.react.views.view.ReactViewGroup
|
||||
import com.facebook.react.views.view.setStatusBarTranslucency
|
||||
import com.facebook.react.views.view.setSystemBarsTranslucency
|
||||
import java.util.Objects
|
||||
|
||||
/**
|
||||
* ReactModalHostView is a view that sits in the view hierarchy representing a Modal view.
|
||||
@@ -71,7 +72,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
||||
ViewGroup(context), LifecycleEventListener {
|
||||
|
||||
@get:VisibleForTesting
|
||||
public var dialog: Dialog? = null
|
||||
public var dialog: ComponentDialog? = null
|
||||
private set
|
||||
|
||||
public var transparent: Boolean = false
|
||||
@@ -260,17 +261,34 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
||||
}
|
||||
|
||||
val currentActivity = getCurrentActivity()
|
||||
val newDialog = Dialog(currentActivity ?: context, theme)
|
||||
val newDialog = ComponentDialog(currentActivity ?: context, theme)
|
||||
dialog = newDialog
|
||||
Objects.requireNonNull<Window>(newDialog.window)
|
||||
.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
|
||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
val window = requireNotNull(newDialog.window)
|
||||
window.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
|
||||
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
|
||||
newDialog.setContentView(contentView)
|
||||
updateProperties()
|
||||
|
||||
newDialog.setOnShowListener(onShowListener)
|
||||
|
||||
val handleCloseAction: () -> Unit = {
|
||||
val listener =
|
||||
checkNotNull(onRequestCloseListener) {
|
||||
"onRequestClose callback must be set if back key is expected to close the modal"
|
||||
}
|
||||
listener.onRequestClose(newDialog)
|
||||
}
|
||||
|
||||
val backPressedCallback: OnBackPressedCallback =
|
||||
object : OnBackPressedCallback(true) {
|
||||
override fun handleOnBackPressed() {
|
||||
handleCloseAction()
|
||||
}
|
||||
}
|
||||
|
||||
newDialog.onBackPressedDispatcher.addCallback(newDialog, backPressedCallback)
|
||||
newDialog.setOnKeyListener(
|
||||
object : DialogInterface.OnKeyListener {
|
||||
override fun onKey(dialog: DialogInterface, keyCode: Int, event: KeyEvent): Boolean {
|
||||
@@ -280,11 +298,7 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
||||
// to whether or not to allow the back/escape key to close the dialog. If it chooses
|
||||
// to, it can just set visible to false on the Modal and the Modal will go away
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK || keyCode == KeyEvent.KEYCODE_ESCAPE) {
|
||||
val listener =
|
||||
checkNotNull(onRequestCloseListener) {
|
||||
"onRequestClose callback must be set if back key is expected to close the modal"
|
||||
}
|
||||
listener.onRequestClose(dialog)
|
||||
handleCloseAction()
|
||||
return true
|
||||
} else {
|
||||
// We redirect the rest of the key events to the current activity, since the
|
||||
@@ -301,19 +315,19 @@ public class ReactModalHostView(context: ThemedReactContext) :
|
||||
}
|
||||
})
|
||||
|
||||
newDialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
|
||||
if (hardwareAccelerated) {
|
||||
newDialog.window?.addFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED)
|
||||
}
|
||||
val flagSecureSet = isFlagSecureSet(currentActivity)
|
||||
if (flagSecureSet) {
|
||||
newDialog.window?.setFlags(
|
||||
window.setFlags(
|
||||
WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
|
||||
}
|
||||
if (currentActivity?.isFinishing == false) {
|
||||
newDialog.show()
|
||||
updateSystemAppearance()
|
||||
newDialog.window?.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
-6
@@ -35,6 +35,7 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.accessibility.AccessibilityNodeInfo
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputConnection
|
||||
@@ -359,11 +360,26 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
super.onTextContextMenuItem(
|
||||
if (id == android.R.id.paste) android.R.id.pasteAsPlainText else id)
|
||||
|
||||
override fun clearFocus() {
|
||||
super.clearFocus()
|
||||
internal fun clearFocusAndMaybeRefocus() {
|
||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P || !isInTouchMode) {
|
||||
super.clearFocus()
|
||||
} else {
|
||||
// Avoid refocusing to a new view on old versions of Android by default
|
||||
// by preventing `requestFocus()` on the rootView from moving focus to any child.
|
||||
// https://cs.android.com/android/_/android/platform/frameworks/base/+/bdc66cb5a0ef513f4306edf9156cc978b08e06e4
|
||||
val rootViewGroup = rootView as ViewGroup
|
||||
val oldDescendantFocusability = rootViewGroup.descendantFocusability
|
||||
rootViewGroup.descendantFocusability = ViewGroup.FOCUS_BLOCK_DESCENDANTS
|
||||
super.clearFocus()
|
||||
rootViewGroup.descendantFocusability = oldDescendantFocusability
|
||||
}
|
||||
hideSoftKeyboard()
|
||||
}
|
||||
|
||||
internal fun clearFocusFromJS() {
|
||||
clearFocusAndMaybeRefocus()
|
||||
}
|
||||
|
||||
// For cases like autoFocus, or ref.focus() where we request focus programmatically and not
|
||||
// through
|
||||
// interacting with the EditText directly (like clicking on it). We cannot use stock
|
||||
@@ -598,10 +614,6 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
|
||||
requestFocusProgrammatically()
|
||||
}
|
||||
|
||||
internal fun clearFocusFromJS() {
|
||||
clearFocus()
|
||||
}
|
||||
|
||||
public fun incrementAndGetEventCounter(): Int = ++nativeEventCount
|
||||
|
||||
public fun maybeSetTextFromJS(reactTextUpdate: ReactTextUpdate) {
|
||||
|
||||
+1
-1
@@ -926,7 +926,7 @@ public open class ReactTextInputManager public constructor() :
|
||||
}
|
||||
|
||||
if (shouldBlur) {
|
||||
editText.clearFocus()
|
||||
editText.clearFocusAndMaybeRefocus()
|
||||
}
|
||||
|
||||
// Prevent default behavior except when we want it to insert a newline.
|
||||
|
||||
+2
-2
@@ -95,13 +95,13 @@ class BorderRadiusStyleTest {
|
||||
arrayOf(
|
||||
BorderRadiusProp.BORDER_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_RIGHT_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
|
||||
BorderRadiusProp.BORDER_END_END_RADIUS),
|
||||
ComputedBorderRadiusProp.COMPUTED_BORDER_BOTTOM_RIGHT_RADIUS to
|
||||
arrayOf(
|
||||
BorderRadiusProp.BORDER_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_LEFT_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_END_RADIUS,
|
||||
BorderRadiusProp.BORDER_BOTTOM_START_RADIUS,
|
||||
BorderRadiusProp.BORDER_START_END_RADIUS),
|
||||
)
|
||||
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
#define REACT_NATIVE_VERSION_MAJOR 1000
|
||||
#define REACT_NATIVE_VERSION_MINOR 0
|
||||
#define REACT_NATIVE_VERSION_PATCH 0
|
||||
#define REACT_NATIVE_VERSION_MAJOR 0
|
||||
#define REACT_NATIVE_VERSION_MINOR 80
|
||||
#define REACT_NATIVE_VERSION_PATCH 2
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
constexpr struct {
|
||||
int32_t Major = 1000;
|
||||
int32_t Minor = 0;
|
||||
int32_t Patch = 0;
|
||||
int32_t Major = 0;
|
||||
int32_t Minor = 80;
|
||||
int32_t Patch = 2;
|
||||
std::string_view Prerelease = "";
|
||||
} ReactNativeVersion;
|
||||
|
||||
|
||||
@@ -32,6 +32,6 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-jsi", version
|
||||
|
||||
s.subspec "Fabric" do |ss|
|
||||
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)" }
|
||||
ss.pod_target_xcconfig = { "OTHER_CFLAGS" => "$(inherited)", "DEFINES_MODULE" => "YES" }
|
||||
end
|
||||
end
|
||||
|
||||
-3
@@ -26,9 +26,6 @@ class ReactNativeFeatureFlagsOverridesOSSStable
|
||||
bool useNativeViewConfigsInBridgelessMode() override {
|
||||
return true;
|
||||
}
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit() override {
|
||||
return true;
|
||||
}
|
||||
bool useShadowNodeStateOnClone() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
+13
-9
@@ -982,15 +982,19 @@ void JavaTurboModule::configureEventEmitterCallback() {
|
||||
FACEBOOK_JNI_THROW_PENDING_EXCEPTION();
|
||||
}
|
||||
|
||||
jvalue arg;
|
||||
arg.l =
|
||||
JCxxCallbackImpl::newObjectCxxArgs([&](folly::dynamic args) {
|
||||
auto eventName = args.at(0).asString();
|
||||
auto& eventEmitter = static_cast<AsyncEventEmitter<folly::dynamic>&>(
|
||||
*eventEmitterMap_[eventName].get());
|
||||
eventEmitter.emit(args.size() > 1 ? std::move(args).at(1) : nullptr);
|
||||
}).release();
|
||||
env->CallVoidMethod(instance_.get(), cachedMethodId, arg);
|
||||
auto callback = JCxxCallbackImpl::newObjectCxxArgs([&](folly::dynamic args) {
|
||||
auto eventName = args.at(0).asString();
|
||||
auto& eventEmitter = static_cast<AsyncEventEmitter<folly::dynamic>&>(
|
||||
*eventEmitterMap_[eventName].get());
|
||||
eventEmitter.emit(args.size() > 1 ? std::move(args).at(1) : nullptr);
|
||||
});
|
||||
|
||||
jvalue args[1];
|
||||
args[0].l = callback.release();
|
||||
|
||||
// CallVoidMethod is replaced with CallVoidMethodA as it's unsafe on 32bit and
|
||||
// causes crashes https://github.com/facebook/react-native/issues/51628
|
||||
env->CallVoidMethodA(instance_.get(), cachedMethodId, args);
|
||||
FACEBOOK_JNI_THROW_PENDING_EXCEPTION();
|
||||
}
|
||||
|
||||
|
||||
@@ -242,8 +242,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
|
||||
}
|
||||
|
||||
if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
|
||||
// Do not throw any error to match web spec
|
||||
return timerIndex_++;
|
||||
// Do not throw any error to match web spec; instead return 0, an
|
||||
// invalid timer id
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto callback = args[0].getObject(rt).getFunction(rt);
|
||||
@@ -300,8 +301,9 @@ void TimerManager::attachGlobals(jsi::Runtime& runtime) {
|
||||
}
|
||||
|
||||
if (!args[0].isObject() || !args[0].asObject(rt).isFunction(rt)) {
|
||||
throw jsi::JSError(
|
||||
rt, "The first argument to setInterval must be a function.");
|
||||
// Do not throw any error to match web spec; instead return 0, an
|
||||
// invalid timer id
|
||||
return 0;
|
||||
}
|
||||
auto callback = args[0].getObject(rt).getFunction(rt);
|
||||
auto delay = count > 1
|
||||
|
||||
@@ -93,7 +93,9 @@ class TimerManager {
|
||||
|
||||
// Each timeout that is registered on this queue gets a sequential id. This
|
||||
// is the global count from which those are assigned.
|
||||
TimerHandle timerIndex_{0};
|
||||
// As per WHATWG HTML 8.6.1 (Timers) ids must be greater than zero, i.e. start
|
||||
// at 1
|
||||
TimerHandle timerIndex_{1};
|
||||
|
||||
// The React Native microtask queue is used to back public APIs including
|
||||
// `queueMicrotask`, `clearImmediate`, and `setImmediate` (which is used by
|
||||
|
||||
@@ -267,7 +267,9 @@ TEST_F(ReactInstanceTest, testSetTimeoutWithoutDelay) {
|
||||
EXPECT_CALL(
|
||||
*mockRegistry_,
|
||||
createTimer(_, 0)); // If delay is not provided, it should use 0
|
||||
eval("setTimeout(() => {});");
|
||||
auto val = eval("setTimeout(() => {});");
|
||||
expectNoError();
|
||||
EXPECT_EQ(val.asNumber(), 1); // First timer id should start at 1
|
||||
}
|
||||
|
||||
TEST_F(ReactInstanceTest, testSetTimeoutWithPassThroughArgs) {
|
||||
@@ -299,8 +301,9 @@ TEST_F(ReactInstanceTest, testSetTimeoutWithInvalidArgs) {
|
||||
getErrorMessage("setTimeout();"),
|
||||
"setTimeout must be called with at least one argument (the function to call).");
|
||||
|
||||
eval("setTimeout('invalid');");
|
||||
auto val = eval("setTimeout('invalid')");
|
||||
expectNoError();
|
||||
EXPECT_EQ(val.asNumber(), 0);
|
||||
|
||||
eval("setTimeout(() => {}, 'invalid');");
|
||||
expectNoError();
|
||||
@@ -417,9 +420,10 @@ TEST_F(ReactInstanceTest, testSetIntervalWithInvalidArgs) {
|
||||
EXPECT_EQ(
|
||||
getErrorMessage("setInterval();"),
|
||||
"setInterval must be called with at least one argument (the function to call).");
|
||||
EXPECT_EQ(
|
||||
getErrorMessage("setInterval('invalid', 100);"),
|
||||
"The first argument to setInterval must be a function.");
|
||||
|
||||
auto val = eval("setInterval('invalid', 100)");
|
||||
expectNoError();
|
||||
EXPECT_EQ(val.asNumber(), 0);
|
||||
}
|
||||
|
||||
TEST_F(ReactInstanceTest, testClearInterval) {
|
||||
|
||||
@@ -106,6 +106,7 @@ export type {
|
||||
SectionListProps,
|
||||
SectionListRenderItem,
|
||||
SectionListRenderItemInfo,
|
||||
SectionListData,
|
||||
} from './Libraries/Lists/SectionList';
|
||||
export {default as SectionList} from './Libraries/Lists/SectionList';
|
||||
|
||||
|
||||
Vendored
+1
@@ -14,6 +14,7 @@ module.exports = {
|
||||
defaultPlatform: 'ios',
|
||||
platforms: ['android', 'ios', 'native'],
|
||||
},
|
||||
resolver: require.resolve('./jest/resolver.js'),
|
||||
transform: {
|
||||
'^.+\\.(js|ts|tsx)$': 'babel-jest',
|
||||
'^.+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$': require.resolve(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user