mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04ae39e603 |
+1
-1
@@ -98,4 +98,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.283.0
|
||||
^0.281.0
|
||||
|
||||
+2
-18
@@ -1,21 +1,5 @@
|
||||
# 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
|
||||
@@ -96,7 +80,7 @@
|
||||
|
||||
### Added
|
||||
|
||||
- **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:** `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:** 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))
|
||||
@@ -133,7 +117,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))
|
||||
|
||||
Vendored
+7
-10
@@ -3995,16 +3995,13 @@ 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,
|
||||
...
|
||||
},
|
||||
rss: () => number,
|
||||
memoryUsage(): {
|
||||
arrayBuffers: number,
|
||||
rss: number,
|
||||
heapTotal: number,
|
||||
heapUsed: number,
|
||||
external: number,
|
||||
...
|
||||
};
|
||||
nextTick: <T>(cb: (...T) => mixed, ...T) => void;
|
||||
pid: number;
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"fb-dotslash": "0.5.8",
|
||||
"flow-api-translator": "0.32.0",
|
||||
"flow-bin": "^0.283.0",
|
||||
"flow-bin": "^0.281.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.32.0",
|
||||
"hermes-transform": "0.32.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@generated SignedSource<<d090ed9a9e781c82884f22944254ed65>>
|
||||
Git revision: 8b84a77b2c82c670886ef064dfc92d6bce83e579
|
||||
@generated SignedSource<<0b54f75686e4893a5444839bf621a317>>
|
||||
Git revision: 5a792db1225adda206313e9bf751198a1ca7851a
|
||||
Built with --nohooks: false
|
||||
Is local checkout: false
|
||||
Remote URL: https://github.com/facebook/react-native-devtools-frontend
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,71 +1,71 @@
|
||||
#!/usr/bin/env dotslash
|
||||
|
||||
// @generated SignedSource<<e93d55b5e28943e44271f5d3738083e0>>
|
||||
// @generated SignedSource<<9df662721aea6e3774a8677e2a6065e4>>
|
||||
|
||||
|
||||
{
|
||||
"name": "React Native DevTools",
|
||||
"platforms": {
|
||||
"linux-aarch64": {
|
||||
"size": 116060647,
|
||||
"size": 116056584,
|
||||
"hash": "sha256",
|
||||
"digest": "4352f1c9848ca919101ec628bd08b87a72a828d1ab55fa43a02098329fa452fa",
|
||||
"digest": "fac3912f10e3c373c874be6c4696f11e05cbaa754c116db6ea72189afae5efe6",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"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"
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools-linux-arm64/React Native DevTools"
|
||||
},
|
||||
"linux-x86_64": {
|
||||
"size": 115930333,
|
||||
"size": 115929093,
|
||||
"hash": "sha256",
|
||||
"digest": "11c7b07942928a6301b07fbf2bc77ce1229b2a52891f23541cdd9858b5250e64",
|
||||
"digest": "06bbaeb62ae2e0081d184eba42b9f15be0d0b3f4901142b08a8a1430ff83e722",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"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"
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools-linux-x64/React Native DevTools"
|
||||
},
|
||||
"macos-aarch64": {
|
||||
"size": 110891041,
|
||||
"size": 110891603,
|
||||
"hash": "sha256",
|
||||
"digest": "3cbe8b1b3d17e433347f1601435bb9a6cb758528a5c176a66fc52d9977223175",
|
||||
"digest": "eeb9cc1399c0c38c429848dbf622f1b46e88d7d97788dcdc4c30a9fcce37705c",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"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"
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
|
||||
},
|
||||
"macos-x86_64": {
|
||||
"size": 117766158,
|
||||
"size": 117770388,
|
||||
"hash": "sha256",
|
||||
"digest": "6fb79bc2ba3008401b4c9c128248657b95b98581ccde60f8fadb622163779775",
|
||||
"digest": "a65e446e526502b267cbe6800ae031e4e1b5b0aca21412152a66ffe1d3a29410",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"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"
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
|
||||
},
|
||||
"windows-x86_64": {
|
||||
"size": 125527537,
|
||||
"size": 125526370,
|
||||
"hash": "sha256",
|
||||
"digest": "579a5b0944c51c3b1b541ad5af66c1ffedf93cae2a891ecdf88cb7219fd9b096",
|
||||
"digest": "26b190c0f85249dee91999e020b8fe7ffd5c007458a2103ed3822558861dbe87",
|
||||
"providers": [
|
||||
{
|
||||
"type": "http",
|
||||
"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"
|
||||
"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"
|
||||
}
|
||||
],
|
||||
"format": "tar.gz",
|
||||
|
||||
-8
@@ -191,14 +191,6 @@ 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
|
||||
}
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ internal fun readPackageJsonFile(
|
||||
return packageJson?.let { JsonUtils.fromPackageJson(it) }
|
||||
}
|
||||
|
||||
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/hermesc/%OS-BIN%/"
|
||||
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/%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/"
|
||||
|
||||
+2
-2
@@ -165,8 +165,8 @@ class PathUtilsTest {
|
||||
@Test
|
||||
@WithOs(OS.MAC)
|
||||
fun detectOSAwareHermesCommand_withHermesV1Enabled() {
|
||||
tempFolder.newFolder("node_modules/hermes-compiler/hermesc/osx-bin/")
|
||||
val expected = tempFolder.newFile("node_modules/hermes-compiler/hermesc/osx-bin/hermesc")
|
||||
tempFolder.newFolder("node_modules/hermes-compiler/osx-bin/")
|
||||
val expected = tempFolder.newFile("node_modules/hermes-compiler/osx-bin/hermesc")
|
||||
|
||||
assertThat(detectOSAwareHermesCommand(tempFolder.root, "", hermesV1Enabled = true))
|
||||
.isEqualTo(expected.toString())
|
||||
|
||||
@@ -540,7 +540,7 @@ function buildEventEmitterSchema(
|
||||
|
||||
return {
|
||||
name: eventemitterName,
|
||||
optional: Boolean(property.optional),
|
||||
optional: false,
|
||||
typeAnnotation: {
|
||||
type: 'EventEmitterTypeAnnotation',
|
||||
typeAnnotation: eventTypeAnnotation,
|
||||
|
||||
+6
-6
@@ -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}]},
|
||||
style: {transform: [{translateY: translateY}]},
|
||||
}
|
||||
: null;
|
||||
|
||||
@@ -303,20 +303,20 @@ const ScrollViewStickyHeader: component(
|
||||
passthroughAnimatedPropExplicitValues
|
||||
}>
|
||||
{cloneElement(child, {
|
||||
onLayout: undefined, // we call this manually through our this._onLayout
|
||||
style: styles.fill, // We transfer the child style to the wrapper.
|
||||
onLayout: undefined, // we call this manually through our this._onLayout
|
||||
})}
|
||||
</Animated.View>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
fill: {
|
||||
flex: 1,
|
||||
},
|
||||
header: {
|
||||
zIndex: 10,
|
||||
},
|
||||
fill: {
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
|
||||
export default ScrollViewStickyHeader;
|
||||
|
||||
@@ -47,14 +47,15 @@ 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);
|
||||
@@ -112,7 +113,6 @@ 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, {
|
||||
bounciness,
|
||||
toValue,
|
||||
useNativeDriver: true,
|
||||
velocity,
|
||||
bounciness,
|
||||
useNativeDriver: true,
|
||||
}).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,14 +21,12 @@ 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: ['focus', 'blur', 'hotspotUpdate', 'setPressed'],
|
||||
supportedCommands: ['hotspotUpdate', 'setPressed'],
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
+21
-21
@@ -39,24 +39,6 @@ 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;
|
||||
@@ -73,6 +55,24 @@ 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>,
|
||||
);
|
||||
|
||||
@@ -161,7 +161,7 @@ let reactJsInspectorTracing = RNTarget(
|
||||
name: .reactJsInspectorTracing,
|
||||
path: "ReactCommon/jsinspector-modern/tracing",
|
||||
excludedPaths: ["tests"],
|
||||
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .reactJsInspectorNetwork, .jsi, .reactOSCompat]
|
||||
dependencies: [.reactNativeDependencies, .reactFeatureFlags, .jsi, .reactOSCompat]
|
||||
)
|
||||
|
||||
/// React-jsinspectornetwork.podspec
|
||||
|
||||
-56
@@ -1540,62 +1540,6 @@ 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
|
||||
|
||||
-10
@@ -328,15 +328,6 @@ 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() {
|
||||
@@ -1455,7 +1446,6 @@ public class ReactInstanceManager {
|
||||
*/
|
||||
private ReactApplicationContext createReactContext(
|
||||
JavaScriptExecutor jsExecutor, JSBundleLoader jsBundleLoader) {
|
||||
|
||||
FLog.d(ReactConstants.TAG, "ReactInstanceManager.createReactContext()");
|
||||
ReactMarker.logMarker(CREATE_REACT_CONTEXT_START, jsExecutor.getName());
|
||||
|
||||
|
||||
+19
-24
@@ -196,11 +196,9 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
||||
|
||||
private val nodesManagerRef = AtomicReference<NativeAnimatedNodesManager?>()
|
||||
|
||||
private var batchingControlledByJS = false // TODO T71377544: delete
|
||||
@Volatile private var currentFrameNumber: Long = 0
|
||||
|
||||
@Volatile private var currentFrameNumber: Long = 0 // TODO T71377544: delete
|
||||
|
||||
@Volatile private var currentBatchNumber: Long = 0
|
||||
@Volatile private var currentBatchNumber: Long = 0 // frame number at last operations dispatch
|
||||
|
||||
private var initializedForFabric = false
|
||||
private var initializedForNonFabric = false
|
||||
@@ -282,22 +280,19 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
||||
|
||||
var batchNumber = currentBatchNumber - 1
|
||||
|
||||
// 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
|
||||
}
|
||||
// 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)
|
||||
@@ -484,14 +479,14 @@ public class NativeAnimatedModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun startOperationBatch() {
|
||||
batchingControlledByJS = true
|
||||
currentBatchNumber++
|
||||
// no-op
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
override fun finishOperationBatch() {
|
||||
batchingControlledByJS = false
|
||||
currentBatchNumber++
|
||||
// no-op
|
||||
}
|
||||
|
||||
override fun createAnimatedNode(tagDouble: Double, config: ReadableMap) {
|
||||
|
||||
-4
@@ -774,12 +774,8 @@ 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
|
||||
|
||||
+8
-14
@@ -125,12 +125,6 @@ public object DefaultNewArchitectureEntryPoint {
|
||||
privateConcurrentReactEnabled = featureFlags.enableFabricRenderer()
|
||||
privateBridgelessEnabled = featureFlags.enableBridgelessArchitecture()
|
||||
|
||||
val (isValid, errorMessage) =
|
||||
isConfigurationValid(turboModulesEnabled, fabricEnabled, bridgelessEnabled)
|
||||
if (!isValid) {
|
||||
error(errorMessage)
|
||||
}
|
||||
|
||||
DefaultSoLoader.maybeLoadSoLibrary()
|
||||
}
|
||||
|
||||
@@ -164,13 +158,13 @@ public object DefaultNewArchitectureEntryPoint {
|
||||
fabricEnabled: Boolean,
|
||||
bridgelessEnabled: Boolean,
|
||||
): Pair<Boolean, String> =
|
||||
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 ""
|
||||
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 ""
|
||||
}
|
||||
}
|
||||
|
||||
+1
-7
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<ce122427070db337420728a1028bc2b6>>
|
||||
* @generated SignedSource<<f089964c958dfcac00f83c3371ccbefc>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -192,12 +192,6 @@ 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.
|
||||
*/
|
||||
|
||||
+1
-11
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<e7581ab264bca8b059723bd7bd788790>>
|
||||
* @generated SignedSource<<912dec895495052328e7e52b94a6738a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -47,7 +47,6 @@ 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
|
||||
@@ -338,15 +337,6 @@ 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) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<d73f5df2130479a4cd1000dc76b15d1b>>
|
||||
* @generated SignedSource<<ba1e53d93b9fdaf298a034543bc44a57>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -82,8 +82,6 @@ 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
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<4fa15189361a6c92bdd44bafc9356167>>
|
||||
* @generated SignedSource<<7601cbcde75ff19ef0fe67f6faef2549>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -77,8 +77,6 @@ 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
|
||||
|
||||
+1
-12
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<962c60d1761b0a1f4945b44767aa7b02>>
|
||||
* @generated SignedSource<<3a13f8e35423b634ed4ef46fbac3c1e9>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,6 @@ 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
|
||||
@@ -369,16 +368,6 @@ 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) {
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f9f3dee3dde2f7f6f851ce4525a4ebec>>
|
||||
* @generated SignedSource<<143b568248e68033efaefc3f178ff6db>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -77,8 +77,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableImperativeFocus(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableLayoutAnimationsOnAndroid(): Boolean
|
||||
|
||||
+2
-2
@@ -34,6 +34,7 @@ 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
|
||||
@@ -522,7 +523,6 @@ 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 com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode) {
|
||||
} else if (child is 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)
|
||||
|
||||
-2
@@ -5,8 +5,6 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
package com.facebook.react.views.text.frescosupport
|
||||
|
||||
import android.content.Context
|
||||
|
||||
-7
@@ -9,18 +9,11 @@
|
||||
|
||||
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
|
||||
|
||||
-8
@@ -416,14 +416,6 @@ 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)
|
||||
|
||||
-14
@@ -404,8 +404,6 @@ 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 -> {}
|
||||
}
|
||||
}
|
||||
@@ -430,16 +428,4 @@ 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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-15
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<de817bc06ae5ef584db08d6a094c9d03>>
|
||||
* @generated SignedSource<<92c9aa29df580c6d12faa14e60b00e4f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -201,12 +201,6 @@ 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");
|
||||
@@ -622,11 +616,6 @@ 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();
|
||||
@@ -969,9 +958,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"enableImmediateUpdateModeForContentOffsetChanges",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffsetChanges),
|
||||
makeNativeMethod(
|
||||
"enableImperativeFocus",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus),
|
||||
makeNativeMethod(
|
||||
"enableInteropViewManagerClassLookUpOptimizationIOS",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS),
|
||||
|
||||
+1
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f163997b1149c1f1ac1e60f273a5448f>>
|
||||
* @generated SignedSource<<124d1378990fdd09a4d97f9103f81a6a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -111,9 +111,6 @@ 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>);
|
||||
|
||||
|
||||
+12
-24
@@ -13,48 +13,36 @@ import org.junit.Test
|
||||
class DefaultNewArchitectureEntryPointTest {
|
||||
|
||||
@Test
|
||||
fun isConfigurationValid_withEverythingOff_returnsFalse() {
|
||||
val (isValid, errorMessage) =
|
||||
fun isConfigurationValid_withEverythingOff_returnsTrue() {
|
||||
val (isValid, _) =
|
||||
DefaultNewArchitectureEntryPoint.isConfigurationValid(
|
||||
turboModulesEnabled = false,
|
||||
fabricEnabled = false,
|
||||
bridgelessEnabled = false,
|
||||
)
|
||||
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)"
|
||||
)
|
||||
assertThat(isValid).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isConfigurationValid_withNewArchOnlyOn_returnsFalse() {
|
||||
val (isValid, errorMessage) =
|
||||
fun isConfigurationValid_withNewArchOn_returnsTrue() {
|
||||
val (isValid, _) =
|
||||
DefaultNewArchitectureEntryPoint.isConfigurationValid(
|
||||
turboModulesEnabled = true,
|
||||
fabricEnabled = true,
|
||||
bridgelessEnabled = false,
|
||||
)
|
||||
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)"
|
||||
)
|
||||
assertThat(isValid).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun isConfigurationValid_withTurboModulesOnlyOn_returnsFalse() {
|
||||
val (isValid, errorMessage) =
|
||||
fun isConfigurationValid_withTurboModulesOnlyOn_returnsTrue() {
|
||||
val (isValid, _) =
|
||||
DefaultNewArchitectureEntryPoint.isConfigurationValid(
|
||||
turboModulesEnabled = true,
|
||||
fabricEnabled = false,
|
||||
bridgelessEnabled = false,
|
||||
)
|
||||
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)"
|
||||
)
|
||||
assertThat(isValid).isTrue()
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -79,7 +67,7 @@ class DefaultNewArchitectureEntryPointTest {
|
||||
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=true, bridgelessEnabled=false)"
|
||||
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
)
|
||||
}
|
||||
|
||||
@@ -94,7 +82,7 @@ class DefaultNewArchitectureEntryPointTest {
|
||||
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=true, bridgelessEnabled=true)"
|
||||
"fabricEnabled=true requires turboModulesEnabled=true (is now false) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
)
|
||||
}
|
||||
|
||||
@@ -109,7 +97,7 @@ class DefaultNewArchitectureEntryPointTest {
|
||||
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=true)"
|
||||
"bridgelessEnabled=true requires (turboModulesEnabled=true AND fabricEnabled=true) - Please update your DefaultNewArchitectureEntryPoint.load() parameters."
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,11 +13,13 @@ namespace facebook::react::jsinspector_modern::cdp::network {
|
||||
|
||||
namespace {
|
||||
|
||||
folly::dynamic headersToDynamic(const Headers& headers) {
|
||||
folly::dynamic headersToDynamic(const std::optional<Headers>& headers) {
|
||||
folly::dynamic result = folly::dynamic::object;
|
||||
|
||||
for (const auto& [key, value] : headers) {
|
||||
result[key] = value;
|
||||
if (headers) {
|
||||
for (const auto& [key, value] : *headers) {
|
||||
result[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -39,14 +41,14 @@ folly::dynamic Request::toDynamic() const {
|
||||
/* static */ Response Response::fromInputParams(
|
||||
const std::string& url,
|
||||
uint16_t status,
|
||||
const Headers& headers,
|
||||
const std::optional<Headers>& headers,
|
||||
int encodedDataLength) {
|
||||
return {
|
||||
.url = url,
|
||||
.status = status,
|
||||
.statusText = httpReasonPhrase(status),
|
||||
.headers = headers,
|
||||
.mimeType = mimeTypeFromHeaders(headers),
|
||||
.mimeType = mimeTypeFromHeaders(headers.value_or(Headers())),
|
||||
.encodedDataLength = encodedDataLength,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ using Headers = std::map<std::string, std::string>;
|
||||
struct Request {
|
||||
std::string url;
|
||||
std::string method;
|
||||
Headers headers;
|
||||
std::optional<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;
|
||||
Headers headers;
|
||||
std::optional<Headers> headers;
|
||||
std::string mimeType;
|
||||
int encodedDataLength;
|
||||
|
||||
@@ -48,7 +48,7 @@ struct Response {
|
||||
static Response fromInputParams(
|
||||
const std::string& url,
|
||||
uint16_t status,
|
||||
const Headers& headers,
|
||||
const std::optional<Headers>& headers,
|
||||
int encodedDataLength);
|
||||
|
||||
folly::dynamic toDynamic() const;
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
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).
|
||||
*/
|
||||
@@ -23,6 +21,7 @@ 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 Headers& headers);
|
||||
std::string mimeTypeFromHeaders(
|
||||
const std::map<std::string, std::string>& headers);
|
||||
|
||||
} // namespace facebook::react::jsinspector_modern
|
||||
|
||||
@@ -18,7 +18,6 @@ target_include_directories(jsinspector_tracing PUBLIC ${REACT_COMMON_DIR})
|
||||
|
||||
target_link_libraries(jsinspector_tracing
|
||||
folly_runtime
|
||||
jsinspector_network
|
||||
oscompat
|
||||
react_timing
|
||||
)
|
||||
|
||||
+19
-82
@@ -9,8 +9,6 @@
|
||||
#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>
|
||||
|
||||
@@ -18,12 +16,9 @@
|
||||
|
||||
#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).
|
||||
@@ -36,7 +31,6 @@ ThreadId getCurrentThreadId() {
|
||||
oscompat::getCurrentThreadId();
|
||||
return CURRENT_THREAD_ID;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
PerformanceTracer& PerformanceTracer::getInstance() {
|
||||
@@ -238,9 +232,15 @@ void PerformanceTracer::reportEventLoopMicrotasks(
|
||||
});
|
||||
}
|
||||
|
||||
void PerformanceTracer::reportResourceWillSendRequest(
|
||||
const std::string& devtoolsRequestId,
|
||||
HighResTimeStamp start) {
|
||||
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) {
|
||||
if (!tracingAtomic_) {
|
||||
return;
|
||||
}
|
||||
@@ -251,82 +251,27 @@ void PerformanceTracer::reportResourceWillSendRequest(
|
||||
}
|
||||
|
||||
enqueueEvent(PerformanceTracerResourceWillSendRequest{
|
||||
.requestId = devtoolsRequestId,
|
||||
.start = start,
|
||||
.requestId = requestId,
|
||||
.start = fetchStart,
|
||||
.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 = devtoolsRequestId,
|
||||
.requestId = requestId,
|
||||
.url = url,
|
||||
.start = start,
|
||||
.start = fetchStart,
|
||||
.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 = devtoolsRequestId,
|
||||
.start = start,
|
||||
.encodedDataLength = encodedDataLength,
|
||||
.headers = headers,
|
||||
.mimeType = jsinspector_modern::mimeTypeFromHeaders(headers),
|
||||
.protocol = "h2",
|
||||
.requestId = requestId,
|
||||
.start = responseStart,
|
||||
.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 = devtoolsRequestId,
|
||||
.start = start,
|
||||
.requestId = requestId,
|
||||
.start = responseEnd,
|
||||
.threadId = getCurrentThreadId(),
|
||||
});
|
||||
}
|
||||
@@ -622,7 +567,7 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
[&](PerformanceTracerResourceSendRequest&& event) {
|
||||
folly::dynamic data =
|
||||
folly::dynamic::object("initiator", folly::dynamic::object())(
|
||||
"priority", "VeryHigh")("renderBlocking", "non_blocking")(
|
||||
"renderBlocking", "non_blocking")(
|
||||
"requestId", std::move(event.requestId))(
|
||||
"requestMethod", std::move(event.requestMethod))(
|
||||
"resourceType", std::move(event.resourceType))(
|
||||
@@ -640,15 +585,7 @@ void PerformanceTracer::enqueueTraceEventsFromPerformanceTracerEvent(
|
||||
});
|
||||
},
|
||||
[&](PerformanceTracerResourceReceiveResponse&& event) {
|
||||
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)(
|
||||
folly::dynamic data = folly::dynamic::object("protocol", "h2")(
|
||||
"requestId", std::move(event.requestId))(
|
||||
"statusCode", event.statusCode)(
|
||||
"timing", folly::dynamic::object());
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <folly/dynamic.h>
|
||||
#include <atomic>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
@@ -25,8 +24,6 @@ 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.
|
||||
@@ -112,53 +109,19 @@ class PerformanceTracer {
|
||||
void reportEventLoopMicrotasks(HighResTimeStamp start, HighResTimeStamp end);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* Record a "ResourceSendRequest"/"ResourceFinish" event pair - a labelled
|
||||
* duration in the Performance timeline Network track. If not currently
|
||||
* tracing, this is a no-op.
|
||||
*/
|
||||
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,
|
||||
void reportResourceTiming(
|
||||
const std::string& requestId,
|
||||
const std::string& url,
|
||||
const std::string& requestMethod,
|
||||
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,
|
||||
HighResTimeStamp fetchStart,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
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);
|
||||
const std::string& requestMethod,
|
||||
const std::string& resourceType);
|
||||
|
||||
/**
|
||||
* Creates "Profile" Trace Event.
|
||||
@@ -260,10 +223,6 @@ 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();
|
||||
|
||||
-1
@@ -43,7 +43,6 @@ 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<<50f81f60d4c2d2e08fde98f4a2d841ea>>
|
||||
* @generated SignedSource<<42bea10b4b62a91dce8fde7674f76ceb>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -134,10 +134,6 @@ 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<<3446eebd26c1142fd78cd5413771569d>>
|
||||
* @generated SignedSource<<40421ac664927693136a8e3197e3c07c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -174,11 +174,6 @@ 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.
|
||||
*/
|
||||
|
||||
+47
-65
@@ -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<<891375f88b3f48b324de29e31c8936cf>>
|
||||
* @generated SignedSource<<e433f2f36d7a2852aaea2b37f671a7e1>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -515,24 +515,6 @@ 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();
|
||||
|
||||
@@ -542,7 +524,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(28, "enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
markFlagAsAccessed(27, "enableInteropViewManagerClassLookUpOptimizationIOS");
|
||||
|
||||
flagValue = currentProvider_->enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
enableInteropViewManagerClassLookUpOptimizationIOS_ = flagValue;
|
||||
@@ -560,7 +542,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(29, "enableLayoutAnimationsOnAndroid");
|
||||
markFlagAsAccessed(28, "enableLayoutAnimationsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
|
||||
enableLayoutAnimationsOnAndroid_ = flagValue;
|
||||
@@ -578,7 +560,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(30, "enableLayoutAnimationsOnIOS");
|
||||
markFlagAsAccessed(29, "enableLayoutAnimationsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
|
||||
enableLayoutAnimationsOnIOS_ = flagValue;
|
||||
@@ -596,7 +578,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(31, "enableMainQueueCoordinatorOnIOS");
|
||||
markFlagAsAccessed(30, "enableMainQueueCoordinatorOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableMainQueueCoordinatorOnIOS();
|
||||
enableMainQueueCoordinatorOnIOS_ = flagValue;
|
||||
@@ -614,7 +596,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(32, "enableModuleArgumentNSNullConversionIOS");
|
||||
markFlagAsAccessed(31, "enableModuleArgumentNSNullConversionIOS");
|
||||
|
||||
flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS();
|
||||
enableModuleArgumentNSNullConversionIOS_ = flagValue;
|
||||
@@ -632,7 +614,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(33, "enableNativeCSSParsing");
|
||||
markFlagAsAccessed(32, "enableNativeCSSParsing");
|
||||
|
||||
flagValue = currentProvider_->enableNativeCSSParsing();
|
||||
enableNativeCSSParsing_ = flagValue;
|
||||
@@ -650,7 +632,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(34, "enableNetworkEventReporting");
|
||||
markFlagAsAccessed(33, "enableNetworkEventReporting");
|
||||
|
||||
flagValue = currentProvider_->enableNetworkEventReporting();
|
||||
enableNetworkEventReporting_ = flagValue;
|
||||
@@ -668,7 +650,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(35, "enablePreparedTextLayout");
|
||||
markFlagAsAccessed(34, "enablePreparedTextLayout");
|
||||
|
||||
flagValue = currentProvider_->enablePreparedTextLayout();
|
||||
enablePreparedTextLayout_ = flagValue;
|
||||
@@ -686,7 +668,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(36, "enablePropsUpdateReconciliationAndroid");
|
||||
markFlagAsAccessed(35, "enablePropsUpdateReconciliationAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
|
||||
enablePropsUpdateReconciliationAndroid_ = flagValue;
|
||||
@@ -704,7 +686,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(37, "enableResourceTimingAPI");
|
||||
markFlagAsAccessed(36, "enableResourceTimingAPI");
|
||||
|
||||
flagValue = currentProvider_->enableResourceTimingAPI();
|
||||
enableResourceTimingAPI_ = flagValue;
|
||||
@@ -722,7 +704,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(38, "enableSwiftUIBasedFilters");
|
||||
markFlagAsAccessed(37, "enableSwiftUIBasedFilters");
|
||||
|
||||
flagValue = currentProvider_->enableSwiftUIBasedFilters();
|
||||
enableSwiftUIBasedFilters_ = flagValue;
|
||||
@@ -740,7 +722,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(39, "enableViewCulling");
|
||||
markFlagAsAccessed(38, "enableViewCulling");
|
||||
|
||||
flagValue = currentProvider_->enableViewCulling();
|
||||
enableViewCulling_ = flagValue;
|
||||
@@ -758,7 +740,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(40, "enableViewRecycling");
|
||||
markFlagAsAccessed(39, "enableViewRecycling");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecycling();
|
||||
enableViewRecycling_ = flagValue;
|
||||
@@ -776,7 +758,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(41, "enableViewRecyclingForImage");
|
||||
markFlagAsAccessed(40, "enableViewRecyclingForImage");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForImage();
|
||||
enableViewRecyclingForImage_ = flagValue;
|
||||
@@ -794,7 +776,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(42, "enableViewRecyclingForScrollView");
|
||||
markFlagAsAccessed(41, "enableViewRecyclingForScrollView");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForScrollView();
|
||||
enableViewRecyclingForScrollView_ = flagValue;
|
||||
@@ -812,7 +794,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(43, "enableViewRecyclingForText");
|
||||
markFlagAsAccessed(42, "enableViewRecyclingForText");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForText();
|
||||
enableViewRecyclingForText_ = flagValue;
|
||||
@@ -830,7 +812,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(44, "enableViewRecyclingForView");
|
||||
markFlagAsAccessed(43, "enableViewRecyclingForView");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecyclingForView();
|
||||
enableViewRecyclingForView_ = flagValue;
|
||||
@@ -848,7 +830,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(45, "enableVirtualViewDebugFeatures");
|
||||
markFlagAsAccessed(44, "enableVirtualViewDebugFeatures");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewDebugFeatures();
|
||||
enableVirtualViewDebugFeatures_ = flagValue;
|
||||
@@ -866,7 +848,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(46, "enableVirtualViewRenderState");
|
||||
markFlagAsAccessed(45, "enableVirtualViewRenderState");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewRenderState();
|
||||
enableVirtualViewRenderState_ = flagValue;
|
||||
@@ -884,7 +866,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(47, "enableVirtualViewWindowFocusDetection");
|
||||
markFlagAsAccessed(46, "enableVirtualViewWindowFocusDetection");
|
||||
|
||||
flagValue = currentProvider_->enableVirtualViewWindowFocusDetection();
|
||||
enableVirtualViewWindowFocusDetection_ = flagValue;
|
||||
@@ -902,7 +884,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(48, "enableWebPerformanceAPIsByDefault");
|
||||
markFlagAsAccessed(47, "enableWebPerformanceAPIsByDefault");
|
||||
|
||||
flagValue = currentProvider_->enableWebPerformanceAPIsByDefault();
|
||||
enableWebPerformanceAPIsByDefault_ = flagValue;
|
||||
@@ -920,7 +902,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(49, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
markFlagAsAccessed(48, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
|
||||
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
|
||||
@@ -938,7 +920,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(50, "fuseboxEnabledRelease");
|
||||
markFlagAsAccessed(49, "fuseboxEnabledRelease");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledRelease();
|
||||
fuseboxEnabledRelease_ = flagValue;
|
||||
@@ -956,7 +938,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(51, "fuseboxNetworkInspectionEnabled");
|
||||
markFlagAsAccessed(50, "fuseboxNetworkInspectionEnabled");
|
||||
|
||||
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
|
||||
fuseboxNetworkInspectionEnabled_ = flagValue;
|
||||
@@ -974,7 +956,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(52, "hideOffscreenVirtualViewsOnIOS");
|
||||
markFlagAsAccessed(51, "hideOffscreenVirtualViewsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
|
||||
hideOffscreenVirtualViewsOnIOS_ = flagValue;
|
||||
@@ -992,7 +974,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(53, "overrideBySynchronousMountPropsAtMountingAndroid");
|
||||
markFlagAsAccessed(52, "overrideBySynchronousMountPropsAtMountingAndroid");
|
||||
|
||||
flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid();
|
||||
overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue;
|
||||
@@ -1010,7 +992,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(54, "perfMonitorV2Enabled");
|
||||
markFlagAsAccessed(53, "perfMonitorV2Enabled");
|
||||
|
||||
flagValue = currentProvider_->perfMonitorV2Enabled();
|
||||
perfMonitorV2Enabled_ = flagValue;
|
||||
@@ -1028,7 +1010,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(55, "preparedTextCacheSize");
|
||||
markFlagAsAccessed(54, "preparedTextCacheSize");
|
||||
|
||||
flagValue = currentProvider_->preparedTextCacheSize();
|
||||
preparedTextCacheSize_ = flagValue;
|
||||
@@ -1046,7 +1028,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(56, "preventShadowTreeCommitExhaustion");
|
||||
markFlagAsAccessed(55, "preventShadowTreeCommitExhaustion");
|
||||
|
||||
flagValue = currentProvider_->preventShadowTreeCommitExhaustion();
|
||||
preventShadowTreeCommitExhaustion_ = flagValue;
|
||||
@@ -1064,7 +1046,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(57, "shouldPressibilityUseW3CPointerEventsForHover");
|
||||
markFlagAsAccessed(56, "shouldPressibilityUseW3CPointerEventsForHover");
|
||||
|
||||
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
|
||||
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
|
||||
@@ -1082,7 +1064,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(58, "skipActivityIdentityAssertionOnHostPause");
|
||||
markFlagAsAccessed(57, "skipActivityIdentityAssertionOnHostPause");
|
||||
|
||||
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
|
||||
skipActivityIdentityAssertionOnHostPause_ = flagValue;
|
||||
@@ -1100,7 +1082,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(59, "sweepActiveTouchOnChildNativeGesturesAndroid");
|
||||
markFlagAsAccessed(58, "sweepActiveTouchOnChildNativeGesturesAndroid");
|
||||
|
||||
flagValue = currentProvider_->sweepActiveTouchOnChildNativeGesturesAndroid();
|
||||
sweepActiveTouchOnChildNativeGesturesAndroid_ = flagValue;
|
||||
@@ -1118,7 +1100,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(60, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(59, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -1136,7 +1118,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(61, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
markFlagAsAccessed(60, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
@@ -1154,7 +1136,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(62, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(61, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -1172,7 +1154,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(63, "useFabricInterop");
|
||||
markFlagAsAccessed(62, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -1190,7 +1172,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(64, "useNativeEqualsInNativeReadableArrayAndroid");
|
||||
markFlagAsAccessed(63, "useNativeEqualsInNativeReadableArrayAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNativeEqualsInNativeReadableArrayAndroid();
|
||||
useNativeEqualsInNativeReadableArrayAndroid_ = flagValue;
|
||||
@@ -1208,7 +1190,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(65, "useNativeTransformHelperAndroid");
|
||||
markFlagAsAccessed(64, "useNativeTransformHelperAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNativeTransformHelperAndroid();
|
||||
useNativeTransformHelperAndroid_ = flagValue;
|
||||
@@ -1226,7 +1208,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(66, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(65, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -1244,7 +1226,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(67, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(66, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -1262,7 +1244,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(68, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(67, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -1280,7 +1262,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(69, "useShadowNodeStateOnClone");
|
||||
markFlagAsAccessed(68, "useShadowNodeStateOnClone");
|
||||
|
||||
flagValue = currentProvider_->useShadowNodeStateOnClone();
|
||||
useShadowNodeStateOnClone_ = flagValue;
|
||||
@@ -1298,7 +1280,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(70, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(69, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -1316,7 +1298,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(71, "useTurboModules");
|
||||
markFlagAsAccessed(70, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
@@ -1334,7 +1316,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(72, "virtualViewHysteresisRatio");
|
||||
markFlagAsAccessed(71, "virtualViewHysteresisRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewHysteresisRatio();
|
||||
virtualViewHysteresisRatio_ = flagValue;
|
||||
@@ -1352,7 +1334,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(73, "virtualViewPrerenderRatio");
|
||||
markFlagAsAccessed(72, "virtualViewPrerenderRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewPrerenderRatio();
|
||||
virtualViewPrerenderRatio_ = flagValue;
|
||||
|
||||
+2
-4
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<53981e017d681009b240ad6b5d09d4d8>>
|
||||
* @generated SignedSource<<6f05211b44f2be076b37ef9178e5ef43>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -59,7 +59,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool enableImagePrefetchingAndroid();
|
||||
bool enableImagePrefetchingOnUiThreadAndroid();
|
||||
bool enableImmediateUpdateModeForContentOffsetChanges();
|
||||
bool enableImperativeFocus();
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
bool enableLayoutAnimationsOnAndroid();
|
||||
bool enableLayoutAnimationsOnIOS();
|
||||
@@ -117,7 +116,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 74> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 73> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
||||
@@ -146,7 +145,6 @@ 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_;
|
||||
|
||||
+1
-5
@@ -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<<6c1c050029f105d0075fb83ca21aa48b>>
|
||||
* @generated SignedSource<<b6da08857919846dda053b3635fb9702>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -135,10 +135,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableImperativeFocus() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-10
@@ -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<<0bef63a074aa6b67787c2ca30706a847>>
|
||||
* @generated SignedSource<<737e882a924b2730d0c67cc8dc27c8a7>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -288,15 +288,6 @@ 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()) {
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<40ea902a1d376324f75680d651f3eff6>>
|
||||
* @generated SignedSource<<4045a760f000400d47117728119f0d21>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -52,7 +52,6 @@ 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;
|
||||
|
||||
+1
-6
@@ -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<<c97db1f02897c99b61643cac10067c6d>>
|
||||
* @generated SignedSource<<5042321d7d0da40cc0436ffaeedda168>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -179,11 +179,6 @@ bool NativeReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetCha
|
||||
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableImperativeFocus(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableImperativeFocus();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
|
||||
|
||||
+1
-3
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<ae105f2906573a4f8955c086d3441389>>
|
||||
* @generated SignedSource<<b1583692e9e07ae68b946496cb94e3e9>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -90,8 +90,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime& runtime);
|
||||
|
||||
bool enableImperativeFocus(jsi::Runtime& runtime);
|
||||
|
||||
bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime& runtime);
|
||||
|
||||
bool enableLayoutAnimationsOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
@@ -17,7 +17,5 @@ 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,7 +11,6 @@
|
||||
#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>
|
||||
@@ -36,9 +35,9 @@ void NetworkReporter::reportRequestStart(
|
||||
const RequestInfo& requestInfo,
|
||||
int encodedDataLength,
|
||||
const std::optional<ResponseInfo>& redirectResponse) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
@@ -46,6 +45,7 @@ void NetworkReporter::reportRequestStart(
|
||||
requestId,
|
||||
ResourceTimingData{
|
||||
.url = requestInfo.url,
|
||||
.requestMethod = requestInfo.httpMethod,
|
||||
.fetchStart = now,
|
||||
.requestStart = now,
|
||||
});
|
||||
@@ -53,15 +53,13 @@ void NetworkReporter::reportRequestStart(
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
auto headers = requestInfo.headers.value_or(Headers{});
|
||||
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onRequestWillBeSent(
|
||||
requestId,
|
||||
{
|
||||
.url = requestInfo.url,
|
||||
.method = requestInfo.httpMethod,
|
||||
.headers = headers,
|
||||
.headers = requestInfo.headers,
|
||||
.postData = requestInfo.httpBody,
|
||||
},
|
||||
redirectResponse.has_value()
|
||||
@@ -69,25 +67,18 @@ void NetworkReporter::reportRequestStart(
|
||||
jsinspector_modern::cdp::network::Response::fromInputParams(
|
||||
redirectResponse->url,
|
||||
redirectResponse->statusCode,
|
||||
redirectResponse->headers.value_or(Headers{}),
|
||||
redirectResponse->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) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
@@ -99,7 +90,7 @@ void NetworkReporter::reportConnectionTiming(
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance()
|
||||
.onRequestWillBeSentExtraInfo(requestId, headers.value_or(Headers{}));
|
||||
#endif
|
||||
@@ -109,9 +100,9 @@ void NetworkReporter::reportResponseStart(
|
||||
const std::string& requestId,
|
||||
const ResponseInfo& responseInfo,
|
||||
int encodedDataLength) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Annotate PerformanceResourceTiming metadata
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
@@ -120,26 +111,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
|
||||
auto headers = responseInfo.headers.value_or(Headers{});
|
||||
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onResponseReceived(
|
||||
requestId,
|
||||
jsinspector_modern::cdp::network::Response::fromInputParams(
|
||||
responseInfo.url,
|
||||
responseInfo.statusCode,
|
||||
headers,
|
||||
responseInfo.headers,
|
||||
encodedDataLength));
|
||||
|
||||
// Debugger enabled: Add trace event to Performance timeline
|
||||
jsinspector_modern::tracing::PerformanceTracer::getInstance()
|
||||
.reportResourceReceiveResponse(
|
||||
requestId, now, responseInfo.statusCode, headers, encodedDataLength);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -148,7 +139,7 @@ void NetworkReporter::reportDataReceived(
|
||||
int dataLength,
|
||||
const std::optional<int>& encodedDataLength) {
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onDataReceived(
|
||||
requestId, dataLength, encodedDataLength.value_or(dataLength));
|
||||
#endif
|
||||
@@ -157,9 +148,9 @@ void NetworkReporter::reportDataReceived(
|
||||
void NetworkReporter::reportResponseEnd(
|
||||
const std::string& requestId,
|
||||
int encodedDataLength) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
if (ReactNativeFeatureFlags::enableResourceTimingAPI()) {
|
||||
auto now = HighResTimeStamp::now();
|
||||
|
||||
// All builds: Report PerformanceResourceTiming event
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
||||
@@ -174,20 +165,19 @@ void NetworkReporter::reportResponseEnd(
|
||||
eventData.connectEnd.value_or(now),
|
||||
eventData.responseStart.value_or(now),
|
||||
now,
|
||||
eventData.responseStatus);
|
||||
eventData.responseStatus,
|
||||
requestId,
|
||||
eventData.requestMethod,
|
||||
eventData.resourceType);
|
||||
perfTimingsBuffer_.erase(requestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: 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
|
||||
}
|
||||
|
||||
@@ -195,7 +185,7 @@ void NetworkReporter::reportRequestFailed(
|
||||
const std::string& requestId,
|
||||
bool cancelled) const {
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: CDP event handling
|
||||
// Debug build: CDP event handling
|
||||
jsinspector_modern::NetworkHandler::getInstance().onLoadingFailed(
|
||||
requestId, cancelled);
|
||||
#endif
|
||||
@@ -206,7 +196,7 @@ void NetworkReporter::storeResponseBody(
|
||||
std::string_view body,
|
||||
bool base64Encoded) {
|
||||
#ifdef REACT_NATIVE_DEBUGGER_ENABLED
|
||||
// Debugger enabled: Store fetched response body for later CDP retrieval
|
||||
// Debug build: Store fetched response body for later CDP retrieval
|
||||
jsinspector_modern::NetworkHandler::getInstance().storeResponseBody(
|
||||
requestId, body, base64Encoded);
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace facebook::react {
|
||||
*/
|
||||
struct ResourceTimingData {
|
||||
std::string url;
|
||||
std::string requestMethod;
|
||||
std::optional<std::string> resourceType;
|
||||
HighResTimeStamp fetchStart;
|
||||
HighResTimeStamp requestStart;
|
||||
std::optional<HighResTimeStamp> connectStart;
|
||||
@@ -54,8 +56,7 @@ class NetworkReporter {
|
||||
/**
|
||||
* Report a network request that is about to be sent.
|
||||
*
|
||||
* - Corresponds to `Network.requestWillBeSent` and the
|
||||
* "ResourceWillSendRequest" trace event in CDP.
|
||||
* - Corresponds to `Network.requestWillBeSent` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.requestStart` (specifically,
|
||||
* marking when the native request was initiated).
|
||||
*
|
||||
@@ -71,8 +72,7 @@ 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` and the
|
||||
* "ResourceSendRequest" trace event in CDP.
|
||||
* - Corresponds to `Network.requestWillBeSentExtraInfo` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.domainLookupStart`,
|
||||
* `PerformanceResourceTiming.connectStart`. Defined as "immediately before
|
||||
* the browser starts to establish the connection to the server".
|
||||
@@ -87,8 +87,7 @@ 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` and the
|
||||
* "ResourceReceiveResponse" trace event in CDP.
|
||||
* - Corresponds to `Network.responseReceived` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.responseStart`.
|
||||
*
|
||||
* https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responsestart
|
||||
@@ -113,8 +112,7 @@ class NetworkReporter {
|
||||
* Report when a network request is complete and we are no longer receiving
|
||||
* response data.
|
||||
*
|
||||
* - Corresponds to `Network.loadingFinished` and the "ResourceFinish" trace
|
||||
* event in CDP.
|
||||
* - Corresponds to `Network.loadingFinished` in CDP.
|
||||
* - Corresponds to `PerformanceResourceTiming.responseEnd`.
|
||||
*
|
||||
* https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responseend
|
||||
|
||||
@@ -43,7 +43,6 @@ 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"
|
||||
|
||||
|
||||
+33
-1
@@ -307,7 +307,10 @@ void PerformanceEntryReporter::reportResourceTiming(
|
||||
std::optional<HighResTimeStamp> connectEnd,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
const std::optional<int>& responseStatus) {
|
||||
const std::optional<int>& responseStatus,
|
||||
const std::optional<std::string>& devtoolsRequestId,
|
||||
const std::optional<std::string>& requestMethod,
|
||||
const std::optional<std::string>& resourceType) {
|
||||
const auto entry = PerformanceResourceTiming{
|
||||
{.name = url, .startTime = fetchStart},
|
||||
fetchStart,
|
||||
@@ -319,6 +322,8 @@ void PerformanceEntryReporter::reportResourceTiming(
|
||||
responseStatus,
|
||||
};
|
||||
|
||||
traceResourceTiming(entry, devtoolsRequestId, requestMethod, resourceType);
|
||||
|
||||
// Add to buffers & notify observers
|
||||
{
|
||||
std::unique_lock lock(buffersMutex_);
|
||||
@@ -370,4 +375,31 @@ 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
|
||||
|
||||
+4
-1
@@ -118,7 +118,10 @@ class PerformanceEntryReporter {
|
||||
std::optional<HighResTimeStamp> connectEnd,
|
||||
HighResTimeStamp responseStart,
|
||||
HighResTimeStamp responseEnd,
|
||||
const std::optional<int>& responseStatus);
|
||||
const std::optional<int>& responseStatus,
|
||||
const std::optional<std::string>& devtoolsRequestId,
|
||||
const std::optional<std::string>& requestMethod,
|
||||
const std::optional<std::string>& resourceType);
|
||||
|
||||
private:
|
||||
std::unique_ptr<PerformanceObserverRegistry> observerRegistry_;
|
||||
|
||||
-9
@@ -112,13 +112,4 @@ 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
|
||||
|
||||
-4
@@ -32,10 +32,6 @@ 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
|
||||
*
|
||||
* @param <ReturnT> caller-specified return type of visitors. This type will
|
||||
* @tparam 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,8 +19,7 @@ namespace facebook::react {
|
||||
*/
|
||||
template <size_t N>
|
||||
struct TemplateStringLiteral {
|
||||
/* implicit */ constexpr TemplateStringLiteral(
|
||||
const char (&str)[N]) { // NOLINT(modernize-avoid-c-arrays)
|
||||
/* implicit */ constexpr TemplateStringLiteral(const char (&str)[N]) {
|
||||
std::copy_n(str, N, value.data());
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<377660a4dc9f8c721ebcd64f759637ac>>
|
||||
* @generated SignedSource<<4ccde3daef50fa7522f10bc7146c0cc6>>
|
||||
*
|
||||
* 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
|
||||
}>
|
||||
|
||||
+1
-2
@@ -28,8 +28,7 @@ export default function mockComponent<
|
||||
instanceMethods: ?interface {},
|
||||
isESModule: TIsESModule,
|
||||
): TIsESModule extends true
|
||||
? // $FlowFixMe[incompatible-use]
|
||||
ModuleDefault<TComponentModule & typeof instanceMethods>
|
||||
? ModuleDefault<TComponentModule & typeof instanceMethods>
|
||||
: TComponentModule & typeof instanceMethods {
|
||||
const RealComponent: TComponentType = isESModule
|
||||
? // $FlowFixMe[prop-missing]
|
||||
|
||||
@@ -336,17 +336,6 @@ 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}/hermesc/osx-bin/hermesc"
|
||||
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/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-hermes-ios-debug.tar.gz
|
||||
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-hermes-ios-#{build_type.to_s}.tar.gz"
|
||||
# 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"
|
||||
else
|
||||
namespace = "com/facebook/react"
|
||||
# Sample url from Maven:
|
||||
|
||||
@@ -38,26 +38,3 @@ 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<<e460eec2e7fe00ccc67bfef14f07b8c5>>
|
||||
* @generated SignedSource<<054add14ea0c9a96d3c3e32af8995437>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -77,7 +77,6 @@ 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>,
|
||||
@@ -313,10 +312,6 @@ 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.
|
||||
*/
|
||||
|
||||
+1
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<a132956fa9481beddb6d94e7d6acfd7c>>
|
||||
* @generated SignedSource<<ae5e2e1799601c6f630a465ec8e64ef6>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -52,7 +52,6 @@ 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,23 +111,41 @@ 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',
|
||||
height: ITEM_INNER_HEIGHT,
|
||||
justifyContent: 'center',
|
||||
marginVertical: ITEM_MARGIN,
|
||||
paddingHorizontal: 20,
|
||||
height: ITEM_INNER_HEIGHT,
|
||||
marginVertical: ITEM_MARGIN,
|
||||
justifyContent: 'center',
|
||||
},
|
||||
list: {
|
||||
flex: 1,
|
||||
header: {
|
||||
fontSize: 32,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
offScreen: {
|
||||
height: 1000,
|
||||
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,
|
||||
},
|
||||
output: {
|
||||
fontSize: 12,
|
||||
@@ -138,29 +156,11 @@ const styles = StyleSheet.create({
|
||||
separatorText: {
|
||||
fontSize: 10,
|
||||
},
|
||||
testContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#f2f2f7ff',
|
||||
flexDirection: 'row',
|
||||
height: 40,
|
||||
justifyContent: 'space-between',
|
||||
list: {
|
||||
flex: 1,
|
||||
},
|
||||
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,
|
||||
container: {flex: 1},
|
||||
offScreen: {
|
||||
height: 1000,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -20,20 +20,20 @@ import {
|
||||
|
||||
const DATA = [
|
||||
{
|
||||
data: ['Pizza', 'Burger', 'Risotto'],
|
||||
title: 'Main dishes',
|
||||
data: ['Pizza', 'Burger', 'Risotto'],
|
||||
},
|
||||
{
|
||||
data: ['French Fries', 'Onion Rings', 'Fried Shrimps'],
|
||||
title: 'Sides',
|
||||
data: ['French Fries', 'Onion Rings', 'Fried Shrimps'],
|
||||
},
|
||||
{
|
||||
data: ['Water', 'Coke', 'Beer'],
|
||||
title: 'Drinks',
|
||||
data: ['Water', 'Coke', 'Beer'],
|
||||
},
|
||||
{
|
||||
data: ['Cheesecake', 'Brownie'],
|
||||
title: 'Desserts',
|
||||
data: ['Cheesecake', 'Brownie'],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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',
|
||||
marginVertical: 8,
|
||||
padding: 20,
|
||||
marginVertical: 8,
|
||||
},
|
||||
list: {
|
||||
flex: 1,
|
||||
header: {
|
||||
fontSize: 32,
|
||||
backgroundColor: 'white',
|
||||
},
|
||||
title: {
|
||||
fontSize: 24,
|
||||
},
|
||||
testContainer: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#f2f2f7ff',
|
||||
height: 40,
|
||||
},
|
||||
output: {
|
||||
flex: 1,
|
||||
fontSize: 12,
|
||||
},
|
||||
testContainer: {
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#f2f2f7ff',
|
||||
flexDirection: 'row',
|
||||
height: 40,
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
title: {
|
||||
fontSize: 24,
|
||||
list: {
|
||||
flex: 1,
|
||||
},
|
||||
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,
|
||||
|
||||
@@ -44,3 +44,26 @@ 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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4944,10 +4944,10 @@ flow-api-translator@0.32.0:
|
||||
hermes-transform "0.32.0"
|
||||
typescript "5.3.2"
|
||||
|
||||
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-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-enums-runtime@^0.0.6:
|
||||
version "0.0.6"
|
||||
|
||||
Reference in New Issue
Block a user