react-native 0.83.0-nightly-20250918-4d2e38edd → 0.83.0-nightly-20250919-cb7453fb9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Components/View/ViewNativeComponent.js +3 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +6 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +39 -3
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +62 -4
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +0 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +8 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +14 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.cpp +5 -7
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.h +3 -3
- package/ReactCommon/jsinspector-modern/network/HttpUtils.h +3 -2
- package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +74 -37
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.h +57 -18
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +65 -47
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +3 -0
- package/ReactCommon/react/nativemodule/webperformance/NativePerformance.h +3 -0
- package/ReactCommon/react/networking/CMakeLists.txt +2 -0
- package/ReactCommon/react/networking/NetworkReporter.cpp +106 -60
- package/ReactCommon/react/networking/NetworkReporter.h +12 -7
- package/ReactCommon/react/networking/React-networking.podspec +1 -0
- package/ReactCommon/react/performance/timeline/PerformanceEntry.h +4 -1
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +7 -33
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.h +4 -4
- package/ReactCommon/react/renderer/components/view/BaseViewEventEmitter.cpp +9 -0
- package/ReactCommon/react/renderer/components/view/BaseViewEventEmitter.h +4 -0
- package/ReactCommon/react/utils/TemplateStringLiteral.h +2 -1
- package/package.json +8 -8
- package/sdks/hermes-engine/hermes-engine.podspec +1 -1
- package/sdks/hermes-engine/hermes-utils.rb +2 -2
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/settings.gradle.kts +23 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
- package/src/private/webapis/performance/ResourceTiming.js +31 -4
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +4 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -0
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +3 -1
|
@@ -21,12 +21,14 @@ const ViewNativeComponent: HostComponent<Props> =
|
|
|
21
21
|
}));
|
|
22
22
|
|
|
23
23
|
interface NativeCommands {
|
|
24
|
+
+focus: () => void;
|
|
25
|
+
+blur: () => void;
|
|
24
26
|
+hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
|
|
25
27
|
+setPressed: (viewRef: HostInstance, pressed: boolean) => void;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
29
|
-
supportedCommands: ['hotspotUpdate', 'setPressed'],
|
|
31
|
+
supportedCommands: ['focus', 'blur', 'hotspotUpdate', 'setPressed'],
|
|
30
32
|
});
|
|
31
33
|
|
|
32
34
|
/**
|
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 83;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20250919-cb7453fb9';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(83),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20250919-cb7453fb9",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -222,6 +222,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableI
|
|
|
222
222
|
rt
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
|
+
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImperativeFocus(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
226
|
+
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableImperativeFocus(
|
|
227
|
+
rt
|
|
228
|
+
);
|
|
229
|
+
}
|
|
225
230
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
226
231
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableInteropViewManagerClassLookUpOptimizationIOS(
|
|
227
232
|
rt
|
|
@@ -483,6 +488,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
|
|
|
483
488
|
methodMap_["enableImagePrefetchingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingAndroid};
|
|
484
489
|
methodMap_["enableImagePrefetchingOnUiThreadAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImagePrefetchingOnUiThreadAndroid};
|
|
485
490
|
methodMap_["enableImmediateUpdateModeForContentOffsetChanges"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImmediateUpdateModeForContentOffsetChanges};
|
|
491
|
+
methodMap_["enableImperativeFocus"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableImperativeFocus};
|
|
486
492
|
methodMap_["enableInteropViewManagerClassLookUpOptimizationIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableInteropViewManagerClassLookUpOptimizationIOS};
|
|
487
493
|
methodMap_["enableLayoutAnimationsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnAndroid};
|
|
488
494
|
methodMap_["enableLayoutAnimationsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnIOS};
|
|
@@ -354,6 +354,7 @@ public:
|
|
|
354
354
|
virtual bool enableImagePrefetchingAndroid(jsi::Runtime &rt) = 0;
|
|
355
355
|
virtual bool enableImagePrefetchingOnUiThreadAndroid(jsi::Runtime &rt) = 0;
|
|
356
356
|
virtual bool enableImmediateUpdateModeForContentOffsetChanges(jsi::Runtime &rt) = 0;
|
|
357
|
+
virtual bool enableImperativeFocus(jsi::Runtime &rt) = 0;
|
|
357
358
|
virtual bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt) = 0;
|
|
358
359
|
virtual bool enableLayoutAnimationsOnAndroid(jsi::Runtime &rt) = 0;
|
|
359
360
|
virtual bool enableLayoutAnimationsOnIOS(jsi::Runtime &rt) = 0;
|
|
@@ -654,6 +655,14 @@ private:
|
|
|
654
655
|
return bridging::callFromJs<bool>(
|
|
655
656
|
rt, &T::enableImmediateUpdateModeForContentOffsetChanges, jsInvoker_, instance_);
|
|
656
657
|
}
|
|
658
|
+
bool enableImperativeFocus(jsi::Runtime &rt) override {
|
|
659
|
+
static_assert(
|
|
660
|
+
bridging::getParameterCount(&T::enableImperativeFocus) == 1,
|
|
661
|
+
"Expected enableImperativeFocus(...) to have 1 parameters");
|
|
662
|
+
|
|
663
|
+
return bridging::callFromJs<bool>(
|
|
664
|
+
rt, &T::enableImperativeFocus, jsInvoker_, instance_);
|
|
665
|
+
}
|
|
657
666
|
bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime &rt) override {
|
|
658
667
|
static_assert(
|
|
659
668
|
bridging::getParameterCount(&T::enableInteropViewManagerClassLookUpOptimizationIOS) == 1,
|
|
@@ -8605,7 +8614,7 @@ struct NativePerformancePerformanceObserverInitBridging {
|
|
|
8605
8614
|
|
|
8606
8615
|
#pragma mark - NativePerformanceRawPerformanceEntry
|
|
8607
8616
|
|
|
8608
|
-
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13>
|
|
8617
|
+
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8, typename P9, typename P10, typename P11, typename P12, typename P13, typename P14, typename P15, typename P16>
|
|
8609
8618
|
struct NativePerformanceRawPerformanceEntry {
|
|
8610
8619
|
P0 name;
|
|
8611
8620
|
P1 entryType;
|
|
@@ -8621,8 +8630,11 @@ struct NativePerformanceRawPerformanceEntry {
|
|
|
8621
8630
|
P11 responseStart;
|
|
8622
8631
|
P12 responseEnd;
|
|
8623
8632
|
P13 responseStatus;
|
|
8633
|
+
P14 contentType;
|
|
8634
|
+
P15 encodedBodySize;
|
|
8635
|
+
P16 decodedBodySize;
|
|
8624
8636
|
bool operator==(const NativePerformanceRawPerformanceEntry &other) const {
|
|
8625
|
-
return name == other.name && entryType == other.entryType && startTime == other.startTime && duration == other.duration && processingStart == other.processingStart && processingEnd == other.processingEnd && interactionId == other.interactionId && fetchStart == other.fetchStart && requestStart == other.requestStart && connectStart == other.connectStart && connectEnd == other.connectEnd && responseStart == other.responseStart && responseEnd == other.responseEnd && responseStatus == other.responseStatus;
|
|
8637
|
+
return name == other.name && entryType == other.entryType && startTime == other.startTime && duration == other.duration && processingStart == other.processingStart && processingEnd == other.processingEnd && interactionId == other.interactionId && fetchStart == other.fetchStart && requestStart == other.requestStart && connectStart == other.connectStart && connectEnd == other.connectEnd && responseStart == other.responseStart && responseEnd == other.responseEnd && responseStatus == other.responseStatus && contentType == other.contentType && encodedBodySize == other.encodedBodySize && decodedBodySize == other.decodedBodySize;
|
|
8626
8638
|
}
|
|
8627
8639
|
};
|
|
8628
8640
|
|
|
@@ -8648,7 +8660,10 @@ struct NativePerformanceRawPerformanceEntryBridging {
|
|
|
8648
8660
|
bridging::fromJs<decltype(types.connectEnd)>(rt, value.getProperty(rt, "connectEnd"), jsInvoker),
|
|
8649
8661
|
bridging::fromJs<decltype(types.responseStart)>(rt, value.getProperty(rt, "responseStart"), jsInvoker),
|
|
8650
8662
|
bridging::fromJs<decltype(types.responseEnd)>(rt, value.getProperty(rt, "responseEnd"), jsInvoker),
|
|
8651
|
-
bridging::fromJs<decltype(types.responseStatus)>(rt, value.getProperty(rt, "responseStatus"), jsInvoker)
|
|
8663
|
+
bridging::fromJs<decltype(types.responseStatus)>(rt, value.getProperty(rt, "responseStatus"), jsInvoker),
|
|
8664
|
+
bridging::fromJs<decltype(types.contentType)>(rt, value.getProperty(rt, "contentType"), jsInvoker),
|
|
8665
|
+
bridging::fromJs<decltype(types.encodedBodySize)>(rt, value.getProperty(rt, "encodedBodySize"), jsInvoker),
|
|
8666
|
+
bridging::fromJs<decltype(types.decodedBodySize)>(rt, value.getProperty(rt, "decodedBodySize"), jsInvoker)};
|
|
8652
8667
|
return result;
|
|
8653
8668
|
}
|
|
8654
8669
|
|
|
@@ -8708,6 +8723,18 @@ struct NativePerformanceRawPerformanceEntryBridging {
|
|
|
8708
8723
|
static double responseStatusToJs(jsi::Runtime &rt, decltype(types.responseStatus) value) {
|
|
8709
8724
|
return bridging::toJs(rt, value);
|
|
8710
8725
|
}
|
|
8726
|
+
|
|
8727
|
+
static jsi::String contentTypeToJs(jsi::Runtime &rt, decltype(types.contentType) value) {
|
|
8728
|
+
return bridging::toJs(rt, value);
|
|
8729
|
+
}
|
|
8730
|
+
|
|
8731
|
+
static double encodedBodySizeToJs(jsi::Runtime &rt, decltype(types.encodedBodySize) value) {
|
|
8732
|
+
return bridging::toJs(rt, value);
|
|
8733
|
+
}
|
|
8734
|
+
|
|
8735
|
+
static double decodedBodySizeToJs(jsi::Runtime &rt, decltype(types.decodedBodySize) value) {
|
|
8736
|
+
return bridging::toJs(rt, value);
|
|
8737
|
+
}
|
|
8711
8738
|
#endif
|
|
8712
8739
|
|
|
8713
8740
|
static jsi::Object toJs(
|
|
@@ -8749,6 +8776,15 @@ struct NativePerformanceRawPerformanceEntryBridging {
|
|
|
8749
8776
|
if (value.responseStatus) {
|
|
8750
8777
|
result.setProperty(rt, "responseStatus", bridging::toJs(rt, value.responseStatus.value(), jsInvoker));
|
|
8751
8778
|
}
|
|
8779
|
+
if (value.contentType) {
|
|
8780
|
+
result.setProperty(rt, "contentType", bridging::toJs(rt, value.contentType.value(), jsInvoker));
|
|
8781
|
+
}
|
|
8782
|
+
if (value.encodedBodySize) {
|
|
8783
|
+
result.setProperty(rt, "encodedBodySize", bridging::toJs(rt, value.encodedBodySize.value(), jsInvoker));
|
|
8784
|
+
}
|
|
8785
|
+
if (value.decodedBodySize) {
|
|
8786
|
+
result.setProperty(rt, "decodedBodySize", bridging::toJs(rt, value.decodedBodySize.value(), jsInvoker));
|
|
8787
|
+
}
|
|
8752
8788
|
return result;
|
|
8753
8789
|
}
|
|
8754
8790
|
};
|
|
@@ -650,7 +650,9 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
|
|
|
650
650
|
|
|
651
651
|
BOOL isPointInside = [self pointInside:point withEvent:event];
|
|
652
652
|
|
|
653
|
-
|
|
653
|
+
UIView *currentContainerView = self.currentContainerView;
|
|
654
|
+
|
|
655
|
+
BOOL clipsToBounds = currentContainerView.clipsToBounds;
|
|
654
656
|
|
|
655
657
|
clipsToBounds = clipsToBounds || _layoutMetrics.overflowInset == EdgeInsets{};
|
|
656
658
|
|
|
@@ -658,8 +660,8 @@ const CGFloat BACKGROUND_COLOR_ZPOSITION = -1024.0f;
|
|
|
658
660
|
return nil;
|
|
659
661
|
}
|
|
660
662
|
|
|
661
|
-
for (UIView *subview in [
|
|
662
|
-
UIView *hitView = [subview hitTest:[subview convertPoint:point fromView:
|
|
663
|
+
for (UIView *subview = nullptr in [currentContainerView.subviews reverseObjectEnumerator]) {
|
|
664
|
+
UIView *hitView = [subview hitTest:[subview convertPoint:point fromView:currentContainerView] withEvent:event];
|
|
663
665
|
if (hitView) {
|
|
664
666
|
return hitView;
|
|
665
667
|
}
|
|
@@ -859,7 +861,7 @@ static RCTBorderStyle RCTBorderStyleFromOutlineStyle(OutlineStyle outlineStyle)
|
|
|
859
861
|
|
|
860
862
|
if (_useCustomContainerView) {
|
|
861
863
|
if (!_containerView) {
|
|
862
|
-
_containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.
|
|
864
|
+
_containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)];
|
|
863
865
|
for (UIView *subview = nullptr in effectiveContentView.subviews) {
|
|
864
866
|
[_containerView addSubview:subview];
|
|
865
867
|
}
|
|
@@ -1540,6 +1542,62 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
|
|
|
1540
1542
|
}
|
|
1541
1543
|
}
|
|
1542
1544
|
|
|
1545
|
+
- (BOOL)canBecomeFirstResponder
|
|
1546
|
+
{
|
|
1547
|
+
return YES;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
|
|
1551
|
+
{
|
|
1552
|
+
if ([commandName isEqualToString:@"focus"]) {
|
|
1553
|
+
[self focus];
|
|
1554
|
+
return;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
if ([commandName isEqualToString:@"blur"]) {
|
|
1558
|
+
[self blur];
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
- (void)focus
|
|
1564
|
+
{
|
|
1565
|
+
[self becomeFirstResponder];
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
- (void)blur
|
|
1569
|
+
{
|
|
1570
|
+
[self resignFirstResponder];
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
#pragma mark - Focus Events
|
|
1574
|
+
|
|
1575
|
+
- (BOOL)becomeFirstResponder
|
|
1576
|
+
{
|
|
1577
|
+
if (![super becomeFirstResponder]) {
|
|
1578
|
+
return NO;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
if (_eventEmitter && ReactNativeFeatureFlags::enableImperativeFocus()) {
|
|
1582
|
+
_eventEmitter->onFocus();
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
return YES;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
- (BOOL)resignFirstResponder
|
|
1589
|
+
{
|
|
1590
|
+
if (![super resignFirstResponder]) {
|
|
1591
|
+
return NO;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
if (_eventEmitter && ReactNativeFeatureFlags::enableImperativeFocus()) {
|
|
1595
|
+
_eventEmitter->onBlur();
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
return YES;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1543
1601
|
@end
|
|
1544
1602
|
|
|
1545
1603
|
#ifdef __cplusplus
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<ce122427070db337420728a1028bc2b6>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -192,6 +192,12 @@ public object ReactNativeFeatureFlags {
|
|
|
192
192
|
@JvmStatic
|
|
193
193
|
public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = accessor.enableImmediateUpdateModeForContentOffsetChanges()
|
|
194
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Enable ref.focus() and ref.blur() for all views, not just TextInput.
|
|
197
|
+
*/
|
|
198
|
+
@JvmStatic
|
|
199
|
+
public fun enableImperativeFocus(): Boolean = accessor.enableImperativeFocus()
|
|
200
|
+
|
|
195
201
|
/**
|
|
196
202
|
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
|
197
203
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<e7581ab264bca8b059723bd7bd788790>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -47,6 +47,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
47
47
|
private var enableImagePrefetchingAndroidCache: Boolean? = null
|
|
48
48
|
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
|
|
49
49
|
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
|
|
50
|
+
private var enableImperativeFocusCache: Boolean? = null
|
|
50
51
|
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
|
|
51
52
|
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
|
|
52
53
|
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
|
|
@@ -337,6 +338,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
|
|
337
338
|
return cached
|
|
338
339
|
}
|
|
339
340
|
|
|
341
|
+
override fun enableImperativeFocus(): Boolean {
|
|
342
|
+
var cached = enableImperativeFocusCache
|
|
343
|
+
if (cached == null) {
|
|
344
|
+
cached = ReactNativeFeatureFlagsCxxInterop.enableImperativeFocus()
|
|
345
|
+
enableImperativeFocusCache = cached
|
|
346
|
+
}
|
|
347
|
+
return cached
|
|
348
|
+
}
|
|
349
|
+
|
|
340
350
|
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean {
|
|
341
351
|
var cached = enableInteropViewManagerClassLookUpOptimizationIOSCache
|
|
342
352
|
if (cached == null) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<d73f5df2130479a4cd1000dc76b15d1b>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -82,6 +82,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
|
|
82
82
|
|
|
83
83
|
@DoNotStrip @JvmStatic public external fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
|
|
84
84
|
|
|
85
|
+
@DoNotStrip @JvmStatic public external fun enableImperativeFocus(): Boolean
|
|
86
|
+
|
|
85
87
|
@DoNotStrip @JvmStatic public external fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
|
86
88
|
|
|
87
89
|
@DoNotStrip @JvmStatic public external fun enableLayoutAnimationsOnAndroid(): Boolean
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<4fa15189361a6c92bdd44bafc9356167>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -77,6 +77,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
77
77
|
|
|
78
78
|
override fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean = false
|
|
79
79
|
|
|
80
|
+
override fun enableImperativeFocus(): Boolean = false
|
|
81
|
+
|
|
80
82
|
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean = false
|
|
81
83
|
|
|
82
84
|
override fun enableLayoutAnimationsOnAndroid(): Boolean = false
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<962c60d1761b0a1f4945b44767aa7b02>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -51,6 +51,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
51
51
|
private var enableImagePrefetchingAndroidCache: Boolean? = null
|
|
52
52
|
private var enableImagePrefetchingOnUiThreadAndroidCache: Boolean? = null
|
|
53
53
|
private var enableImmediateUpdateModeForContentOffsetChangesCache: Boolean? = null
|
|
54
|
+
private var enableImperativeFocusCache: Boolean? = null
|
|
54
55
|
private var enableInteropViewManagerClassLookUpOptimizationIOSCache: Boolean? = null
|
|
55
56
|
private var enableLayoutAnimationsOnAndroidCache: Boolean? = null
|
|
56
57
|
private var enableLayoutAnimationsOnIOSCache: Boolean? = null
|
|
@@ -368,6 +369,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
|
|
368
369
|
return cached
|
|
369
370
|
}
|
|
370
371
|
|
|
372
|
+
override fun enableImperativeFocus(): Boolean {
|
|
373
|
+
var cached = enableImperativeFocusCache
|
|
374
|
+
if (cached == null) {
|
|
375
|
+
cached = currentProvider.enableImperativeFocus()
|
|
376
|
+
accessedFeatureFlags.add("enableImperativeFocus")
|
|
377
|
+
enableImperativeFocusCache = cached
|
|
378
|
+
}
|
|
379
|
+
return cached
|
|
380
|
+
}
|
|
381
|
+
|
|
371
382
|
override fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean {
|
|
372
383
|
var cached = enableInteropViewManagerClassLookUpOptimizationIOSCache
|
|
373
384
|
if (cached == null) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<dffc5db0f80501f6246f9d6087c6fb4a>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -25,5 +25,7 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android :
|
|
|
25
25
|
|
|
26
26
|
override fun enableAccessibilityOrder(): Boolean = true
|
|
27
27
|
|
|
28
|
+
override fun enableSwiftUIBasedFilters(): Boolean = true
|
|
29
|
+
|
|
28
30
|
override fun preventShadowTreeCommitExhaustion(): Boolean = true
|
|
29
31
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f9f3dee3dde2f7f6f851ce4525a4ebec>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -77,6 +77,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
|
|
77
77
|
|
|
78
78
|
@DoNotStrip public fun enableImmediateUpdateModeForContentOffsetChanges(): Boolean
|
|
79
79
|
|
|
80
|
+
@DoNotStrip public fun enableImperativeFocus(): Boolean
|
|
81
|
+
|
|
80
82
|
@DoNotStrip public fun enableInteropViewManagerClassLookUpOptimizationIOS(): Boolean
|
|
81
83
|
|
|
82
84
|
@DoNotStrip public fun enableLayoutAnimationsOnAndroid(): Boolean
|
|
@@ -166,7 +166,6 @@ public class ReactScrollView extends ScrollView
|
|
|
166
166
|
mRemoveClippedSubviews = false;
|
|
167
167
|
mScrollEnabled = true;
|
|
168
168
|
mSendMomentumEvents = false;
|
|
169
|
-
mFpsListener = null;
|
|
170
169
|
mScrollPerfTag = null;
|
|
171
170
|
mEndBackground = null;
|
|
172
171
|
mEndFillColor = Color.TRANSPARENT;
|
|
@@ -416,6 +416,14 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
|
|
416
416
|
updateClippingToRect(clippingRect, excludedViews)
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
+
internal fun requestFocusFromJS() {
|
|
420
|
+
super.requestFocus(FOCUS_DOWN, null)
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
internal fun clearFocusFromJS() {
|
|
424
|
+
super.clearFocus()
|
|
425
|
+
}
|
|
426
|
+
|
|
419
427
|
override fun endViewTransition(view: View) {
|
|
420
428
|
super.endViewTransition(view)
|
|
421
429
|
childrenRemovedWhileTransitioning?.remove(view.id)
|
|
@@ -404,6 +404,8 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
|
|
|
404
404
|
when (commandId) {
|
|
405
405
|
HOTSPOT_UPDATE_KEY -> handleHotspotUpdate(root, args)
|
|
406
406
|
"setPressed" -> handleSetPressed(root, args)
|
|
407
|
+
"focus" -> handleFocus(root)
|
|
408
|
+
"blur" -> handleBlur(root)
|
|
407
409
|
else -> {}
|
|
408
410
|
}
|
|
409
411
|
}
|
|
@@ -428,4 +430,16 @@ public open class ReactViewManager : ReactClippingViewManager<ReactViewGroup>()
|
|
|
428
430
|
val y = args.getDouble(1).dpToPx()
|
|
429
431
|
root.drawableHotspotChanged(x, y)
|
|
430
432
|
}
|
|
433
|
+
|
|
434
|
+
private fun handleFocus(root: ReactViewGroup) {
|
|
435
|
+
if (ReactNativeFeatureFlags.enableImperativeFocus()) {
|
|
436
|
+
root.requestFocusFromJS()
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
private fun handleBlur(root: ReactViewGroup) {
|
|
441
|
+
if (ReactNativeFeatureFlags.enableImperativeFocus()) {
|
|
442
|
+
root.clearFocusFromJS()
|
|
443
|
+
}
|
|
444
|
+
}
|
|
431
445
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<de817bc06ae5ef584db08d6a094c9d03>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -201,6 +201,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
|
|
201
201
|
return method(javaProvider_);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
bool enableImperativeFocus() override {
|
|
205
|
+
static const auto method =
|
|
206
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableImperativeFocus");
|
|
207
|
+
return method(javaProvider_);
|
|
208
|
+
}
|
|
209
|
+
|
|
204
210
|
bool enableInteropViewManagerClassLookUpOptimizationIOS() override {
|
|
205
211
|
static const auto method =
|
|
206
212
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableInteropViewManagerClassLookUpOptimizationIOS");
|
|
@@ -616,6 +622,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffs
|
|
|
616
622
|
return ReactNativeFeatureFlags::enableImmediateUpdateModeForContentOffsetChanges();
|
|
617
623
|
}
|
|
618
624
|
|
|
625
|
+
bool JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus(
|
|
626
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
627
|
+
return ReactNativeFeatureFlags::enableImperativeFocus();
|
|
628
|
+
}
|
|
629
|
+
|
|
619
630
|
bool JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS(
|
|
620
631
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
621
632
|
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
|
|
@@ -958,6 +969,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
958
969
|
makeNativeMethod(
|
|
959
970
|
"enableImmediateUpdateModeForContentOffsetChanges",
|
|
960
971
|
JReactNativeFeatureFlagsCxxInterop::enableImmediateUpdateModeForContentOffsetChanges),
|
|
972
|
+
makeNativeMethod(
|
|
973
|
+
"enableImperativeFocus",
|
|
974
|
+
JReactNativeFeatureFlagsCxxInterop::enableImperativeFocus),
|
|
961
975
|
makeNativeMethod(
|
|
962
976
|
"enableInteropViewManagerClassLookUpOptimizationIOS",
|
|
963
977
|
JReactNativeFeatureFlagsCxxInterop::enableInteropViewManagerClassLookUpOptimizationIOS),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f163997b1149c1f1ac1e60f273a5448f>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -111,6 +111,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
111
111
|
static bool enableImmediateUpdateModeForContentOffsetChanges(
|
|
112
112
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
113
113
|
|
|
114
|
+
static bool enableImperativeFocus(
|
|
115
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
116
|
+
|
|
114
117
|
static bool enableInteropViewManagerClassLookUpOptimizationIOS(
|
|
115
118
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
116
119
|
|
|
@@ -22,7 +22,7 @@ constexpr struct {
|
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 83;
|
|
24
24
|
int32_t Patch = 0;
|
|
25
|
-
std::string_view Prerelease = "nightly-
|
|
25
|
+
std::string_view Prerelease = "nightly-20250919-cb7453fb9";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
|
28
28
|
} // namespace facebook::react
|
|
@@ -13,13 +13,11 @@ namespace facebook::react::jsinspector_modern::cdp::network {
|
|
|
13
13
|
|
|
14
14
|
namespace {
|
|
15
15
|
|
|
16
|
-
folly::dynamic headersToDynamic(const
|
|
16
|
+
folly::dynamic headersToDynamic(const Headers& headers) {
|
|
17
17
|
folly::dynamic result = folly::dynamic::object;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
result[key] = value;
|
|
22
|
-
}
|
|
19
|
+
for (const auto& [key, value] : headers) {
|
|
20
|
+
result[key] = value;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
return result;
|
|
@@ -41,14 +39,14 @@ folly::dynamic Request::toDynamic() const {
|
|
|
41
39
|
/* static */ Response Response::fromInputParams(
|
|
42
40
|
const std::string& url,
|
|
43
41
|
uint16_t status,
|
|
44
|
-
const
|
|
42
|
+
const Headers& headers,
|
|
45
43
|
int encodedDataLength) {
|
|
46
44
|
return {
|
|
47
45
|
.url = url,
|
|
48
46
|
.status = status,
|
|
49
47
|
.statusText = httpReasonPhrase(status),
|
|
50
48
|
.headers = headers,
|
|
51
|
-
.mimeType = mimeTypeFromHeaders(headers
|
|
49
|
+
.mimeType = mimeTypeFromHeaders(headers),
|
|
52
50
|
.encodedDataLength = encodedDataLength,
|
|
53
51
|
};
|
|
54
52
|
}
|
|
@@ -24,7 +24,7 @@ using Headers = std::map<std::string, std::string>;
|
|
|
24
24
|
struct Request {
|
|
25
25
|
std::string url;
|
|
26
26
|
std::string method;
|
|
27
|
-
|
|
27
|
+
Headers headers;
|
|
28
28
|
std::optional<std::string> postData;
|
|
29
29
|
|
|
30
30
|
folly::dynamic toDynamic() const;
|
|
@@ -37,7 +37,7 @@ struct Response {
|
|
|
37
37
|
std::string url;
|
|
38
38
|
uint16_t status;
|
|
39
39
|
std::string statusText;
|
|
40
|
-
|
|
40
|
+
Headers headers;
|
|
41
41
|
std::string mimeType;
|
|
42
42
|
int encodedDataLength;
|
|
43
43
|
|
|
@@ -48,7 +48,7 @@ struct Response {
|
|
|
48
48
|
static Response fromInputParams(
|
|
49
49
|
const std::string& url,
|
|
50
50
|
uint16_t status,
|
|
51
|
-
const
|
|
51
|
+
const Headers& headers,
|
|
52
52
|
int encodedDataLength);
|
|
53
53
|
|
|
54
54
|
folly::dynamic toDynamic() const;
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
namespace facebook::react::jsinspector_modern {
|
|
14
14
|
|
|
15
|
+
using Headers = std::map<std::string, std::string>;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
18
|
* Get the HTTP reason phrase for a given status code (RFC 9110).
|
|
17
19
|
*/
|
|
@@ -21,7 +23,6 @@ std::string httpReasonPhrase(uint16_t status);
|
|
|
21
23
|
* Get the MIME type for a response based on the 'Content-Type' header. If
|
|
22
24
|
* the header is not present, returns 'application/octet-stream'.
|
|
23
25
|
*/
|
|
24
|
-
std::string mimeTypeFromHeaders(
|
|
25
|
-
const std::map<std::string, std::string>& headers);
|
|
26
|
+
std::string mimeTypeFromHeaders(const Headers& headers);
|
|
26
27
|
|
|
27
28
|
} // namespace facebook::react::jsinspector_modern
|