Compare commits

..
Author SHA1 Message Date
Devmate Bot da9ee9eb24 xplat/js/react-native-github/packages/react-native/ReactCommon/react/utils/TemplateStringLiteral.h
Reviewed By: rshest

Differential Revision: D82428779
2025-09-18 03:06:35 -07:00
Alex Hunt 6ef351b3ce Move trace event handling into NetworkReporter (#53776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53776

Refactor and improve how we emit CDP trace events for network requests.

Key changes:
- Split up `PerformanceTracer` methods into discrete trace events.
- Move event calls out of `PerformanceEntryReporter` (upwards) into `NetworkReporter`. This now:
    - Aligns better with the matching source `NetworkReporter` events.
    - Removes metadata pieces from `PerformanceEntryReporter` that weren't part of the Web `PerformanceResourceTiming` API.
- Populate additional fields on `ResourceReceiveResponse`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82433225

fbshipit-source-id: 4fce219f0c86a7257b8df250ef9f2b4ec8bd8de3
2025-09-18 03:01:22 -07:00
Jakub Piasecki 674fb77d93 Update coordinates for remote artifacts of Hermes V1 (#53822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53822

Changelog: [GENERAL][FIXED] - Fixed coordinates for Hermes V1 artifacts

Reviewed By: cortinico

Differential Revision: D82639319

fbshipit-source-id: becfab3248f2314af97549eb94feb27b19f5d1af
2025-09-18 01:26:08 -07:00
Devan Buggay 14458d8699 Add focus/blur commands to View (#53828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53828

Adds focus and blur commands to Android views.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82644681

fbshipit-source-id: 96fa6370e177c91742d285b0b158b77447d105f6
2025-09-18 00:36:55 -07:00
Devan Buggay 2945fa6e0e Hook up focus/blur events (#53827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53827

Hook up focus/blur events to view.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146291

fbshipit-source-id: 3cb90d22c00d067099c4c6fac734f27030d87639
2025-09-18 00:36:55 -07:00
Devan Buggay 07b5802ee5 focus/blur event emission (#53826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53826

Wires up focus/blur events to the base event emitter, gated by enabledImperativeFocus feature flag.

https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146275

fbshipit-source-id: 4b7bb1336f74bb0de2d7ecf0737dd63067bd558f
2025-09-18 00:36:55 -07:00
Devan Buggay 3e5838086f Add focus/blur commands to View (#53825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53825

Adds focus/blur commands to View on iOS.
https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0#heading=h.azm4b33t75uk

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146249

fbshipit-source-id: 582f448f4d7525560ef74a23c0762e86d74550d4
2025-09-18 00:36:55 -07:00
Devan Buggay 596dece4c0 enableImperativeFocus feature flag (#53824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53824

Creates a new feature flag to control focus/blur commands and event emissions for arbitrary views https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0#heading=h.azm4b33t75uk

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D82146210

fbshipit-source-id: 59f3e6c8740b0c006f8930541205aa15192a9f59
2025-09-18 00:36:55 -07:00
Sam Zhou 4d2e38edd9 Deploy 0.283.0 to xplat (#53820)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53820

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D82636194

fbshipit-source-id: 620016043bed481e43d0d4216280517c2890bfd7
2025-09-17 09:29:52 -07:00
React Native Bot 926af3bc36 Add changelog for v0.82.0-rc.3 (#53813)
Summary:
Add Changelog for 0.82.0-rc.3

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.3

Pull Request resolved: https://github.com/facebook/react-native/pull/53813

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D82628336

Pulled By: vzaidman

fbshipit-source-id: 2ade8a48981a70e571e7a8db0e15af0c722f82ba
2025-09-17 06:03:11 -07:00
Vitali Zaidman de4e01bcc6 add the nodejs type for process.memoryUsage.rss() (#53805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53805

Changelog: [Internal]

https://nodejs.org/docs/latest-v24.x/api/process.html#processmemoryusagerss

Reviewed By: huntie

Differential Revision: D82550739

fbshipit-source-id: 11026fb82608e004b10426776592f22e67eb0720
2025-09-17 01:24:59 -07:00
Marco Wang 7d73d39535 Deploy 0.282.0 to xplat (#53810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53810

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D82597378

fbshipit-source-id: 40d601956d9f69ec8d68a2c324bb3449ee27c931
2025-09-16 23:32:23 -07:00
Eric Rozell eba38b831c Fix DefaultNewArchitectureEntryPoint config validation (#53807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53807

We need to read the values off feature flags before checking them.

## Changelog
[Internal]

Reviewed By: javache

Differential Revision: D82572898

fbshipit-source-id: 09fbc09570c78b41d9c25fb03c5557e390da7cae
2025-09-16 20:20:14 -07:00
David Vacca 18cb4edfa7 Ensure legacy architecture can't be initialized in Android (#53806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53806

The Legacy architecture of React Native is not supported anymore, let's ensure nobody can initialize it anymore

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82465004

fbshipit-source-id: 099764fb59d906b11cf6ad0cc6208f56df029d19
2025-09-16 17:33:14 -07:00
Sam Zhou dadd7cdaf7 Make ref prop optional in xplat: 1/n (#53801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53801

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D82507711

fbshipit-source-id: 27c8004c0475765705a01c0b6afb274dab443a38
2025-09-16 09:10:22 -07:00
Tom Scallon 4308185b64 Allow EventEmitters to be reported as optional (#53804)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53804

## Changelog:

[General] [Fixed] - Allow `EventEmitter`s to be optional (for push safety)

Reviewed By: javache

Differential Revision: D82509571

fbshipit-source-id: 801a22b10b2709968009527130cfa890d30a4f3a
2025-09-16 08:59:12 -07:00
Nicola Corti d0d08e4554 Runtime check that NewArchitecture is enabled in DefaultNewArchitectureEntryPoint (#53780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53780

This is a commit we're going to pick in 0.82 as we want to make sure users cannot invoke `load()`
from `DefaultNewArchitectureEntryPoint` with flags that are not true,true,true.

Changelog:
[Android] [Changed] - Runtime check that NewArchitecture is enabled in DefaultNewArchitectureEntryPoint

Reviewed By: mdvacca

Differential Revision: D82456975

fbshipit-source-id: 749996a3491913cfe400173608218077c3ffbc10
2025-09-16 07:30:55 -07:00
Nicola Corti 4858a0f469 Mark ReactTextInlineImageShadowNode as @LegacyArchitecture (#53735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53735

This class should have been marked as LegacyArchitecture back then but was forgotten.
I'm doing it now.

Changelog:
[Internal] -

Reviewed By: javache

Differential Revision: D82219780

fbshipit-source-id: 5119b7469733d5d2d4b16e976b09231ad5f71f5f
2025-09-16 07:23:51 -07:00
Vitali Zaidman f93506fb23 Fix typo in CHANGELOG.md (#53796)
Summary:
Fix typo in CHANGELOG.md

Changelog: [INTERNAL]

Pull Request resolved: https://github.com/facebook/react-native/pull/53796

Test Plan: Fix typo in CHANGELOG.md

Reviewed By: fabriziocucci

Differential Revision: D82535096

Pulled By: vzaidman

fbshipit-source-id: fe93adf86ff48f0095312edbfce7b3ae6984198a
2025-09-16 06:49:03 -07:00
Moti Zilberman f4aef39563 Revert D82459089: Update React Native DevTools binaries
Differential Revision:
D82459089

Original commit changeset: 3ccf7a1f07da

Original Phabricator Diff: D82459089

fbshipit-source-id: 9ab8827bfb534e5236c37a8a47206f891741a8e0
2025-09-16 05:33:44 -07:00
Ruslan Lesiutin af7fc1b424 Update debugger-frontend from 5a792db...8b84a77 (#53789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53789

Changelog: [Internal] - Update `react-native/debugger-frontend` from 5a792db...8b84a77

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/5a792db1225adda206313e9bf751198a1ca7851a...8b84a77b2c82c670886ef064dfc92d6bce83e579).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [8b84a77b2](https://github.com/facebook/react-native-devtools-frontend/commit/8b84a77b2) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-09-15T17:28:39+01:00 | [fix: avoid race conditions when fetching background trace (#206)](https://github.com/facebook/react-native-devtools-frontend/commit/8b84a77b2) |
| [95bd36ce9](https://github.com/facebook/react-native-devtools-frontend/commit/95bd36ce9) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-09-15T14:45:07+01:00 | [feat: use application display name for trace title (#207)](https://github.com/facebook/react-native-devtools-frontend/commit/95bd36ce9) |

Reviewed By: huntie

Differential Revision: D82464061

fbshipit-source-id: c33db7a535a148f8316730009580aef00afe04f1
2025-09-16 05:18:00 -07:00
Zeya Peng 8d03e63265 Revert D82461457: Clean up batchingControlledByJS in NativeAnimated kotlin
Differential Revision:
D82461457

Original commit changeset: a1208720b83e

Original Phabricator Diff: D82461457

fbshipit-source-id: 99416873f66c45ccf61614d3e356e6a777bbad6b
2025-09-16 03:39:45 -07:00
77 changed files with 760 additions and 390 deletions
+1 -1
View File
@@ -98,4 +98,4 @@ untyped-import
untyped-type-import
[version]
^0.281.0
^0.283.0
+18 -2
View File
@@ -1,5 +1,21 @@
# Changelog
## v0.82.0-rc.3
### Added
- **Hermes V1:** Added a dependency on hermes-compiler ([0caf8e70d5](https://github.com/facebook/react-native/commit/0caf8e70d53f611a73ad9b55879dfe0a5f036371) by [@j-piasecki](https://github.com/j-piasecki))
### Fixed
#### Android specific
- **Hermes V1:** Changed the coordinates of hermes artifacts when using Hermes V1 ([d0fb33822d](https://github.com/facebook/react-native/commit/d0fb33822de38183895c8b3421f46966909beaf3) by [@j-piasecki](https://github.com/j-piasecki))
#### iOS specific
- **Codegen:** Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
## v0.81.3
### Fixed
@@ -80,7 +96,7 @@
### Added
- **Animated:** `Animated.CompositeAnomation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
- **Animated:** `Animated.CompositeAnimation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
- **Animated:** Allow calling createAnimatedNode without batching ([d9d9a49e18](https://github.com/facebook/react-native/commit/d9d9a49e18f3c51caa18cf7da0a1fcd62f1ecf18) by [@zeyap](https://github.com/zeyap))
- **Animated:** Allow filter usage with native animated driver. ([138d0eb01d](https://github.com/facebook/react-native/commit/138d0eb01dbe597261459a37d364d1780c3ef228) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **API:** Expose NativeComponentRegistry API as JavaScript root export ([f936780cd5](https://github.com/facebook/react-native/commit/f936780cd5c0c17797f9d2bbc8f5cee81c2eefce) by [@zhongwuzw](https://github.com/zhongwuzw))
@@ -117,7 +133,7 @@
- **AGP:** AGP to 8.12.0 ([742ef3d661](https://github.com/facebook/react-native/commit/742ef3d6615c8c1202e9f683e6127ac97d7a9e23) by [@cortinico](https://github.com/cortinico))
- **DevSupportManager:** DevSupport `openDebugger()` methods now accept a `panel: String?` param. Frameworks directly implementing `DevSupportManager` will need to adjust call signatures. ([9dba7112cf](https://github.com/facebook/react-native/commit/9dba7112cfd09b02300869a77dba3dca16f49a28) by [@huntie](https://github.com/huntie))
- **Kotlin:**Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([8ccfff9a46](https://github.com/facebook/react-native/commit/8ccfff9a46f317fd78f478c8b3f180441535d1ca) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated com.facebook.react.bridge.Arguments to Kotlin. ([2534aeaddb](https://github.com/facebook/react-native/commit/2534aeaddb0490b69dfaba6b8d316616c7e10a9c) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaConfig` to Kotlin ([4d5caef76b](https://github.com/facebook/react-native/commit/4d5caef76b83eb7e983364ecc81abb6027e5f98e) by [@mateoguzmana](https://github.com/mateoguzmana))
+10 -7
View File
@@ -3995,13 +3995,16 @@ declare class Process extends events$EventEmitter {
initgroups?: (user: number | string, extra_group: number | string) => void;
kill(pid: number, signal?: string | number): void;
mainModule: Object;
memoryUsage(): {
arrayBuffers: number,
rss: number,
heapTotal: number,
heapUsed: number,
external: number,
...
memoryUsage: {
(): {
arrayBuffers: number,
rss: number,
heapTotal: number,
heapUsed: number,
external: number,
...
},
rss: () => number,
};
nextTick: <T>(cb: (...T) => mixed, ...T) => void;
pid: number;
+1 -1
View File
@@ -86,7 +86,7 @@
"eslint-plugin-relay": "^1.8.3",
"fb-dotslash": "0.5.8",
"flow-api-translator": "0.32.0",
"flow-bin": "^0.281.0",
"flow-bin": "^0.283.0",
"glob": "^7.1.1",
"hermes-eslint": "0.32.0",
"hermes-transform": "0.32.0",
+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<0b54f75686e4893a5444839bf621a317>>
Git revision: 5a792db1225adda206313e9bf751198a1ca7851a
@generated SignedSource<<d090ed9a9e781c82884f22944254ed65>>
Git revision: 8b84a77b2c82c670886ef064dfc92d6bce83e579
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebook/react-native-devtools-frontend
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,71 +1,71 @@
#!/usr/bin/env dotslash
// @generated SignedSource<<9df662721aea6e3774a8677e2a6065e4>>
// @generated SignedSource<<e93d55b5e28943e44271f5d3738083e0>>
{
"name": "React Native DevTools",
"platforms": {
"linux-aarch64": {
"size": 116056584,
"size": 116060647,
"hash": "sha256",
"digest": "fac3912f10e3c373c874be6c4696f11e05cbaa754c116db6ea72189afae5efe6",
"digest": "4352f1c9848ca919101ec628bd08b87a72a828d1ab55fa43a02098329fa452fa",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPdlYV_w4y_wxd5Rs8c_F-soLMbY1zwXJjD-JM4TkOtOELyxZGyreTb6dTehp_X6e3qVFZUT05ETRs0MbvqYr4mqdb6dkG9DqNQEVv3TBoHwl7TYSygtHJEs3gXTAtMLYEKW9xXODJlVF-9II7fdTdHU7x7Pyf6NR6S3nv7sKUVD-zKpxF50L2TwUQ"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQM24LW0nPZRk0ypuIG9prz_72YjBJNcVlGSIEpO4zdlLXgw4dFNodH7MKg9eKNTnx7wrVDDBNACrnEPt_OfXOjZyZsV9Oaqu0-vNFRdlEyis4YqmpqGLtz3LvD-9R6fzcWxJI9zrhdPvOvlXP-3Syt1UNITaxXDVqIwAAYpCaAh0oLpupAFCc2yvYw"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-arm64/React Native DevTools"
},
"linux-x86_64": {
"size": 115929093,
"size": 115930333,
"hash": "sha256",
"digest": "06bbaeb62ae2e0081d184eba42b9f15be0d0b3f4901142b08a8a1430ff83e722",
"digest": "11c7b07942928a6301b07fbf2bc77ce1229b2a52891f23541cdd9858b5250e64",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPENbrxrg0RF_TiyxSY_YVYqC1UfRKj_bMfKb3qHUsIhBlya8n3FkbfJqTXTNdqL4riFRulXS5ecXZprtvk_9kao-zY59r3kiTRwobzF0jnjM507_9UOnEHWzG5ZJYzQyOtS3kQmT0HwZabVj9qw38OB9mk-MPVCZIPZay2PRnIThBzpKDoOOP9"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQNDwm7HZRhtNxHqMr1FfSb0afHFGrn1OHxH0gOiggrLrht9QRUgJ3GG5jj7huhQzMRogE-LCMsnxh1ioOZks-YYX4KRt6Kj1-whdWsGFc7lBhPOpk1ssbYFGN1NNyuyFRmH-3nCY3lBC4AmbCUkbDTUeCi9DidCtJeyc73CZJEu7M62rIzxR2yV"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-x64/React Native DevTools"
},
"macos-aarch64": {
"size": 110891603,
"size": 110891041,
"hash": "sha256",
"digest": "eeb9cc1399c0c38c429848dbf622f1b46e88d7d97788dcdc4c30a9fcce37705c",
"digest": "3cbe8b1b3d17e433347f1601435bb9a6cb758528a5c176a66fc52d9977223175",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN9bd7nbXi-uF_MooJEiUL2jJVifMqgQxZ236aqbSdiJe5Uzjud5ANf0LDAl8GDVVRShd6x4B-gsZ-qRowH0qJikoGatQIkBgyzp4i8ors52etGOIIwdAxdNIng5Vtp441j2_N__btkJqlHcMMbbqvO8fg9oeYTlhMpOx3MLLWXIlG7ix5IFUDiYChf"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOmC2cqqSv4OrSJKJroYVg_NE8OE4O73AXqY7wXiYqiWQVkDt0Xnyw3ZeUpQT_Qb0-OoT5F8REKoFrB6eqwat8Ovkyina30peYTTwNUzmwnnGQEg7J0fOHNxLF4dkmU1FagXtsoWgex4dKgsK_VpcMsHj3Vp7diomkYvWBVTf_gPVEseYSN9oKq92qa"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"macos-x86_64": {
"size": 117770388,
"size": 117766158,
"hash": "sha256",
"digest": "a65e446e526502b267cbe6800ae031e4e1b5b0aca21412152a66ffe1d3a29410",
"digest": "6fb79bc2ba3008401b4c9c128248657b95b98581ccde60f8fadb622163779775",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN29ukKLZS48QcCU-gms06YFnG-fxxDfrWTup-Z6KoIAP-QEu3sFzrpqeZz4g-jFsh3o-IIoHJsdbu4a2U7ROjPfWGguGJrPK8fdc3iV67Qw1_VAPU13dm0dI1DbSY50ah05wh43jdBG3LGCAYYJ-W8_mZMC3HqM2v-8KVd-DoPT4hOh1s9CCFgEQ"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMMtGn-YGdfLfTVWC8zbQkQx65Asq6iArKt1t__cjZ8UY_s6-sX5XBHr8k1SaexAO21dFZENQVZ1jW_wn_gJ9ENvosQDG1KfWMViKsHli0xRzZ1HVsgPIj_KVXe907QZwwtJf2XhgH0HT8dfH-AQdDcd0_TB5DFUwOsHzhH0nBrHet7YFkbJtPTaA"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"windows-x86_64": {
"size": 125526370,
"size": 125527537,
"hash": "sha256",
"digest": "26b190c0f85249dee91999e020b8fe7ffd5c007458a2103ed3822558861dbe87",
"digest": "579a5b0944c51c3b1b541ad5af66c1ffedf93cae2a891ecdf88cb7219fd9b096",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQO0mdIJx1eYiSDJNiAZ2soaeECILayWnvOeiey-fpS4ydDTreAMfwL4QZ5GZo4-AsGwOXCSdF3hBMM2ufnvw6BDFg5UEiTc4DALJu7o6YBBG4wlVZbI-2kkaXd7u8RhBQPjmhsdcX3sDmCGmSr3WK9EkTRKStE2lb6ilOn-969h4dYWekwUUCSX"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOQ3E8lBXqdVHbDPyVb5AOQMrDWjFrFV8fnLLBsygQvLWdpu6ixyG9PgWdwpi5jM-XcDdCHkhBdhaq-5dwT_tgRWKCAMsEBoAIUk0Xg77mGyHG2VF7bNfQ2qFBMuObrsTmrKy1nJ-UFDDm29pJD4GkFQW5NesiBwndJj8t3B8Ur8cczh_XR8rF5"
}
],
"format": "tar.gz",
@@ -191,6 +191,14 @@ internal object DependencyUtils {
"The hermes-android dependency was modified to use the correct Maven group.",
)
)
} else if (hermesV1Enabled) {
dependencySubstitution.add(
Triple(
"com.facebook.react:hermes-android",
hermesVersionString,
"The hermes-android dependency was modified to use Hermes V1.",
)
)
}
return dependencySubstitution
}
@@ -242,7 +242,7 @@ internal fun readPackageJsonFile(
return packageJson?.let { JsonUtils.fromPackageJson(it) }
}
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/%OS-BIN%/"
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/hermesc/%OS-BIN%/"
private const val HERMESC_IN_REACT_NATIVE_DIR = "node_modules/react-native/sdks/hermesc/%OS-BIN%/"
private const val HERMESC_BUILT_FROM_SOURCE_DIR =
"node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/bin/"
@@ -165,8 +165,8 @@ class PathUtilsTest {
@Test
@WithOs(OS.MAC)
fun detectOSAwareHermesCommand_withHermesV1Enabled() {
tempFolder.newFolder("node_modules/hermes-compiler/osx-bin/")
val expected = tempFolder.newFile("node_modules/hermes-compiler/osx-bin/hermesc")
tempFolder.newFolder("node_modules/hermes-compiler/hermesc/osx-bin/")
val expected = tempFolder.newFile("node_modules/hermes-compiler/hermesc/osx-bin/hermesc")
assertThat(detectOSAwareHermesCommand(tempFolder.root, "", hermesV1Enabled = true))
.isEqualTo(expected.toString())
@@ -540,7 +540,7 @@ function buildEventEmitterSchema(
return {
name: eventemitterName,
optional: false,
optional: Boolean(property.optional),
typeAnnotation: {
type: 'EventEmitterTypeAnnotation',
typeAnnotation: eventTypeAnnotation,
@@ -44,7 +44,7 @@ interface Instance extends React.ElementRef<typeof Animated.View> {
}
const ScrollViewStickyHeader: component(
ref: React.RefSetter<Instance>,
ref?: React.RefSetter<Instance>,
...props: ScrollViewStickyHeaderProps
) = function ScrollViewStickyHeader({
ref: forwardedRef,
@@ -282,7 +282,7 @@ const ScrollViewStickyHeader: component(
const passthroughAnimatedPropExplicitValues =
isFabric && translateY != null
? {
style: {transform: [{translateY: translateY}]},
style: {transform: [{translateY}]},
}
: null;
@@ -303,20 +303,20 @@ const ScrollViewStickyHeader: component(
passthroughAnimatedPropExplicitValues
}>
{cloneElement(child, {
style: styles.fill, // We transfer the child style to the wrapper.
onLayout: undefined, // we call this manually through our this._onLayout
style: styles.fill, // We transfer the child style to the wrapper.
})}
</Animated.View>
);
};
const styles = StyleSheet.create({
header: {
zIndex: 10,
},
fill: {
flex: 1,
},
header: {
zIndex: 10,
},
});
export default ScrollViewStickyHeader;
@@ -47,15 +47,14 @@ class TouchableBounce extends React.Component<
_createPressabilityConfig(): PressabilityConfig {
return {
android_disableSound: this.props.touchSoundDisabled,
cancelable: !this.props.rejectResponderTermination,
disabled: this.props.disabled,
hitSlop: this.props.hitSlop,
delayLongPress: this.props.delayLongPress,
delayPressIn: this.props.delayPressIn,
delayPressOut: this.props.delayPressOut,
disabled: this.props.disabled,
hitSlop: this.props.hitSlop,
minPressDuration: 0,
pressRectOffset: this.props.pressRetentionOffset,
android_disableSound: this.props.touchSoundDisabled,
onBlur: event => {
if (Platform.isTV) {
this._bounceTo(1, 0.4, 0);
@@ -113,6 +112,7 @@ class TouchableBounce extends React.Component<
this.props.onPressOut(event);
}
},
pressRectOffset: this.props.pressRetentionOffset,
};
}
@@ -123,10 +123,10 @@ class TouchableBounce extends React.Component<
callback?: ?() => void,
) {
Animated.spring(this.state.scale, {
toValue,
velocity,
bounciness,
toValue,
useNativeDriver: true,
velocity,
}).start(callback);
}
@@ -230,6 +230,6 @@ export default (function TouchableBounceWrapper({
}) {
return <TouchableBounce {...props} hostRef={hostRef} />;
} as component(
ref: React.RefSetter<mixed>,
ref?: React.RefSetter<mixed>,
...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
));
@@ -21,12 +21,14 @@ const ViewNativeComponent: HostComponent<Props> =
}));
interface NativeCommands {
+focus: () => void;
+blur: () => void;
+hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
+setPressed: (viewRef: HostInstance, pressed: boolean) => void;
}
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['hotspotUpdate', 'setPressed'],
supportedCommands: ['focus', 'blur', 'hotspotUpdate', 'setPressed'],
});
/**
+21 -21
View File
@@ -39,6 +39,24 @@ function DebuggingOverlay({
useImperativeHandle(
ref,
() => ({
clearElementsHighlight() {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.clearElementsHighlights(nativeComponentRef.current);
}
},
highlightElements(elements) {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.highlightElements(nativeComponentRef.current, elements);
}
},
highlightTraceUpdates(updates) {
if (!isNativeComponentReady) {
return;
@@ -55,24 +73,6 @@ function DebuggingOverlay({
);
}
},
highlightElements(elements) {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.highlightElements(nativeComponentRef.current, elements);
}
},
clearElementsHighlight() {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.clearElementsHighlights(nativeComponentRef.current);
}
},
}),
[],
);
@@ -95,14 +95,14 @@ function DebuggingOverlay({
const styles = StyleSheet.create({
overlay: {
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
top: 0,
},
});
export default DebuggingOverlay as component(
ref: React.RefSetter<DebuggingOverlayHandle>,
ref?: React.RefSetter<DebuggingOverlayHandle>,
);
+1 -1
View File
@@ -161,7 +161,7 @@ let reactJsInspectorTracing = RNTarget(
name: .reactJsInspectorTracing,
path: "ReactCommon/jsinspector-modern/tracing",
excludedPaths: ["tests"],
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactOSCompat]
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .reactJsInspectorNetwork, .jsi, .reactOSCompat]
)
/// React-jsinspectornetwork.podspec
@@ -1540,6 +1540,62 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
}
}
- (BOOL)canBecomeFirstResponder
{
return YES;
}
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
{
if ([commandName isEqualToString:@"focus"]) {
[self focus];
return;
}
if ([commandName isEqualToString:@"blur"]) {
[self blur];
return;
}
}
- (void)focus
{
[self becomeFirstResponder];
}
- (void)blur
{
[self resignFirstResponder];
}
#pragma mark - Focus Events
- (BOOL)becomeFirstResponder
{
if (![super becomeFirstResponder]) {
return NO;
}
if (_eventEmitter && ReactNativeFeatureFlags::enableImperativeFocus()) {
_eventEmitter->onFocus();
}
return YES;
}
- (BOOL)resignFirstResponder
{
if (![super resignFirstResponder]) {
return NO;
}
if (_eventEmitter && ReactNativeFeatureFlags::enableImperativeFocus()) {
_eventEmitter->onBlur();
}
return YES;
}
@end
#ifdef __cplusplus
@@ -328,6 +328,15 @@ public class ReactInstanceManager {
}
registerCxxErrorHandlerFunc();
// Using `if (true)` just to prevent tests / lint errors.
if (true) {
// Legacy architecture of React Native is deprecated and can't be initialized anymore.
// More details on:
// https://github.com/react-native-community/discussions-and-proposals/blob/nc/legacy-arch-removal/proposals/0929-legacy-architecture-removal.md
throw new UnsupportedOperationException(
"ReactInstanceManager.createReactContext is unsupported.");
}
}
private ReactInstanceDevHelper createDevHelperInterface() {
@@ -1446,6 +1455,7 @@ public class ReactInstanceManager {
*/
private ReactApplicationContext createReactContext(
JavaScriptExecutor jsExecutor, JSBundleLoader jsBundleLoader) {
FLog.d(ReactConstants.TAG, "ReactInstanceManager.createReactContext()");
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START, jsExecutor.getName());
@@ -196,9 +196,11 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
private val nodesManagerRef = AtomicReference<NativeAnimatedNodesManager?>()
@Volatile private var currentFrameNumber: Long = 0
private var batchingControlledByJS = false // TODO T71377544: delete
@Volatile private var currentBatchNumber: Long = 0 // frame number at last operations dispatch
@Volatile private var currentFrameNumber: Long = 0 // TODO T71377544: delete
@Volatile private var currentBatchNumber: Long = 0
private var initializedForFabric = false
private var initializedForNonFabric = false
@@ -280,19 +282,22 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
var batchNumber = currentBatchNumber - 1
// The problem we're trying to solve here: we could be in the middle of queueing
// a batch of related animation operations when Fabric flushes a batch of MountItems.
// It's visually bad if we execute half of the animation ops and then wait another frame
// (or more) to execute the rest.
// See mFrameNumber. If the dispatchedFrameNumber drifts too far - that
// is, if no MountItems are scheduled for a while, which can happen if a tree
// is committed but there are no changes - bring these counts back in sync and
// execute any queued operations. This number is arbitrary, but we want it low
// enough that the user shouldn't be able to see this delay in most cases.
currentFrameNumber++
if ((currentFrameNumber - currentBatchNumber) > 2) {
currentBatchNumber = currentFrameNumber
batchNumber = currentBatchNumber
// TODO T71377544: delete this when the JS method is confirmed safe
if (!batchingControlledByJS) {
// The problem we're trying to solve here: we could be in the middle of queueing
// a batch of related animation operations when Fabric flushes a batch of MountItems.
// It's visually bad if we execute half of the animation ops and then wait another frame
// (or more) to execute the rest.
// See mFrameNumber. If the dispatchedFrameNumber drifts too far - that
// is, if no MountItems are scheduled for a while, which can happen if a tree
// is committed but there are no changes - bring these counts back in sync and
// execute any queued operations. This number is arbitrary, but we want it low
// enough that the user shouldn't be able to see this delay in most cases.
currentFrameNumber++
if ((currentFrameNumber - currentBatchNumber) > 2) {
currentBatchNumber = currentFrameNumber
batchNumber = currentBatchNumber
}
}
preOperations.executeBatch(batchNumber, nodesManager)
@@ -479,14 +484,14 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
}
}
@Suppress("DEPRECATION")
override fun startOperationBatch() {
// no-op
batchingControlledByJS = true
currentBatchNumber++
}
@Suppress("DEPRECATION")
override fun finishOperationBatch() {
// no-op
batchingControlledByJS = false
currentBatchNumber++
}
override fun createAnimatedNode(tagDouble: Double, config: ReadableMap) {
@@ -774,8 +774,12 @@ public class NativeAnimatedNodesManager(
("Looks like animated nodes graph has ${reason}, there are $activeNodesCount but toposort visited only $updatedNodesCount")
)
if (eventListenerInitializedForFabric && cyclesDetected == 0) {
// TODO T71377544: investigate these SoftExceptions and see if we can remove entirely
// or fix the root cause
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
} else if (eventListenerInitializedForFabric) {
// TODO T71377544: investigate these SoftExceptions and see if we can remove entirely
// or fix the root cause
ReactSoftExceptionLogger.logSoftException(TAG, ReactNoCrashSoftException(ex))
} else {
throw ex
@@ -125,6 +125,12 @@ public object DefaultNewArchitectureEntryPoint {
privateConcurrentReactEnabled = featureFlags.enableFabricRenderer()
privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture()
val (isValid, errorMessage) =
isConfigurationValid(turboModulesEnabled, fabricEnabled, bridgelessEnabled)
if (!isValid) {
error(errorMessage)
}
DefaultSoLoader.maybeLoadSoLibrary()
}
@@ -158,13 +164,13 @@ public object DefaultNewArchitectureEntryPoint {
fabricEnabled: Boolean,
bridgelessEnabled: Boolean,
): Pair<Boolean, String> =
when {
fabricEnabled && !turboModulesEnabled ->
false to
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
bridgelessEnabled && (!turboModulesEnabled || !fabricEnabled) ->
false to
"bridgelessEnabled=true requires (turboModulesEnabled=true AND fabricEnabled=true) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
else -> true to ""
if (!turboModulesEnabled || !fabricEnabled || !bridgelessEnabled) {
false to
"You cannot load React Native with the New Architecture disabled. " +
"Please use DefaultNewArchitectureEntryPoint.load() instead of " +
"DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=$turboModulesEnabled, " +
"fabricEnabled=$fabricEnabled, bridgelessEnabled=$bridgelessEnabled)"
} else {
true to ""
}
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f089964c958dfcac00f83c3371ccbefc>>
* @generated SignedSource<<ce122427070db337420728a1028bc2b6>>
*/
/**
@@ -192,6 +192,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = accessor.enableImmediateUpdateModeForContentOffsetChanges()
/**
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
*/
@JvmStatic
public fun enableImperativeFocus(): Boolean = accessor.enableImperativeFocus()
/**
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<912dec895495052328e7e52b94a6738a>>
* @generated SignedSource<<e7581ab264bca8b059723bd7bd788790>>
*/
/**
@@ -47,6 +47,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
private var enableImperativeFocusCache: Boolean? = null
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
@@ -337,6 +338,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun enableImperativeFocus(): Boolean {
var cached = enableImperativeFocusCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.enableImperativeFocus()
enableImperativeFocusCache = cached
}
return cached
}
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean {
var cached = enableInteropViewManagerClassLookUpOptimizationIOSCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ba1e53d93b9fdaf298a034543bc44a57>>
* @generated SignedSource<<d73f5df2130479a4cd1000dc76b15d1b>>
*/
/**
@@ -82,6 +82,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
@DoNotStrip @JvmStatic public external fun enableImperativeFocus(): Boolean
@DoNotStrip @JvmStatic public external fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnAndroid(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<7601cbcde75ff19ef0fe67f6faef2549>>
* @generated SignedSource<<4fa15189361a6c92bdd44bafc9356167>>
*/
/**
@@ -77,6 +77,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = false
override fun enableImperativeFocus(): Boolean = false
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean = false
override fun enableLayoutAnimationsOnAndroid(): Boolean = false
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3a13f8e35423b634ed4ef46fbac3c1e9>>
* @generated SignedSource<<962c60d1761b0a1f4945b44767aa7b02>>
*/
/**
@@ -51,6 +51,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableImagePrefetchingAndroidCache: Boolean? = null
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
private var enableImperativeFocusCache: Boolean? = null
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
@@ -368,6 +369,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun enableImperativeFocus(): Boolean {
var cached = enableImperativeFocusCache
if (cached == null) {
cached = currentProvider.enableImperativeFocus()
accessedFeatureFlags.add("enableImperativeFocus")
enableImperativeFocusCache = cached
}
return cached
}
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean {
var cached = enableInteropViewManagerClassLookUpOptimizationIOSCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<143b568248e68033efaefc3f178ff6db>>
* @generated SignedSource<<f9f3dee3dde2f7f6f851ce4525a4ebec>>
*/
/**
@@ -77,6 +77,8 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
@DoNotStrip public fun enableImperativeFocus(): Boolean
@DoNotStrip public fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
@DoNotStrip public fun enableLayoutAnimationsOnAndroid(): Boolean
@@ -34,7 +34,6 @@ import com.facebook.react.views.text.ReactTypefaceUtils.parseFontStyle
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontVariant
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontWeight
import com.facebook.react.views.text.TextTransform.Companion.apply
import com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan
import com.facebook.react.views.text.internal.span.CustomStyleSpan
@@ -523,6 +522,7 @@ public constructor(
while (i < length) {
val child: ReactShadowNode<*> = textShadowNode.getChildAt(i)
@Suppress("DEPRECATION")
if (child is ReactRawTextShadowNode) {
child.text?.let { sb.append(apply(it, textAttributes.textTransform)) }
} else if (child is ReactBaseTextShadowNode) {
@@ -535,7 +535,7 @@ public constructor(
inlineViews,
sb.length,
)
} else if (child is ReactTextInlineImageShadowNode) {
} else if (child is com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode) {
// We make the image take up 1 character in the span and put a corresponding character
// into the text so that the image doesn't run over any following text.
sb.append(INLINE_VIEW_PLACEHOLDER)
@@ -5,6 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/
@file:Suppress("DEPRECATION")
package com.facebook.react.views.text.frescosupport
import android.content.Context
@@ -9,11 +9,18 @@
package com.facebook.react.views.text.internal
import com.facebook.react.common.annotations.internal.LegacyArchitecture
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogLevel
import com.facebook.react.uimanager.LayoutShadowNode
import com.facebook.react.views.text.internal.span.TextInlineImageSpan
import com.facebook.yoga.YogaNode
/** Base class for [YogaNode]s that represent inline images. */
@LegacyArchitecture(logLevel = LegacyArchitectureLogLevel.ERROR)
@Deprecated(
message = "This class is part of Legacy Architecture and will be removed in a future release",
level = DeprecationLevel.WARNING,
)
internal abstract class ReactTextInlineImageShadowNode : LayoutShadowNode() {
/**
* Build a [TextInlineImageSpan] from this node. This will be added to the TextView in place of
@@ -416,6 +416,14 @@ public open class ReactViewGroup public constructor(context: Context?) :
updateClippingToRect(clippingRect, excludedViews)
}
internal fun requestFocusFromJS() {
super.requestFocus(FOCUS_DOWN, null)
}
internal fun clearFocusFromJS() {
super.clearFocus()
}
override fun endViewTransition(view: View) {
super.endViewTransition(view)
childrenRemovedWhileTransitioning?.remove(view.id)
@@ -404,6 +404,8 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
when (commandId) {
HOTSPOT_UPDATE_KEY -> handleHotspotUpdate(root, args)
"setPressed" -> handleSetPressed(root, args)
"focus" -> handleFocus(root)
"blur" -> handleBlur(root)
else -> {}
}
}
@@ -428,4 +430,16 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
val y = args.getDouble(1).dpToPx()
root.drawableHotspotChanged(x, y)
}
private fun handleFocus(root: ReactViewGroup) {
if (ReactNativeFeatureFlags.enableImperativeFocus()) {
root.requestFocusFromJS()
}
}
private fun handleBlur(root: ReactViewGroup) {
if (ReactNativeFeatureFlags.enableImperativeFocus()) {
root.clearFocusFromJS()
}
}
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<92c9aa29df580c6d12faa14e60b00e4f>>
* @generated SignedSource<<de817bc06ae5ef584db08d6a094c9d03>>
*/
/**
@@ -201,6 +201,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool enableImperativeFocus() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableImperativeFocus");
return method(javaProvider_);
}
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableInteropViewManagerClassLookUpOptimizationIOS");
@@ -616,6 +622,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffs
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
}
bool JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableImperativeFocus();
}
bool JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
@@ -958,6 +969,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"enableImmediateUpdateModeForContentOffsetChanges",
JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffsetChanges),
makeNativeMethod(
"enableImperativeFocus",
JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus),
makeNativeMethod(
"enableInteropViewManagerClassLookUpOptimizationIOS",
JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<124d1378990fdd09a4d97f9103f81a6a>>
* @generated SignedSource<<f163997b1149c1f1ac1e60f273a5448f>>
*/
/**
@@ -111,6 +111,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool enableImmediateUpdateModeForContentOffsetChanges(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableImperativeFocus(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool enableInteropViewManagerClassLookUpOptimizationIOS(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -13,36 +13,48 @@ import org.junit.Test
class DefaultNewArchitectureEntryPointTest {
@Test
fun isConfigurationValid_withEverythingOff_returnsTrue() {
val (isValid, _) =
fun isConfigurationValid_withEverythingOff_returnsFalse() {
val (isValid, errorMessage) =
DefaultNewArchitectureEntryPoint.isConfigurationValid(
turboModulesEnabled = false,
fabricEnabled = false,
bridgelessEnabled = false,
)
assertThat(isValid).isTrue()
assertThat(isValid).isFalse()
assertThat(errorMessage)
.isEqualTo(
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=false, fabricEnabled=false, bridgelessEnabled=false)"
)
}
@Test
fun isConfigurationValid_withNewArchOn_returnsTrue() {
val (isValid, _) =
fun isConfigurationValid_withNewArchOnlyOn_returnsFalse() {
val (isValid, errorMessage) =
DefaultNewArchitectureEntryPoint.isConfigurationValid(
turboModulesEnabled = true,
fabricEnabled = true,
bridgelessEnabled = false,
)
assertThat(isValid).isTrue()
assertThat(isValid).isFalse()
assertThat(errorMessage)
.isEqualTo(
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=true, fabricEnabled=true, bridgelessEnabled=false)"
)
}
@Test
fun isConfigurationValid_withTurboModulesOnlyOn_returnsTrue() {
val (isValid, _) =
fun isConfigurationValid_withTurboModulesOnlyOn_returnsFalse() {
val (isValid, errorMessage) =
DefaultNewArchitectureEntryPoint.isConfigurationValid(
turboModulesEnabled = true,
fabricEnabled = false,
bridgelessEnabled = false,
)
assertThat(isValid).isTrue()
assertThat(isValid).isFalse()
assertThat(errorMessage)
.isEqualTo(
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=true, fabricEnabled=false, bridgelessEnabled=false)"
)
}
@Test
@@ -67,7 +79,7 @@ class DefaultNewArchitectureEntryPointTest {
assertThat(isValid).isFalse()
assertThat(errorMessage)
.isEqualTo(
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=false, fabricEnabled=true, bridgelessEnabled=false)"
)
}
@@ -82,7 +94,7 @@ class DefaultNewArchitectureEntryPointTest {
assertThat(isValid).isFalse()
assertThat(errorMessage)
.isEqualTo(
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=false, fabricEnabled=true, bridgelessEnabled=true)"
)
}
@@ -97,7 +109,7 @@ class DefaultNewArchitectureEntryPointTest {
assertThat(isValid).isFalse()
assertThat(errorMessage)
.isEqualTo(
"bridgelessEnabled=true requires (turboModulesEnabled=true AND fabricEnabled=true) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
"You cannot load React Native with the New Architecture disabled. Please use DefaultNewArchitectureEntryPoint.load() instead of DefaultNewArchitectureEntryPoint.load(turboModulesEnabled=true, fabricEnabled=false, bridgelessEnabled=true)"
)
}
}
@@ -357,7 +357,7 @@ class HostAgent::Impl final {
/**
* Send a simple Log.entryAdded notification with the given
* \param text You must ensure that the frontend has enabled Log
* \param text. You must ensure that the frontend has enabled Log
* notifications (using Log.enable) prior to calling this function. In Chrome
* DevTools, the message will appear in the Console tab along with regular
* console messages. The difference between Log.entryAdded and
@@ -13,13 +13,11 @@ namespace facebook::react::jsinspector_modern::cdp::network {
namespace {
folly::dynamic headersToDynamic(const std::optional<Headers>& headers) {
folly::dynamic headersToDynamic(const Headers& headers) {
folly::dynamic result = folly::dynamic::object;
if (headers) {
for (const auto& [key, value] : *headers) {
result[key] = value;
}
for (const auto& [key, value] : headers) {
result[key] = value;
}
return result;
@@ -41,14 +39,14 @@ folly::dynamic Request::toDynamic() const {
/* static */ Response Response::fromInputParams(
const std::string& url,
uint16_t status,
const std::optional<Headers>& headers,
const Headers& headers,
int encodedDataLength) {
return {
.url = url,
.status = status,
.statusText = httpReasonPhrase(status),
.headers = headers,
.mimeType = mimeTypeFromHeaders(headers.value_or(Headers())),
.mimeType = mimeTypeFromHeaders(headers),
.encodedDataLength = encodedDataLength,
};
}
@@ -24,7 +24,7 @@ using Headers = std::map<std::string, std::string>;
struct Request {
std::string url;
std::string method;
std::optional<Headers> headers;
Headers headers;
std::optional<std::string> postData;
folly::dynamic toDynamic() const;
@@ -37,7 +37,7 @@ struct Response {
std::string url;
uint16_t status;
std::string statusText;
std::optional<Headers> headers;
Headers headers;
std::string mimeType;
int encodedDataLength;
@@ -48,7 +48,7 @@ struct Response {
static Response fromInputParams(
const std::string& url,
uint16_t status,
const std::optional<Headers>& headers,
const Headers& headers,
int encodedDataLength);
folly::dynamic toDynamic() const;
@@ -12,6 +12,8 @@
namespace facebook::react::jsinspector_modern {
using Headers = std::map<std::string, std::string>;
/**
* Get the HTTP reason phrase for a given status code (RFC 9110).
*/
@@ -21,7 +23,6 @@ std::string httpReasonPhrase(uint16_t status);
* Get the MIME type for a response based on the 'Content-Type' header. If
* the header is not present, returns 'application/octet-stream'.
*/
std::string mimeTypeFromHeaders(
const std::map<std::string, std::string>& headers);
std::string mimeTypeFromHeaders(const Headers& headers);
} // namespace facebook::react::jsinspector_modern
@@ -18,6 +18,7 @@ target_include_directories(jsinspector_tracing PUBLIC ${REACT_COMMON_DIR})
target_link_libraries(jsinspector_tracing
folly_runtime
jsinspector_network
oscompat
react_timing
)
@@ -9,6 +9,8 @@
#include "Timing.h"
#include "TraceEventSerializer.h"
#include <jsinspector-modern/network/CdpNetwork.h>
#include <jsinspector-modern/network/HttpUtils.h>
#include <oscompat/OSCompat.h>
#include <react/timing/primitives.h>
@@ -16,9 +18,12 @@
#include <mutex>
using namespace facebook::react;
namespace facebook::react::jsinspector_modern::tracing {
namespace {
/**
* Instead of validating that the indicated duration is positive, we can ensure
* the value is sensible (less than 1 seccond doesn't make much sense).
@@ -31,6 +36,7 @@ ThreadId getCurrentThreadId() {
oscompat::getCurrentThreadId();
return CURRENT_THREAD_ID;
}
} // namespace
PerformanceTracer& PerformanceTracer::getInstance() {
@@ -232,15 +238,9 @@ void PerformanceTracer::reportEventLoopMicrotasks(
});
}
void PerformanceTracer::reportResourceTiming(
const std::string& requestId,
const std::string& url,
HighResTimeStamp fetchStart,
HighResTimeStamp responseStart,
HighResTimeStamp responseEnd,
int statusCode,
const std::string& requestMethod,
const std::string& resourceType) {
void PerformanceTracer::reportResourceWillSendRequest(
const std::string& devtoolsRequestId,
HighResTimeStamp start) {
if (!tracingAtomic_) {
return;
}
@@ -251,27 +251,82 @@ void PerformanceTracer::reportResourceTiming(
}
enqueueEvent(PerformanceTracerResourceWillSendRequest{
.requestId = requestId,
.start = fetchStart,
.requestId = devtoolsRequestId,
.start = start,
.threadId = getCurrentThreadId(),
});
}
void PerformanceTracer::reportResourceSendRequest(
const std::string& devtoolsRequestId,
HighResTimeStamp start,
const std::string& url,
const std::string& requestMethod,
const Headers& headers) {
if (!tracingAtomic_) {
return;
}
std::lock_guard<std::mutex> lock(mutex_);
if (!tracingAtomic_) {
return;
}
auto resourceType =
jsinspector_modern::cdp::network::resourceTypeFromMimeType(
jsinspector_modern::mimeTypeFromHeaders(headers));
enqueueEvent(PerformanceTracerResourceSendRequest{
.requestId = requestId,
.requestId = devtoolsRequestId,
.url = url,
.start = fetchStart,
.start = start,
.requestMethod = requestMethod,
.resourceType = resourceType,
.threadId = getCurrentThreadId(),
});
}
void PerformanceTracer::reportResourceReceiveResponse(
const std::string& devtoolsRequestId,
HighResTimeStamp start,
int statusCode,
const Headers& headers,
int encodedDataLength) {
if (!tracingAtomic_) {
return;
}
std::lock_guard<std::mutex> lock(mutex_);
if (!tracingAtomic_) {
return;
}
enqueueEvent(PerformanceTracerResourceReceiveResponse{
.requestId = requestId,
.start = responseStart,
.requestId = devtoolsRequestId,
.start = start,
.encodedDataLength = encodedDataLength,
.headers = headers,
.mimeType = jsinspector_modern::mimeTypeFromHeaders(headers),
.protocol = "h2",
.statusCode = statusCode,
.threadId = getCurrentThreadId(),
});
}
void PerformanceTracer::reportResourceFinish(
const std::string& devtoolsRequestId,
HighResTimeStamp start) {
if (!tracingAtomic_) {
return;
}
std::lock_guard<std::mutex> lock(mutex_);
if (!tracingAtomic_) {
return;
}
enqueueEvent(PerformanceTracerResourceFinish{
.requestId = requestId,
.start = responseEnd,
.requestId = devtoolsRequestId,
.start = start,
.threadId = getCurrentThreadId(),
});
}
@@ -567,7 +622,7 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
[&](PerformanceTracerResourceSendRequest&& event) {
folly::dynamic data =
folly::dynamic::object("initiator", folly::dynamic::object())(
"renderBlocking", "non_blocking")(
"priority", "VeryHigh")("renderBlocking", "non_blocking")(
"requestId", std::move(event.requestId))(
"requestMethod", std::move(event.requestMethod))(
"resourceType", std::move(event.resourceType))(
@@ -585,7 +640,15 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
});
},
[&](PerformanceTracerResourceReceiveResponse&& event) {
folly::dynamic data = folly::dynamic::object("protocol", "h2")(
folly::dynamic headersEntries = folly::dynamic::array;
for (const auto& [key, value] : event.headers) {
headersEntries.push_back(
folly::dynamic::object("name", key)("value", value));
}
folly::dynamic data = folly::dynamic::object(
"encodedDataLength", event.encodedDataLength)(
"headers", headersEntries)("mimeType", event.mimeType)(
"protocol", event.protocol)(
"requestId", std::move(event.requestId))(
"statusCode", event.statusCode)(
"timing", folly::dynamic::object());
@@ -15,6 +15,7 @@
#include <folly/dynamic.h>
#include <atomic>
#include <map>
#include <mutex>
#include <optional>
#include <vector>
@@ -24,6 +25,8 @@ namespace facebook::react::jsinspector_modern::tracing {
// TODO: Review how this API is integrated into jsinspector_modern (singleton
// design is copied from earlier FuseboxTracer prototype).
using Headers = std::map<std::string, std::string>;
/**
* [Experimental] An interface for logging performance trace events to the
* modern debugger server.
@@ -109,19 +112,53 @@ class PerformanceTracer {
void reportEventLoopMicrotasks(HighResTimeStamp start, HighResTimeStamp end);
/**
* Record a "ResourceSendRequest"/"ResourceFinish" event pair - a labelled
* duration in the Performance timeline Network track. If not currently
* tracing, this is a no-op.
* Record a "ResourceWillSendRequest" event. Paired with other "Resource*"
* events, renders a network request timeline in the Performance panel Network
* track.
*
* If not currently tracing, this is a no-op.
*/
void reportResourceTiming(
const std::string& requestId,
void reportResourceWillSendRequest(
const std::string& devtoolsRequestId,
HighResTimeStamp start);
/**
* Record a "ResourceSendRequest" event. Paired with other "Resource*"
* events, renders a network request timeline in the Performance panel Network
* track.
*
* If not currently tracing, this is a no-op.
*/
void reportResourceSendRequest(
const std::string& devtoolsRequestId,
HighResTimeStamp start,
const std::string& url,
HighResTimeStamp fetchStart,
HighResTimeStamp responseStart,
HighResTimeStamp responseEnd,
int statusCode,
const std::string& requestMethod,
const std::string& resourceType);
const Headers& headers);
/**
* Record a "ResourceReceiveResponse" event. Paired with other "Resource*"
* events, renders a network request timeline in the Performance panel Network
* track.
*
* If not currently tracing, this is a no-op.
*/
void reportResourceReceiveResponse(
const std::string& devtoolsRequestId,
HighResTimeStamp start,
int statusCode,
const Headers& headers,
int encodedDataLength);
/**
* Record a "ResourceFinish" event. Paired with other "Resource*" events,
* renders a network request timeline in the Performance panel Network track.
*
* If not currently tracing, this is a no-op.
*/
void reportResourceFinish(
const std::string& devtoolsRequestId,
HighResTimeStamp start);
/**
* Creates "Profile" Trace Event.
@@ -223,6 +260,10 @@ class PerformanceTracer {
struct PerformanceTracerResourceReceiveResponse {
std::string requestId;
HighResTimeStamp start;
int encodedDataLength;
Headers headers;
std::string mimeType;
std::string protocol;
int statusCode;
ThreadId threadId;
HighResTimeStamp createdAt = HighResTimeStamp::now();
@@ -43,6 +43,7 @@ Pod::Spec.new do |s|
resolve_use_frameworks(s, header_mappings_dir: "../..", module_name: module_name)
add_dependency(s, "React-jsinspectornetwork", :framework_name => 'jsinspector_modernnetwork')
s.dependency "React-oscompat"
s.dependency "React-timing"
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<42bea10b4b62a91dce8fde7674f76ceb>>
* @generated SignedSource<<50f81f60d4c2d2e08fde98f4a2d841ea>>
*/
/**
@@ -134,6 +134,10 @@ bool ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges()
return getAccessor().enableImmediateUpdateModeForContentOffsetChanges();
}
bool ReactNativeFeatureFlags::enableImperativeFocus() {
return getAccessor().enableImperativeFocus();
}
bool ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS() {
return getAccessor().enableInteropViewManagerClassLookUpOptimizationIOS();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<40421ac664927693136a8e3197e3c07c>>
* @generated SignedSource<<3446eebd26c1142fd78cd5413771569d>>
*/
/**
@@ -174,6 +174,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool enableImmediateUpdateModeForContentOffsetChanges();
/**
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
*/
RN_EXPORT static bool enableImperativeFocus();
/**
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e433f2f36d7a2852aaea2b37f671a7e1>>
* @generated SignedSource<<891375f88b3f48b324de29e31c8936cf>>
*/
/**
@@ -515,6 +515,24 @@ bool ReactNativeFeatureFlagsAccessor::enableImmediateUpdateModeForContentOffsetC
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableImperativeFocus() {
auto flagValue = enableImperativeFocus_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(27, "enableImperativeFocus");
flagValue = currentProvider_->enableImperativeFocus();
enableImperativeFocus_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimizationIOS() {
auto flagValue = enableInteropViewManagerClassLookUpOptimizationIOS_.load();
@@ -524,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimiz
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(27, "enableInteropViewManagerClassLookUpOptimizationIOS");
markFlagAsAccessed(28, "enableInteropViewManagerClassLookUpOptimizationIOS");
flagValue = currentProvider_->enableInteropViewManagerClassLookUpOptimizationIOS();
enableInteropViewManagerClassLookUpOptimizationIOS_ = flagValue;
@@ -542,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(28, "enableLayoutAnimationsOnAndroid");
markFlagAsAccessed(29, "enableLayoutAnimationsOnAndroid");
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
enableLayoutAnimationsOnAndroid_ = flagValue;
@@ -560,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(29, "enableLayoutAnimationsOnIOS");
markFlagAsAccessed(30, "enableLayoutAnimationsOnIOS");
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
enableLayoutAnimationsOnIOS_ = flagValue;
@@ -578,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMainQueueCoordinatorOnIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(30, "enableMainQueueCoordinatorOnIOS");
markFlagAsAccessed(31, "enableMainQueueCoordinatorOnIOS");
flagValue = currentProvider_->enableMainQueueCoordinatorOnIOS();
enableMainQueueCoordinatorOnIOS_ = flagValue;
@@ -596,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::enableModuleArgumentNSNullConversionIOS()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(31, "enableModuleArgumentNSNullConversionIOS");
markFlagAsAccessed(32, "enableModuleArgumentNSNullConversionIOS");
flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS();
enableModuleArgumentNSNullConversionIOS_ = flagValue;
@@ -614,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(32, "enableNativeCSSParsing");
markFlagAsAccessed(33, "enableNativeCSSParsing");
flagValue = currentProvider_->enableNativeCSSParsing();
enableNativeCSSParsing_ = flagValue;
@@ -632,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(33, "enableNetworkEventReporting");
markFlagAsAccessed(34, "enableNetworkEventReporting");
flagValue = currentProvider_->enableNetworkEventReporting();
enableNetworkEventReporting_ = flagValue;
@@ -650,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(34, "enablePreparedTextLayout");
markFlagAsAccessed(35, "enablePreparedTextLayout");
flagValue = currentProvider_->enablePreparedTextLayout();
enablePreparedTextLayout_ = flagValue;
@@ -668,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(35, "enablePropsUpdateReconciliationAndroid");
markFlagAsAccessed(36, "enablePropsUpdateReconciliationAndroid");
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
enablePropsUpdateReconciliationAndroid_ = flagValue;
@@ -686,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::enableResourceTimingAPI() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(36, "enableResourceTimingAPI");
markFlagAsAccessed(37, "enableResourceTimingAPI");
flagValue = currentProvider_->enableResourceTimingAPI();
enableResourceTimingAPI_ = flagValue;
@@ -704,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSwiftUIBasedFilters() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(37, "enableSwiftUIBasedFilters");
markFlagAsAccessed(38, "enableSwiftUIBasedFilters");
flagValue = currentProvider_->enableSwiftUIBasedFilters();
enableSwiftUIBasedFilters_ = flagValue;
@@ -722,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewCulling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(38, "enableViewCulling");
markFlagAsAccessed(39, "enableViewCulling");
flagValue = currentProvider_->enableViewCulling();
enableViewCulling_ = flagValue;
@@ -740,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(39, "enableViewRecycling");
markFlagAsAccessed(40, "enableViewRecycling");
flagValue = currentProvider_->enableViewRecycling();
enableViewRecycling_ = flagValue;
@@ -758,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForImage() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(40, "enableViewRecyclingForImage");
markFlagAsAccessed(41, "enableViewRecyclingForImage");
flagValue = currentProvider_->enableViewRecyclingForImage();
enableViewRecyclingForImage_ = flagValue;
@@ -776,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForScrollView() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(41, "enableViewRecyclingForScrollView");
markFlagAsAccessed(42, "enableViewRecyclingForScrollView");
flagValue = currentProvider_->enableViewRecyclingForScrollView();
enableViewRecyclingForScrollView_ = flagValue;
@@ -794,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForText() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(42, "enableViewRecyclingForText");
markFlagAsAccessed(43, "enableViewRecyclingForText");
flagValue = currentProvider_->enableViewRecyclingForText();
enableViewRecyclingForText_ = flagValue;
@@ -812,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(43, "enableViewRecyclingForView");
markFlagAsAccessed(44, "enableViewRecyclingForView");
flagValue = currentProvider_->enableViewRecyclingForView();
enableViewRecyclingForView_ = flagValue;
@@ -830,7 +848,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewDebugFeatures() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(44, "enableVirtualViewDebugFeatures");
markFlagAsAccessed(45, "enableVirtualViewDebugFeatures");
flagValue = currentProvider_->enableVirtualViewDebugFeatures();
enableVirtualViewDebugFeatures_ = flagValue;
@@ -848,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewRenderState() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(45, "enableVirtualViewRenderState");
markFlagAsAccessed(46, "enableVirtualViewRenderState");
flagValue = currentProvider_->enableVirtualViewRenderState();
enableVirtualViewRenderState_ = flagValue;
@@ -866,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewWindowFocusDetection() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(46, "enableVirtualViewWindowFocusDetection");
markFlagAsAccessed(47, "enableVirtualViewWindowFocusDetection");
flagValue = currentProvider_->enableVirtualViewWindowFocusDetection();
enableVirtualViewWindowFocusDetection_ = flagValue;
@@ -884,7 +902,7 @@ bool ReactNativeFeatureFlagsAccessor::enableWebPerformanceAPIsByDefault() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(47, "enableWebPerformanceAPIsByDefault");
markFlagAsAccessed(48, "enableWebPerformanceAPIsByDefault");
flagValue = currentProvider_->enableWebPerformanceAPIsByDefault();
enableWebPerformanceAPIsByDefault_ = flagValue;
@@ -902,7 +920,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(48, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
markFlagAsAccessed(49, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
@@ -920,7 +938,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(49, "fuseboxEnabledRelease");
markFlagAsAccessed(50, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -938,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(50, "fuseboxNetworkInspectionEnabled");
markFlagAsAccessed(51, "fuseboxNetworkInspectionEnabled");
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
fuseboxNetworkInspectionEnabled_ = flagValue;
@@ -956,7 +974,7 @@ bool ReactNativeFeatureFlagsAccessor::hideOffscreenVirtualViewsOnIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(51, "hideOffscreenVirtualViewsOnIOS");
markFlagAsAccessed(52, "hideOffscreenVirtualViewsOnIOS");
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
hideOffscreenVirtualViewsOnIOS_ = flagValue;
@@ -974,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(52, "overrideBySynchronousMountPropsAtMountingAndroid");
markFlagAsAccessed(53, "overrideBySynchronousMountPropsAtMountingAndroid");
flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid();
overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue;
@@ -992,7 +1010,7 @@ bool ReactNativeFeatureFlagsAccessor::perfMonitorV2Enabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(53, "perfMonitorV2Enabled");
markFlagAsAccessed(54, "perfMonitorV2Enabled");
flagValue = currentProvider_->perfMonitorV2Enabled();
perfMonitorV2Enabled_ = flagValue;
@@ -1010,7 +1028,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(54, "preparedTextCacheSize");
markFlagAsAccessed(55, "preparedTextCacheSize");
flagValue = currentProvider_->preparedTextCacheSize();
preparedTextCacheSize_ = flagValue;
@@ -1028,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(55, "preventShadowTreeCommitExhaustion");
markFlagAsAccessed(56, "preventShadowTreeCommitExhaustion");
flagValue = currentProvider_->preventShadowTreeCommitExhaustion();
preventShadowTreeCommitExhaustion_ = flagValue;
@@ -1046,7 +1064,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(56, "shouldPressibilityUseW3CPointerEventsForHover");
markFlagAsAccessed(57, "shouldPressibilityUseW3CPointerEventsForHover");
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
@@ -1064,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(57, "skipActivityIdentityAssertionOnHostPause");
markFlagAsAccessed(58, "skipActivityIdentityAssertionOnHostPause");
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
skipActivityIdentityAssertionOnHostPause_ = flagValue;
@@ -1082,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::sweepActiveTouchOnChildNativeGesturesAndro
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(58, "sweepActiveTouchOnChildNativeGesturesAndroid");
markFlagAsAccessed(59, "sweepActiveTouchOnChildNativeGesturesAndroid");
flagValue = currentProvider_->sweepActiveTouchOnChildNativeGesturesAndroid();
sweepActiveTouchOnChildNativeGesturesAndroid_ = flagValue;
@@ -1100,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(59, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(60, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -1118,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(60, "updateRuntimeShadowNodeReferencesOnCommit");
markFlagAsAccessed(61, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
@@ -1136,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(61, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(62, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -1154,7 +1172,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(62, "useFabricInterop");
markFlagAsAccessed(63, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -1172,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeEqualsInNativeReadableArrayAndroi
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(63, "useNativeEqualsInNativeReadableArrayAndroid");
markFlagAsAccessed(64, "useNativeEqualsInNativeReadableArrayAndroid");
flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid();
useNativeEqualsInNativeReadableArrayAndroid_ = flagValue;
@@ -1190,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeTransformHelperAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(64, "useNativeTransformHelperAndroid");
markFlagAsAccessed(65, "useNativeTransformHelperAndroid");
flagValue = currentProvider_->useNativeTransformHelperAndroid();
useNativeTransformHelperAndroid_ = flagValue;
@@ -1208,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(65, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(66, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -1226,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(66, "useOptimizedEventBatchingOnAndroid");
markFlagAsAccessed(67, "useOptimizedEventBatchingOnAndroid");
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
useOptimizedEventBatchingOnAndroid_ = flagValue;
@@ -1244,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(67, "useRawPropsJsiValue");
markFlagAsAccessed(68, "useRawPropsJsiValue");
flagValue = currentProvider_->useRawPropsJsiValue();
useRawPropsJsiValue_ = flagValue;
@@ -1262,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::useShadowNodeStateOnClone() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(68, "useShadowNodeStateOnClone");
markFlagAsAccessed(69, "useShadowNodeStateOnClone");
flagValue = currentProvider_->useShadowNodeStateOnClone();
useShadowNodeStateOnClone_ = flagValue;
@@ -1280,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(69, "useTurboModuleInterop");
markFlagAsAccessed(70, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -1298,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(70, "useTurboModules");
markFlagAsAccessed(71, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -1316,7 +1334,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewHysteresisRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(71, "virtualViewHysteresisRatio");
markFlagAsAccessed(72, "virtualViewHysteresisRatio");
flagValue = currentProvider_->virtualViewHysteresisRatio();
virtualViewHysteresisRatio_ = flagValue;
@@ -1334,7 +1352,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(72, "virtualViewPrerenderRatio");
markFlagAsAccessed(73, "virtualViewPrerenderRatio");
flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6f05211b44f2be076b37ef9178e5ef43>>
* @generated SignedSource<<53981e017d681009b240ad6b5d09d4d8>>
*/
/**
@@ -59,6 +59,7 @@ class ReactNativeFeatureFlagsAccessor {
bool enableImagePrefetchingAndroid();
bool enableImagePrefetchingOnUiThreadAndroid();
bool enableImmediateUpdateModeForContentOffsetChanges();
bool enableImperativeFocus();
bool enableInteropViewManagerClassLookUpOptimizationIOS();
bool enableLayoutAnimationsOnAndroid();
bool enableLayoutAnimationsOnIOS();
@@ -116,7 +117,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 73> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 74> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
@@ -145,6 +146,7 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enableImagePrefetchingAndroid_;
std::atomic<std::optional<bool>> enableImagePrefetchingOnUiThreadAndroid_;
std::atomic<std::optional<bool>> enableImmediateUpdateModeForContentOffsetChanges_;
std::atomic<std::optional<bool>> enableImperativeFocus_;
std::atomic<std::optional<bool>> enableInteropViewManagerClassLookUpOptimizationIOS_;
std::atomic<std::optional<bool>> enableLayoutAnimationsOnAndroid_;
std::atomic<std::optional<bool>> enableLayoutAnimationsOnIOS_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b6da08857919846dda053b3635fb9702>>
* @generated SignedSource<<6c1c050029f105d0075fb83ca21aa48b>>
*/
/**
@@ -135,6 +135,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool enableImperativeFocus() override {
return false;
}
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<737e882a924b2730d0c67cc8dc27c8a7>>
* @generated SignedSource<<0bef63a074aa6b67787c2ca30706a847>>
*/
/**
@@ -288,6 +288,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::enableImmediateUpdateModeForContentOffsetChanges();
}
bool enableImperativeFocus() override {
auto value = values_["enableImperativeFocus"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::enableImperativeFocus();
}
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
auto value = values_["enableInteropViewManagerClassLookUpOptimizationIOS"];
if (!value.isNull()) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4045a760f000400d47117728119f0d21>>
* @generated SignedSource<<40ea902a1d376324f75680d651f3eff6>>
*/
/**
@@ -52,6 +52,7 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enableImagePrefetchingAndroid() = 0;
virtual bool enableImagePrefetchingOnUiThreadAndroid() = 0;
virtual bool enableImmediateUpdateModeForContentOffsetChanges() = 0;
virtual bool enableImperativeFocus() = 0;
virtual bool enableInteropViewManagerClassLookUpOptimizationIOS() = 0;
virtual bool enableLayoutAnimationsOnAndroid() = 0;
virtual bool enableLayoutAnimationsOnIOS() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5042321d7d0da40cc0436ffaeedda168>>
* @generated SignedSource<<c97db1f02897c99b61643cac10067c6d>>
*/
/**
@@ -179,6 +179,11 @@ bool NativeReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetCha
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
}
bool NativeReactNativeFeatureFlags::enableImperativeFocus(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableImperativeFocus();
}
bool NativeReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b1583692e9e07ae68b946496cb94e3e9>>
* @generated SignedSource<<ae105f2906573a4f8955c086d3441389>>
*/
/**
@@ -90,6 +90,8 @@ class NativeReactNativeFeatureFlags
bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime& runtime);
bool enableImperativeFocus(jsi::Runtime& runtime);
bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime& runtime);
bool enableLayoutAnimationsOnAndroid(jsi::Runtime& runtime);
@@ -17,5 +17,7 @@ target_compile_options(react_networking PRIVATE -Wpedantic)
target_include_directories(react_networking PUBLIC ${REACT_COMMON_DIR})
target_link_libraries(react_networking
folly_runtime
jsinspector_network
jsinspector_tracing
react_performance_timeline
react_timing)
@@ -11,6 +11,7 @@
#include <jsinspector-modern/network/CdpNetwork.h>
#include <jsinspector-modern/network/HttpUtils.h>
#include <jsinspector-modern/network/NetworkHandler.h>
#include <jsinspector-modern/tracing/PerformanceTracer.h>
#endif
#include <react/featureflags/ReactNativeFeatureFlags.h>
#include <react/performance/timeline/PerformanceEntryReporter.h>
@@ -35,9 +36,9 @@ void NetworkReporter::reportRequestStart(
const RequestInfo& requestInfo,
int encodedDataLength,
const std::optional<ResponseInfo>& redirectResponse) {
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
auto now = HighResTimeStamp::now();
auto now = HighResTimeStamp::now();
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
// All builds: Annotate PerformanceResourceTiming metadata
{
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
@@ -45,7 +46,6 @@ void NetworkReporter::reportRequestStart(
requestId,
ResourceTimingData{
.url = requestInfo.url,
.requestMethod = requestInfo.httpMethod,
.fetchStart = now,
.requestStart = now,
});
@@ -53,13 +53,15 @@ void NetworkReporter::reportRequestStart(
}
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: CDP event handling
auto headers = requestInfo.headers.value_or(Headers{});
// Debugger enabled: CDP event handling
jsinspector_modern::NetworkHandler::getInstance().onRequestWillBeSent(
requestId,
{
.url = requestInfo.url,
.method = requestInfo.httpMethod,
.headers = requestInfo.headers,
.headers = headers,
.postData = requestInfo.httpBody,
},
redirectResponse.has_value()
@@ -67,18 +69,25 @@ void NetworkReporter::reportRequestStart(
jsinspector_modern::cdp::network::Response::fromInputParams(
redirectResponse->url,
redirectResponse->statusCode,
redirectResponse->headers,
redirectResponse->headers.value_or(Headers{}),
encodedDataLength))
: std::nullopt);
// Debugger enabled: Add trace events to Performance timeline
auto& performanceTracer =
jsinspector_modern::tracing::PerformanceTracer::getInstance();
performanceTracer.reportResourceWillSendRequest(requestId, now);
performanceTracer.reportResourceSendRequest(
requestId, now, requestInfo.url, requestInfo.httpMethod, headers);
#endif
}
void NetworkReporter::reportConnectionTiming(
const std::string& requestId,
const std::optional<Headers>& headers) {
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
auto now = HighResTimeStamp::now();
auto now = HighResTimeStamp::now();
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
// All builds: Annotate PerformanceResourceTiming metadata
{
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
@@ -90,7 +99,7 @@ void NetworkReporter::reportConnectionTiming(
}
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: CDP event handling
// Debugger enabled: CDP event handling
jsinspector_modern::NetworkHandler::getInstance()
.onRequestWillBeSentExtraInfo(requestId, headers.value_or(Headers{}));
#endif
@@ -100,9 +109,9 @@ void NetworkReporter::reportResponseStart(
const std::string& requestId,
const ResponseInfo& responseInfo,
int encodedDataLength) {
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
auto now = HighResTimeStamp::now();
auto now = HighResTimeStamp::now();
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
// All builds: Annotate PerformanceResourceTiming metadata
{
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
@@ -111,26 +120,26 @@ void NetworkReporter::reportResponseStart(
it->second.connectEnd = now;
it->second.responseStart = now;
it->second.responseStatus = responseInfo.statusCode;
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: Compute additional fields to send in CDP trace events
it->second.resourceType =
jsinspector_modern::cdp::network::resourceTypeFromMimeType(
jsinspector_modern::mimeTypeFromHeaders(
responseInfo.headers.value_or(Headers{})));
#endif
}
}
}
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: CDP event handling
auto headers = responseInfo.headers.value_or(Headers{});
// Debugger enabled: CDP event handling
jsinspector_modern::NetworkHandler::getInstance().onResponseReceived(
requestId,
jsinspector_modern::cdp::network::Response::fromInputParams(
responseInfo.url,
responseInfo.statusCode,
responseInfo.headers,
headers,
encodedDataLength));
// Debugger enabled: Add trace event to Performance timeline
jsinspector_modern::tracing::PerformanceTracer::getInstance()
.reportResourceReceiveResponse(
requestId, now, responseInfo.statusCode, headers, encodedDataLength);
#endif
}
@@ -139,7 +148,7 @@ void NetworkReporter::reportDataReceived(
int dataLength,
const std::optional<int>& encodedDataLength) {
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: CDP event handling
// Debugger enabled: CDP event handling
jsinspector_modern::NetworkHandler::getInstance().onDataReceived(
requestId, dataLength, encodedDataLength.value_or(dataLength));
#endif
@@ -148,9 +157,9 @@ void NetworkReporter::reportDataReceived(
void NetworkReporter::reportResponseEnd(
const std::string& requestId,
int encodedDataLength) {
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
auto now = HighResTimeStamp::now();
auto now = HighResTimeStamp::now();
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
// All builds: Report PerformanceResourceTiming event
{
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
@@ -165,19 +174,20 @@ void NetworkReporter::reportResponseEnd(
eventData.connectEnd.value_or(now),
eventData.responseStart.value_or(now),
now,
eventData.responseStatus,
requestId,
eventData.requestMethod,
eventData.resourceType);
eventData.responseStatus);
perfTimingsBuffer_.erase(requestId);
}
}
}
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: CDP event handling
// Debugger enabled: CDP event handling
jsinspector_modern::NetworkHandler::getInstance().onLoadingFinished(
requestId, encodedDataLength);
// Debugger enabled: Add trace event to Performance timeline
jsinspector_modern::tracing::PerformanceTracer::getInstance()
.reportResourceFinish(requestId, now);
#endif
}
@@ -185,7 +195,7 @@ void NetworkReporter::reportRequestFailed(
const std::string& requestId,
bool cancelled) const {
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: CDP event handling
// Debugger enabled: CDP event handling
jsinspector_modern::NetworkHandler::getInstance().onLoadingFailed(
requestId, cancelled);
#endif
@@ -196,7 +206,7 @@ void NetworkReporter::storeResponseBody(
std::string_view body,
bool base64Encoded) {
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
// Debug build: Store fetched response body for later CDP retrieval
// Debugger enabled: Store fetched response body for later CDP retrieval
jsinspector_modern::NetworkHandler::getInstance().storeResponseBody(
requestId, body, base64Encoded);
#endif
@@ -28,8 +28,6 @@ namespace facebook::react {
*/
struct ResourceTimingData {
std::string url;
std::string requestMethod;
std::optional<std::string> resourceType;
HighResTimeStamp fetchStart;
HighResTimeStamp requestStart;
std::optional<HighResTimeStamp> connectStart;
@@ -56,7 +54,8 @@ class NetworkReporter {
/**
* Report a network request that is about to be sent.
*
* - Corresponds to `Network.requestWillBeSent` in CDP.
* - Corresponds to `Network.requestWillBeSent` and the
* "ResourceWillSendRequest" trace event in CDP.
* - Corresponds to `PerformanceResourceTiming.requestStart` (specifically,
* marking when the native request was initiated).
*
@@ -72,7 +71,8 @@ class NetworkReporter {
* Report timestamp for sending the network request, and (in a debug build)
* provide final headers to be reported via CDP.
*
* - Corresponds to `Network.requestWillBeSentExtraInfo` in CDP.
* - Corresponds to `Network.requestWillBeSentExtraInfo` and the
* "ResourceSendRequest" trace event in CDP.
* - Corresponds to `PerformanceResourceTiming.domainLookupStart`,
* `PerformanceResourceTiming.connectStart`. Defined as "immediately before
* the browser starts to establish the connection to the server".
@@ -87,7 +87,8 @@ class NetworkReporter {
* Report when HTTP response headers have been received, corresponding to
* when the first byte of the response is available.
*
* - Corresponds to `Network.responseReceived` in CDP.
* - Corresponds to `Network.responseReceived` and the
* "ResourceReceiveResponse" trace event in CDP.
* - Corresponds to `PerformanceResourceTiming.responseStart`.
*
* https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responsestart
@@ -112,7 +113,8 @@ class NetworkReporter {
* Report when a network request is complete and we are no longer receiving
* response data.
*
* - Corresponds to `Network.loadingFinished` in CDP.
* - Corresponds to `Network.loadingFinished` and the "ResourceFinish" trace
* event in CDP.
* - Corresponds to `PerformanceResourceTiming.responseEnd`.
*
* https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responseend
@@ -43,6 +43,7 @@ Pod::Spec.new do |s|
end
add_dependency(s, "React-featureflags")
add_dependency(s, "React-jsinspectornetwork", :framework_name => 'jsinspector_modernnetwork')
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
s.dependency "React-performancetimeline"
s.dependency "React-timing"
@@ -307,10 +307,7 @@ void PerformanceEntryReporter::reportResourceTiming(
std::optional<HighResTimeStamp> connectEnd,
HighResTimeStamp responseStart,
HighResTimeStamp responseEnd,
const std::optional<int>& responseStatus,
const std::optional<std::string>& devtoolsRequestId,
const std::optional<std::string>& requestMethod,
const std::optional<std::string>& resourceType) {
const std::optional<int>& responseStatus) {
const auto entry = PerformanceResourceTiming{
{.name = url, .startTime = fetchStart},
fetchStart,
@@ -322,8 +319,6 @@ void PerformanceEntryReporter::reportResourceTiming(
responseStatus,
};
traceResourceTiming(entry, devtoolsRequestId, requestMethod, resourceType);
// Add to buffers & notify observers
{
std::unique_lock lock(buffersMutex_);
@@ -375,31 +370,4 @@ void PerformanceEntryReporter::traceMeasure(
}
}
void PerformanceEntryReporter::traceResourceTiming(
const PerformanceResourceTiming& entry,
const std::optional<std::string>& devtoolsRequestId,
const std::optional<std::string>& requestMethod,
const std::optional<std::string>& resourceType) const {
if (!entry.responseStart.has_value() || !entry.responseEnd.has_value() ||
!entry.responseStatus.has_value() || !devtoolsRequestId.has_value() ||
!requestMethod.has_value() || !resourceType.has_value()) {
return;
}
auto& performanceTracer =
jsinspector_modern::tracing::PerformanceTracer::getInstance();
if (performanceTracer.isTracing()) {
performanceTracer.reportResourceTiming(
*devtoolsRequestId,
entry.name,
entry.fetchStart,
*entry.responseStart,
*entry.responseEnd,
*entry.responseStatus,
*requestMethod,
*resourceType);
}
}
} // namespace facebook::react
@@ -118,10 +118,7 @@ class PerformanceEntryReporter {
std::optional<HighResTimeStamp> connectEnd,
HighResTimeStamp responseStart,
HighResTimeStamp responseEnd,
const std::optional<int>& responseStatus,
const std::optional<std::string>& devtoolsRequestId,
const std::optional<std::string>& requestMethod,
const std::optional<std::string>& resourceType);
const std::optional<int>& responseStatus);
private:
std::unique_ptr<PerformanceObserverRegistry> observerRegistry_;
@@ -112,4 +112,13 @@ void BaseViewEventEmitter::onLayout(const LayoutMetrics& layoutMetrics) const {
});
}
#pragma mark - Focus
void BaseViewEventEmitter::onFocus() const {
dispatchEvent("focus");
}
void BaseViewEventEmitter::onBlur() const {
dispatchEvent("blur");
}
} // namespace facebook::react
@@ -32,6 +32,10 @@ class BaseViewEventEmitter : public TouchEventEmitter {
void onLayout(const LayoutMetrics& layoutMetrics) const;
#pragma mark - Focus
void onFocus() const;
void onBlur() const;
private:
/*
* Contains the most recent `frame` and a `mutex` protecting access to it.
@@ -147,7 +147,7 @@ class CSSSyntaxParser {
*
* https://www.w3.org/TR/css-syntax-3/#consume-component-value
*
* @tparam ReturnT caller-specified return type of visitors. This type will
* @param <ReturnT> caller-specified return type of visitors. This type will
* be set to its default constructed state if consuming a component value with
* no matching visitors, or syntax error
* @param visitors A unique list of CSSComponentValueVisitor to be called on a
@@ -19,7 +19,8 @@ namespace facebook::react {
*/
template <size_t N>
struct TemplateStringLiteral {
/* implicit */ constexpr TemplateStringLiteral(const char (&str)[N]) {
/* implicit */ constexpr TemplateStringLiteral(
const char (&str)[N]) { // NOLINT(modernize-avoid-c-arrays)
std::copy_n(str, N, value.data());
}
+2 -2
View File
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4ccde3daef50fa7522f10bc7146c0cc6>>
* @generated SignedSource<<377660a4dc9f8c721ebcd64f759637ac>>
*
* This file was generated by scripts/js-api/build-types/index.js.
*/
@@ -573,7 +573,7 @@ declare const VirtualizedSectionListComponent_default: <
> = DefaultVirtualizedSectionT,
>(
props: Omit<VirtualizedSectionListProps<ItemT, SectionT>, "ref"> & {
ref: React.Ref<{
ref?: React.Ref<{
getListRef(): undefined | VirtualizedList_default
scrollToLocation(params: ScrollToLocationParamsType): void
}>
+2 -1
View File
@@ -28,7 +28,8 @@ export default function mockComponent<
instanceMethods: ?interface {},
isESModule: TIsESModule,
): TIsESModule extends true
? ModuleDefault<TComponentModule & typeof instanceMethods>
? // $FlowFixMe[incompatible-use]
ModuleDefault<TComponentModule & typeof instanceMethods>
: TComponentModule & typeof instanceMethods {
const RealComponent: TComponentType = isESModule
? // $FlowFixMe[prop-missing]
@@ -336,6 +336,17 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'none',
},
enableImperativeFocus: {
defaultValue: false,
metadata: {
dateAdded: '2024-09-13',
description:
'Enable ref.focus() and ref.blur() for all views, not just TextInput.',
expectedReleaseValue: true,
purpose: 'experimentation',
},
ossReleaseStage: 'none',
},
enableInteropViewManagerClassLookUpOptimizationIOS: {
defaultValue: false,
metadata: {
@@ -80,7 +80,7 @@ Pod::Spec.new do |spec|
)
spec.user_target_xcconfig = {
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/osx-bin/hermesc"
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/hermesc/osx-bin/hermesc"
}
end
@@ -228,8 +228,8 @@ def release_tarball_url(version, build_type)
if hermes_v1_enabled()
namespace = "com/facebook/hermes"
# Sample url from Maven:
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-debug.tar.gz
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-#{build_type.to_s}.tar.gz"
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-hermes-ios-debug.tar.gz
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-hermes-ios-#{build_type.to_s}.tar.gz"
else
namespace = "com/facebook/react"
# Sample url from Maven:
+23
View File
@@ -38,3 +38,26 @@ project(":packages:react-native:ReactAndroid:hermes-engine").projectDir =
project(":packages").projectDir = file("/tmp")
project(":packages:react-native").projectDir = file("/tmp")
// Gradle properties defined in `gradle.properties` are not inherited by
// included builds, see https://github.com/gradle/gradle/issues/2534.
// This is a workaround to read the configuration from the consuming project,
// and apply relevant properties to the :react-native project.
buildscript {
val properties = java.util.Properties()
val propertiesToInherit = listOf("hermesV1Enabled", "react.hermesV1Enabled")
try {
file("../../android/gradle.properties").inputStream().use { properties.load(it) }
gradle.rootProject {
propertiesToInherit.forEach { property ->
if (properties.containsKey(property)) {
gradle.rootProject.extra.set(property, properties.getProperty(property))
}
}
}
} catch (e: Exception) {
// fail silently
}
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<054add14ea0c9a96d3c3e32af8995437>>
* @generated SignedSource<<e460eec2e7fe00ccc67bfef14f07b8c5>>
* @flow strict
* @noformat
*/
@@ -77,6 +77,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
enableImagePrefetchingAndroid: Getter<boolean>,
enableImagePrefetchingOnUiThreadAndroid: Getter<boolean>,
enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean>,
enableImperativeFocus: Getter<boolean>,
enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean>,
enableLayoutAnimationsOnAndroid: Getter<boolean>,
enableLayoutAnimationsOnIOS: Getter<boolean>,
@@ -312,6 +313,10 @@ export const enableImagePrefetchingOnUiThreadAndroid: Getter<boolean> = createNa
* Dispatches state updates for content offset changes synchronously on the main thread.
*/
export const enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean> = createNativeFlagGetter('enableImmediateUpdateModeForContentOffsetChanges', false);
/**
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
*/
export const enableImperativeFocus: Getter<boolean> = createNativeFlagGetter('enableImperativeFocus', false);
/**
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<ae5e2e1799601c6f630a465ec8e64ef6>>
* @generated SignedSource<<a132956fa9481beddb6d94e7d6acfd7c>>
* @flow strict
* @noformat
*/
@@ -52,6 +52,7 @@ export interface Spec extends TurboModule {
+enableImagePrefetchingAndroid?: () => boolean;
+enableImagePrefetchingOnUiThreadAndroid?: () => boolean;
+enableImmediateUpdateModeForContentOffsetChanges?: () => boolean;
+enableImperativeFocus?: () => boolean;
+enableInteropViewManagerClassLookUpOptimizationIOS?: () => boolean;
+enableLayoutAnimationsOnAndroid?: () => boolean;
+enableLayoutAnimationsOnIOS?: () => boolean;
@@ -68,7 +68,7 @@ type Props = $ReadOnly<{
}>;
const BaseFlatListExample: component(
ref: React.RefSetter<FlatList<string>>,
ref?: React.RefSetter<FlatList<string>>,
...props: Props
) = ({ref, ...props}: {ref: React.RefSetter<FlatList<string>>, ...Props}) => {
return (
@@ -111,41 +111,23 @@ const ITEM_MARGIN = 8;
export const ITEM_HEIGHT: number = ITEM_INNER_HEIGHT + ITEM_MARGIN * 2;
const styles = StyleSheet.create({
container: {flex: 1},
header: {
backgroundColor: 'white',
fontSize: 32,
},
item: {
backgroundColor: 'pink',
paddingHorizontal: 20,
height: ITEM_INNER_HEIGHT,
marginVertical: ITEM_MARGIN,
justifyContent: 'center',
marginVertical: ITEM_MARGIN,
paddingHorizontal: 20,
},
header: {
fontSize: 32,
backgroundColor: 'white',
list: {
flex: 1,
},
title: {
fontSize: 24,
},
titleContainer: {
position: 'absolute',
top: 45,
left: 0,
right: 0,
justifyContent: 'flex-end',
alignItems: 'center',
backgroundColor: 'gray',
zIndex: 1,
},
titleText: {
fontSize: 24,
lineHeight: 44,
fontWeight: 'bold',
},
testContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#f2f2f7ff',
height: 40,
offScreen: {
height: 1000,
},
output: {
fontSize: 12,
@@ -156,11 +138,29 @@ const styles = StyleSheet.create({
separatorText: {
fontSize: 10,
},
list: {
flex: 1,
testContainer: {
alignItems: 'center',
backgroundColor: '#f2f2f7ff',
flexDirection: 'row',
height: 40,
justifyContent: 'space-between',
},
container: {flex: 1},
offScreen: {
height: 1000,
title: {
fontSize: 24,
},
titleContainer: {
alignItems: 'center',
backgroundColor: 'gray',
justifyContent: 'flex-end',
left: 0,
position: 'absolute',
right: 0,
top: 45,
zIndex: 1,
},
titleText: {
fontSize: 24,
fontWeight: 'bold',
lineHeight: 44,
},
});
@@ -20,20 +20,20 @@ import {
const DATA = [
{
title: 'Main dishes',
data: ['Pizza', 'Burger', 'Risotto'],
title: 'Main dishes',
},
{
title: 'Sides',
data: ['French Fries', 'Onion Rings', 'Fried Shrimps'],
title: 'Sides',
},
{
title: 'Drinks',
data: ['Water', 'Coke', 'Beer'],
title: 'Drinks',
},
{
title: 'Desserts',
data: ['Cheesecake', 'Brownie'],
title: 'Desserts',
},
];
@@ -75,7 +75,7 @@ type Props = $ReadOnly<{
const SectionListBaseExample: component(
// $FlowFixMe[unclear-type]
ref: React.RefSetter<SectionList<any>>,
ref?: React.RefSetter<SectionList<any>>,
...props: Props
) = ({
ref,
@@ -122,33 +122,33 @@ const SectionListBaseExample: component(
};
const styles = StyleSheet.create({
container: {flex: 1},
header: {
backgroundColor: 'white',
fontSize: 32,
},
item: {
backgroundColor: 'pink',
padding: 20,
marginVertical: 8,
padding: 20,
},
header: {
fontSize: 32,
backgroundColor: 'white',
},
title: {
fontSize: 24,
},
testContainer: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#f2f2f7ff',
height: 40,
list: {
flex: 1,
},
output: {
flex: 1,
fontSize: 12,
},
list: {
flex: 1,
testContainer: {
alignItems: 'center',
backgroundColor: '#f2f2f7ff',
flexDirection: 'row',
height: 40,
justifyContent: 'space-between',
},
title: {
fontSize: 24,
},
container: {flex: 1},
});
export default SectionListBaseExample;
@@ -13,7 +13,7 @@ import React, {useContext} from 'react';
import {StyleSheet, TextInput} from 'react-native';
const ExampleTextInput: component(
ref: React.RefSetter<null | React.ElementRef<typeof TextInput>>,
ref?: React.RefSetter<null | React.ElementRef<typeof TextInput>>,
...props: React.ElementConfig<typeof TextInput>
) = ({
ref,
@@ -30,9 +30,9 @@ const ExampleTextInput: component(
{...props}
style={[
{
color: theme.LabelColor,
backgroundColor: theme.SecondaryGroupedBackgroundColor,
borderColor: theme.QuaternaryLabelColor,
color: theme.LabelColor,
},
styles.input,
props.style,
@@ -44,9 +44,9 @@ const ExampleTextInput: component(
const styles = StyleSheet.create({
input: {
borderWidth: 1,
fontSize: 13,
flexGrow: 1,
flexShrink: 1,
fontSize: 13,
padding: 4,
},
});
@@ -648,7 +648,7 @@ const VirtualizedSectionListComponent = VirtualizedSectionList as component<
DefaultVirtualizedSectionT,
> = DefaultVirtualizedSectionT,
>(
ref: React.RefSetter<
ref?: React.RefSetter<
interface {
getListRef(): ?VirtualizedList,
scrollToLocation(params: ScrollToLocationParamsType): void,
-23
View File
@@ -44,26 +44,3 @@ configure<com.facebook.react.ReactSettingsExtension> {
lockFiles = files("yarn.lock"),
)
}
// Gradle properties defined in `gradle.properties` are not inherited by
// included builds, see https://github.com/gradle/gradle/issues/2534.
// This is a workaround to read the configuration from the consuming project,
// and apply relevant properties to the :react-native project.
buildscript {
val properties = java.util.Properties()
val propertiesToInherit = listOf("hermesV1Enabled", "react.hermesV1Enabled")
try {
file("../../android/gradle.properties").inputStream().use { properties.load(it) }
gradle.rootProject {
propertiesToInherit.forEach { property ->
if (properties.containsKey(property)) {
gradle.rootProject.extra.set(property, properties.getProperty(property))
}
}
}
} catch (e: Exception) {
// fail silently
}
}
+4 -4
View File
@@ -4944,10 +4944,10 @@ flow-api-translator@0.32.0:
hermes-transform "0.32.0"
typescript "5.3.2"
flow-bin@^0.281.0:
version "0.281.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.281.0.tgz#be49afd6da986ba355e27d38775547b60b398e65"
integrity sha512-jgSKNLolqwtI4CZ/lTh/YKf0JAtFGTrf/8ETZkfxxyT5AYB9NfiO5KQttW0gtd63plppvw3ghyVFKLSK3TH6hg==
flow-bin@^0.283.0:
version "0.283.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.283.0.tgz#82d7a03f6995f9d8ecebdd638dc2be4bdba0ab0e"
integrity sha512-WUjOZdJYi/gNZnKLRdId7K64vqXznKboNR4qi2d5HBbW+MRvbxoAKjbQkV0UAxuophHYyDrpi7CdLFUscyTpVA==
flow-enums-runtime@^0.0.6:
version "0.0.6"