react-native 0.84.0-nightly-20251112-7dcedf1de → 0.84.0-nightly-20251114-dd6805dec
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/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTAssert.m +2 -2
- package/React/Base/RCTModuleData.mm +2 -2
- package/React/Base/RCTVersion.m +1 -1
- package/React/CxxModule/RCTCxxMethod.mm +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +24 -8
- package/ReactAndroid/api/ReactAndroid.api +1 -0
- package/ReactAndroid/build.gradle.kts +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FrameTiming.kt +68 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +20 -8
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +31 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +34 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +11 -2
- package/ReactAndroid/src/main/jni/CMakeLists.txt +8 -0
- package/ReactAndroid/src/main/jni/react/devsupport/CMakeLists.txt +3 -1
- package/ReactAndroid/src/main/jni/react/devsupport/JFrameTiming.cpp +46 -0
- package/ReactAndroid/src/main/jni/react/devsupport/JFrameTiming.h +32 -0
- package/ReactAndroid/src/main/jni/react/devsupport/OnLoad.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +14 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +43 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +10 -4
- package/ReactAndroid/src/main/jni/react/tracing/CMakeLists.txt +27 -0
- package/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml +2 -0
- package/ReactCommon/React-Fabric.podspec +8 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +9 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +17 -7
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +117 -81
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +8 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +28 -10
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +4 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +2 -2
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +1 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +7 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +5 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +16 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +7 -3
- package/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h +4 -0
- package/ReactCommon/react/nativemodule/intersectionobserver/React-intersectionobservernativemodule.podspec +66 -0
- package/ReactCommon/react/networking/NetworkReporter.cpp +19 -22
- package/ReactCommon/react/networking/React-networking.podspec +0 -1
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +1 -1
- package/ReactCommon/react/renderer/animated/AnimatedModule.cpp +3 -0
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +21 -1
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +14 -0
- package/ReactCommon/react/renderer/core/Props.cpp +23 -8
- package/ReactCommon/react/renderer/core/Props.h +6 -4
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +4 -10
- package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +32 -0
- package/ReactCommon/react/renderer/graphics/BlendMode.h +2 -0
- package/ReactCommon/react/renderer/graphics/Filter.h +2 -0
- package/ReactCommon/react/renderer/imagemanager/ImageManager.h +3 -0
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +7 -2
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.h +6 -3
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageManager.cpp +16 -4
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTSyncImageManager.mm +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +2 -3
- package/ReactCommon/yoga/yoga/algorithm/FlexDirection.h +6 -6
- package/ReactCommon/yoga/yoga/algorithm/SizingMode.h +4 -4
- package/ReactCommon/yoga/yoga/style/Style.h +8 -8
- package/package.json +8 -8
- package/scripts/react_native_pods.rb +1 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +18 -8
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +4 -2
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
|
@@ -33,14 +33,8 @@ void Props::initialize(
|
|
|
33
33
|
? sourceProps.nativeId
|
|
34
34
|
: convertRawProp(context, rawProps, "nativeID", sourceProps.nativeId, {});
|
|
35
35
|
#ifdef RN_SERIALIZABLE_STATE
|
|
36
|
-
if (ReactNativeFeatureFlags::
|
|
37
|
-
|
|
38
|
-
auto newRawProps = rawProps.toDynamic(filterObjectKeys);
|
|
39
|
-
auto mergedRawProps = mergeDynamicProps(
|
|
40
|
-
oldRawProps, newRawProps, NullValueStrategy::Override);
|
|
41
|
-
this->rawProps = mergedRawProps;
|
|
42
|
-
} else {
|
|
43
|
-
this->rawProps = rawProps.toDynamic(filterObjectKeys);
|
|
36
|
+
if (!ReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid()) {
|
|
37
|
+
initializeDynamicProps(sourceProps, rawProps, filterObjectKeys);
|
|
44
38
|
}
|
|
45
39
|
#endif
|
|
46
40
|
}
|
|
@@ -57,6 +51,27 @@ void Props::setProp(
|
|
|
57
51
|
}
|
|
58
52
|
}
|
|
59
53
|
|
|
54
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
55
|
+
void Props::initializeDynamicProps(
|
|
56
|
+
const Props& sourceProps,
|
|
57
|
+
const RawProps& rawProps,
|
|
58
|
+
const std::function<bool(const std::string&)>& filterObjectKeys) {
|
|
59
|
+
if (ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid()) {
|
|
60
|
+
auto& oldRawProps = sourceProps.rawProps;
|
|
61
|
+
auto newRawProps = rawProps.toDynamic(filterObjectKeys);
|
|
62
|
+
auto mergedRawProps = mergeDynamicProps(
|
|
63
|
+
oldRawProps, newRawProps, NullValueStrategy::Override);
|
|
64
|
+
this->rawProps = mergedRawProps;
|
|
65
|
+
} else {
|
|
66
|
+
this->rawProps = rawProps.toDynamic(filterObjectKeys);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ComponentName Props::getDiffPropsImplementationTarget() const {
|
|
71
|
+
return "";
|
|
72
|
+
}
|
|
73
|
+
#endif
|
|
74
|
+
|
|
60
75
|
#pragma mark - DebugStringConvertible
|
|
61
76
|
|
|
62
77
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
@@ -62,10 +62,12 @@ class Props : public virtual Sealable, public virtual DebugStringConvertible {
|
|
|
62
62
|
#ifdef RN_SERIALIZABLE_STATE
|
|
63
63
|
folly::dynamic rawProps = folly::dynamic::object();
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
void initializeDynamicProps(
|
|
66
|
+
const Props &sourceProps,
|
|
67
|
+
const RawProps &rawProps,
|
|
68
|
+
[[maybe_unused]] const std::function<bool(const std::string &)> &filterObjectKeys = nullptr);
|
|
69
|
+
|
|
70
|
+
virtual ComponentName getDiffPropsImplementationTarget() const;
|
|
69
71
|
|
|
70
72
|
virtual folly::dynamic getDiffProps(const Props *prevProps) const
|
|
71
73
|
{
|
|
@@ -412,7 +412,6 @@ namespace {
|
|
|
412
412
|
|
|
413
413
|
std::shared_ptr<ShadowNode> cloneMultipleRecursive(
|
|
414
414
|
const ShadowNode& shadowNode,
|
|
415
|
-
const std::unordered_set<const ShadowNodeFamily*>& familiesToUpdate,
|
|
416
415
|
const std::unordered_map<const ShadowNodeFamily*, int>& childrenCount,
|
|
417
416
|
const std::function<std::shared_ptr<
|
|
418
417
|
ShadowNode>(const ShadowNode&, const ShadowNodeFragment&)>& callback) {
|
|
@@ -430,16 +429,12 @@ std::shared_ptr<ShadowNode> cloneMultipleRecursive(
|
|
|
430
429
|
std::make_shared<std::vector<std::shared_ptr<const ShadowNode>>>(
|
|
431
430
|
children);
|
|
432
431
|
}
|
|
433
|
-
(*newChildren)[i] =
|
|
434
|
-
*children[i],
|
|
432
|
+
(*newChildren)[i] =
|
|
433
|
+
cloneMultipleRecursive(*children[i], childrenCount, callback);
|
|
435
434
|
}
|
|
436
435
|
}
|
|
437
436
|
|
|
438
|
-
|
|
439
|
-
if (familiesToUpdate.contains(family)) {
|
|
440
|
-
return callback(shadowNode, fragment);
|
|
441
|
-
}
|
|
442
|
-
return shadowNode.clone(fragment);
|
|
437
|
+
return callback(shadowNode, {.children = newChildren});
|
|
443
438
|
}
|
|
444
439
|
|
|
445
440
|
} // namespace
|
|
@@ -479,8 +474,7 @@ std::shared_ptr<ShadowNode> ShadowNode::cloneMultiple(
|
|
|
479
474
|
return nullptr;
|
|
480
475
|
}
|
|
481
476
|
|
|
482
|
-
return cloneMultipleRecursive(
|
|
483
|
-
*this, familiesToUpdate, childrenCount, callback);
|
|
477
|
+
return cloneMultipleRecursive(*this, childrenCount, callback);
|
|
484
478
|
}
|
|
485
479
|
|
|
486
480
|
#pragma mark - DebugStringConvertible
|
|
@@ -342,3 +342,35 @@ TEST_F(ShadowNodeTest, cloneMultiple) {
|
|
|
342
342
|
EXPECT_EQ(newNodeABA->getTag(), nodeABA_->getTag());
|
|
343
343
|
EXPECT_EQ(newNodeABA.get(), nodeABA_.get());
|
|
344
344
|
}
|
|
345
|
+
|
|
346
|
+
TEST_F(ShadowNodeTest, cloneMultipleWithSingleFamily) {
|
|
347
|
+
auto newProps = std::make_shared<const TestProps>();
|
|
348
|
+
auto newRoot = nodeA_->cloneMultiple(
|
|
349
|
+
{&nodeAB_->getFamily()},
|
|
350
|
+
[&](const ShadowNode& oldShadowNode, const ShadowNodeFragment& fragment) {
|
|
351
|
+
return oldShadowNode.clone({
|
|
352
|
+
.props = newProps,
|
|
353
|
+
.children = fragment.children,
|
|
354
|
+
.state = fragment.state,
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
EXPECT_EQ(newRoot->getTag(), nodeA_->getTag());
|
|
359
|
+
// The callback is called for each cloned node, so the root props are also
|
|
360
|
+
// updated
|
|
361
|
+
EXPECT_EQ(newRoot->getProps(), newProps);
|
|
362
|
+
|
|
363
|
+
auto newNodeAA = newRoot->getChildren()[0];
|
|
364
|
+
EXPECT_EQ(newNodeAA->getTag(), nodeAA_->getTag());
|
|
365
|
+
EXPECT_EQ(newNodeAA->getProps(), nodeAA_->getProps());
|
|
366
|
+
// AA was cloned when its parent was cloned as it was shared
|
|
367
|
+
EXPECT_NE(newNodeAA.get(), nodeAA_.get());
|
|
368
|
+
|
|
369
|
+
auto newNodeAB = newRoot->getChildren()[1];
|
|
370
|
+
EXPECT_EQ(newNodeAB->getTag(), nodeAB_->getTag());
|
|
371
|
+
EXPECT_EQ(newNodeAB->getProps(), newProps);
|
|
372
|
+
|
|
373
|
+
auto newNodeABA = newNodeAB->getChildren()[0];
|
|
374
|
+
EXPECT_EQ(newNodeABA->getTag(), nodeABA_->getTag());
|
|
375
|
+
EXPECT_EQ(newNodeABA.get(), nodeABA_.get());
|
|
376
|
+
}
|
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
#include "ImageFetcher.h"
|
|
9
9
|
|
|
10
10
|
#include <react/common/mapbuffer/JReadableMapBuffer.h>
|
|
11
|
+
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
11
12
|
#include <react/renderer/imagemanager/conversions.h>
|
|
12
13
|
|
|
13
14
|
namespace facebook::react {
|
|
14
15
|
|
|
16
|
+
extern const char ImageFetcherKey[] = "ImageFetcher";
|
|
17
|
+
|
|
15
18
|
ImageFetcher::ImageFetcher(
|
|
16
19
|
std::shared_ptr<const ContextContainer> contextContainer)
|
|
17
20
|
: contextContainer_(std::move(contextContainer)) {}
|
|
@@ -29,9 +32,11 @@ ImageRequest ImageFetcher::requestImage(
|
|
|
29
32
|
|
|
30
33
|
auto telemetry = std::make_shared<ImageTelemetry>(surfaceId);
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
if (!ReactNativeFeatureFlags::enableImagePrefetchingJNIBatchingAndroid()) {
|
|
36
|
+
flushImageRequests();
|
|
37
|
+
}
|
|
33
38
|
|
|
34
|
-
return {imageSource, telemetry};
|
|
39
|
+
return ImageRequest{imageSource, telemetry};
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
void ImageFetcher::flushImageRequests() {
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
namespace facebook::react {
|
|
18
18
|
|
|
19
|
+
extern const char ImageFetcherKey[];
|
|
20
|
+
|
|
19
21
|
class ImageFetcher {
|
|
20
22
|
public:
|
|
21
23
|
ImageFetcher(std::shared_ptr<const ContextContainer> contextContainer);
|
|
@@ -25,15 +27,16 @@ class ImageFetcher {
|
|
|
25
27
|
ImageFetcher(ImageFetcher &&) = delete;
|
|
26
28
|
ImageFetcher &operator=(ImageFetcher &&) = delete;
|
|
27
29
|
|
|
30
|
+
void flushImageRequests();
|
|
31
|
+
|
|
32
|
+
private:
|
|
33
|
+
friend class ImageManager;
|
|
28
34
|
ImageRequest requestImage(
|
|
29
35
|
const ImageSource &imageSource,
|
|
30
36
|
SurfaceId surfaceId,
|
|
31
37
|
const ImageRequestParams &imageRequestParams,
|
|
32
38
|
Tag tag);
|
|
33
39
|
|
|
34
|
-
private:
|
|
35
|
-
void flushImageRequests();
|
|
36
|
-
|
|
37
40
|
std::unordered_map<SurfaceId, std::vector<ImageRequestItem>> items_;
|
|
38
41
|
std::shared_ptr<const ContextContainer> contextContainer_;
|
|
39
42
|
};
|
|
@@ -22,10 +22,21 @@ constexpr inline bool isInteger(const std::string& str) {
|
|
|
22
22
|
|
|
23
23
|
ImageManager::ImageManager(
|
|
24
24
|
const std::shared_ptr<const ContextContainer>& contextContainer)
|
|
25
|
-
:
|
|
25
|
+
: contextContainer_(contextContainer),
|
|
26
|
+
self_(new std::shared_ptr<ImageFetcher>(
|
|
27
|
+
std::make_shared<ImageFetcher>(contextContainer))) {
|
|
28
|
+
if (ReactNativeFeatureFlags::enableImagePrefetchingJNIBatchingAndroid()) {
|
|
29
|
+
std::weak_ptr<ImageFetcher> weakImageFetcher =
|
|
30
|
+
*static_cast<std::shared_ptr<ImageFetcher>*>(self_);
|
|
31
|
+
contextContainer->insert(ImageFetcherKey, weakImageFetcher);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
26
34
|
|
|
27
35
|
ImageManager::~ImageManager() {
|
|
28
|
-
|
|
36
|
+
if (ReactNativeFeatureFlags::enableImagePrefetchingJNIBatchingAndroid()) {
|
|
37
|
+
contextContainer_->erase(ImageFetcherKey);
|
|
38
|
+
}
|
|
39
|
+
delete static_cast<std::shared_ptr<ImageFetcher>*>(self_);
|
|
29
40
|
}
|
|
30
41
|
|
|
31
42
|
ImageRequest ImageManager::requestImage(
|
|
@@ -35,8 +46,9 @@ ImageRequest ImageManager::requestImage(
|
|
|
35
46
|
Tag tag) const {
|
|
36
47
|
if (ReactNativeFeatureFlags::enableImagePrefetchingAndroid()) {
|
|
37
48
|
if (!isInteger(imageSource.uri)) {
|
|
38
|
-
return static_cast<ImageFetcher
|
|
39
|
-
|
|
49
|
+
return static_cast<std::shared_ptr<ImageFetcher>*>(self_)
|
|
50
|
+
->get()
|
|
51
|
+
->requestImage(imageSource, surfaceId, imageRequestParams, tag);
|
|
40
52
|
}
|
|
41
53
|
}
|
|
42
54
|
return {imageSource, nullptr, {}};
|
|
@@ -90,7 +90,7 @@ using namespace facebook::react;
|
|
|
90
90
|
partialLoadBlock:nil
|
|
91
91
|
completionBlock:completionBlock];
|
|
92
92
|
|
|
93
|
-
auto result = dispatch_group_wait(imageWaitGroup, dispatch_time(DISPATCH_TIME_NOW,
|
|
93
|
+
auto result = dispatch_group_wait(imageWaitGroup, dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC));
|
|
94
94
|
if (result != 0) {
|
|
95
95
|
RCTLogError(@"Image timed out in test environment for url: %@", loaderRequest.imageURL);
|
|
96
96
|
}
|
|
@@ -388,9 +388,8 @@ static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(EllipsizeMode ellipsi
|
|
|
388
388
|
size.height = enumeratedLinesHeight;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
ceil((size.height + epsilon) * layoutContext.pointScaleFactor) / layoutContext.pointScaleFactor};
|
|
391
|
+
size = (CGSize){ceil(size.width * layoutContext.pointScaleFactor) / layoutContext.pointScaleFactor,
|
|
392
|
+
ceil(size.height * layoutContext.pointScaleFactor) / layoutContext.pointScaleFactor};
|
|
394
393
|
|
|
395
394
|
__block auto attachments = TextMeasurement::Attachments{};
|
|
396
395
|
|
|
@@ -60,9 +60,9 @@ inline PhysicalEdge flexStartEdge(FlexDirection flexDirection) {
|
|
|
60
60
|
return PhysicalEdge::Left;
|
|
61
61
|
case FlexDirection::RowReverse:
|
|
62
62
|
return PhysicalEdge::Right;
|
|
63
|
+
default:
|
|
64
|
+
fatalWithMessage("Invalid FlexDirection");
|
|
63
65
|
}
|
|
64
|
-
|
|
65
|
-
fatalWithMessage("Invalid FlexDirection");
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
inline PhysicalEdge flexEndEdge(FlexDirection flexDirection) {
|
|
@@ -75,9 +75,9 @@ inline PhysicalEdge flexEndEdge(FlexDirection flexDirection) {
|
|
|
75
75
|
return PhysicalEdge::Right;
|
|
76
76
|
case FlexDirection::RowReverse:
|
|
77
77
|
return PhysicalEdge::Left;
|
|
78
|
+
default:
|
|
79
|
+
fatalWithMessage("Invalid FlexDirection");
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
fatalWithMessage("Invalid FlexDirection");
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
inline PhysicalEdge inlineStartEdge(
|
|
@@ -112,9 +112,9 @@ inline Dimension dimension(FlexDirection flexDirection) {
|
|
|
112
112
|
return Dimension::Width;
|
|
113
113
|
case FlexDirection::RowReverse:
|
|
114
114
|
return Dimension::Width;
|
|
115
|
+
default:
|
|
116
|
+
fatalWithMessage("Invalid FlexDirection");
|
|
115
117
|
}
|
|
116
|
-
|
|
117
|
-
fatalWithMessage("Invalid FlexDirection");
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
} // namespace facebook::yoga
|
|
@@ -52,9 +52,9 @@ inline MeasureMode measureMode(SizingMode mode) {
|
|
|
52
52
|
return MeasureMode::Undefined;
|
|
53
53
|
case SizingMode::FitContent:
|
|
54
54
|
return MeasureMode::AtMost;
|
|
55
|
+
default:
|
|
56
|
+
fatalWithMessage("Invalid SizingMode");
|
|
55
57
|
}
|
|
56
|
-
|
|
57
|
-
fatalWithMessage("Invalid SizingMode");
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
inline SizingMode sizingMode(MeasureMode mode) {
|
|
@@ -65,9 +65,9 @@ inline SizingMode sizingMode(MeasureMode mode) {
|
|
|
65
65
|
return SizingMode::MaxContent;
|
|
66
66
|
case MeasureMode::AtMost:
|
|
67
67
|
return SizingMode::FitContent;
|
|
68
|
+
default:
|
|
69
|
+
fatalWithMessage("Invalid MeasureMode");
|
|
68
70
|
}
|
|
69
|
-
|
|
70
|
-
fatalWithMessage("Invalid MeasureMode");
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
} // namespace facebook::yoga
|
|
@@ -673,9 +673,9 @@ class YG_EXPORT Style {
|
|
|
673
673
|
return computeRightEdge(position_, direction);
|
|
674
674
|
case PhysicalEdge::Bottom:
|
|
675
675
|
return computeBottomEdge(position_);
|
|
676
|
+
default:
|
|
677
|
+
fatalWithMessage("Invalid physical edge");
|
|
676
678
|
}
|
|
677
|
-
|
|
678
|
-
fatalWithMessage("Invalid physical edge");
|
|
679
679
|
}
|
|
680
680
|
|
|
681
681
|
Style::Length computeMargin(PhysicalEdge edge, Direction direction) const {
|
|
@@ -688,9 +688,9 @@ class YG_EXPORT Style {
|
|
|
688
688
|
return computeRightEdge(margin_, direction);
|
|
689
689
|
case PhysicalEdge::Bottom:
|
|
690
690
|
return computeBottomEdge(margin_);
|
|
691
|
+
default:
|
|
692
|
+
fatalWithMessage("Invalid physical edge");
|
|
691
693
|
}
|
|
692
|
-
|
|
693
|
-
fatalWithMessage("Invalid physical edge");
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
Style::Length computePadding(PhysicalEdge edge, Direction direction) const {
|
|
@@ -703,9 +703,9 @@ class YG_EXPORT Style {
|
|
|
703
703
|
return computeRightEdge(padding_, direction);
|
|
704
704
|
case PhysicalEdge::Bottom:
|
|
705
705
|
return computeBottomEdge(padding_);
|
|
706
|
+
default:
|
|
707
|
+
fatalWithMessage("Invalid physical edge");
|
|
706
708
|
}
|
|
707
|
-
|
|
708
|
-
fatalWithMessage("Invalid physical edge");
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
Style::Length computeBorder(PhysicalEdge edge, Direction direction) const {
|
|
@@ -718,9 +718,9 @@ class YG_EXPORT Style {
|
|
|
718
718
|
return computeRightEdge(border_, direction);
|
|
719
719
|
case PhysicalEdge::Bottom:
|
|
720
720
|
return computeBottomEdge(border_);
|
|
721
|
+
default:
|
|
722
|
+
fatalWithMessage("Invalid physical edge");
|
|
721
723
|
}
|
|
722
|
-
|
|
723
|
-
fatalWithMessage("Invalid physical edge");
|
|
724
724
|
}
|
|
725
725
|
|
|
726
726
|
Direction direction_ : bitCount<Direction>() = Direction::Inherit;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.84.0-nightly-
|
|
3
|
+
"version": "0.84.0-nightly-20251114-dd6805dec",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
163
|
-
"@react-native/assets-registry": "0.84.0-nightly-
|
|
164
|
-
"@react-native/codegen": "0.84.0-nightly-
|
|
165
|
-
"@react-native/community-cli-plugin": "0.84.0-nightly-
|
|
166
|
-
"@react-native/gradle-plugin": "0.84.0-nightly-
|
|
167
|
-
"@react-native/js-polyfills": "0.84.0-nightly-
|
|
168
|
-
"@react-native/normalize-colors": "0.84.0-nightly-
|
|
169
|
-
"@react-native/virtualized-lists": "0.84.0-nightly-
|
|
163
|
+
"@react-native/assets-registry": "0.84.0-nightly-20251114-dd6805dec",
|
|
164
|
+
"@react-native/codegen": "0.84.0-nightly-20251114-dd6805dec",
|
|
165
|
+
"@react-native/community-cli-plugin": "0.84.0-nightly-20251114-dd6805dec",
|
|
166
|
+
"@react-native/gradle-plugin": "0.84.0-nightly-20251114-dd6805dec",
|
|
167
|
+
"@react-native/js-polyfills": "0.84.0-nightly-20251114-dd6805dec",
|
|
168
|
+
"@react-native/normalize-colors": "0.84.0-nightly-20251114-dd6805dec",
|
|
169
|
+
"@react-native/virtualized-lists": "0.84.0-nightly-20251114-dd6805dec",
|
|
170
170
|
"abort-controller": "^3.0.0",
|
|
171
171
|
"anser": "^1.4.9",
|
|
172
172
|
"ansi-regex": "^5.0.0",
|
|
@@ -143,6 +143,7 @@ def use_react_native! (
|
|
|
143
143
|
pod 'React-featureflagsnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/featureflags"
|
|
144
144
|
pod 'React-microtasksnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/microtasks"
|
|
145
145
|
pod 'React-idlecallbacksnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/idlecallbacks"
|
|
146
|
+
pod 'React-intersectionobservernativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/intersectionobserver"
|
|
146
147
|
pod 'React-webperformancenativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/webperformance"
|
|
147
148
|
pod 'React-domnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/dom"
|
|
148
149
|
pod 'React-defaultsnativemodule', :path => "#{prefix}/ReactCommon/react/nativemodule/defaults"
|
|
@@ -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<<312e7dcaaaf8bade0acf80d15e8eedee>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -74,6 +74,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
74
74
|
enableDoubleMeasurementFixAndroid: Getter<boolean>,
|
|
75
75
|
enableEagerMainQueueModulesOnIOS: Getter<boolean>,
|
|
76
76
|
enableEagerRootViewAttachment: Getter<boolean>,
|
|
77
|
+
enableExclusivePropsUpdateAndroid: Getter<boolean>,
|
|
77
78
|
enableFabricLogs: Getter<boolean>,
|
|
78
79
|
enableFabricRenderer: Getter<boolean>,
|
|
79
80
|
enableFontScaleChangesUpdatingLayout: Getter<boolean>,
|
|
@@ -85,6 +86,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
85
86
|
enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean>,
|
|
86
87
|
enableImperativeFocus: Getter<boolean>,
|
|
87
88
|
enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean>,
|
|
89
|
+
enableIntersectionObserverByDefault: Getter<boolean>,
|
|
88
90
|
enableKeyEvents: Getter<boolean>,
|
|
89
91
|
enableLayoutAnimationsOnAndroid: Getter<boolean>,
|
|
90
92
|
enableLayoutAnimationsOnIOS: Getter<boolean>,
|
|
@@ -94,7 +96,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
94
96
|
enableNetworkEventReporting: Getter<boolean>,
|
|
95
97
|
enablePreparedTextLayout: Getter<boolean>,
|
|
96
98
|
enablePropsUpdateReconciliationAndroid: Getter<boolean>,
|
|
97
|
-
enableResourceTimingAPI: Getter<boolean>,
|
|
98
99
|
enableSwiftUIBasedFilters: Getter<boolean>,
|
|
99
100
|
enableViewCulling: Getter<boolean>,
|
|
100
101
|
enableViewRecycling: Getter<boolean>,
|
|
@@ -119,6 +120,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
119
120
|
preparedTextCacheSize: Getter<number>,
|
|
120
121
|
preventShadowTreeCommitExhaustion: Getter<boolean>,
|
|
121
122
|
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
|
123
|
+
shouldSetEnabledBasedOnAccessibilityState: Getter<boolean>,
|
|
122
124
|
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
|
|
123
125
|
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
|
124
126
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
@@ -202,7 +204,7 @@ export const shouldUseAnimatedObjectForTransform: Getter<boolean> = createJavaSc
|
|
|
202
204
|
/**
|
|
203
205
|
* Set accessibilityRole to "link" for pressable Text components by default.
|
|
204
206
|
*/
|
|
205
|
-
export const shouldUseLinkRoleForPressableText: Getter<boolean> = createJavaScriptFlagGetter('shouldUseLinkRoleForPressableText',
|
|
207
|
+
export const shouldUseLinkRoleForPressableText: Getter<boolean> = createJavaScriptFlagGetter('shouldUseLinkRoleForPressableText', true);
|
|
206
208
|
|
|
207
209
|
/**
|
|
208
210
|
* removeClippedSubviews prop will be used as the default in FlatList on iOS to match Android
|
|
@@ -315,6 +317,10 @@ export const enableEagerMainQueueModulesOnIOS: Getter<boolean> = createNativeFla
|
|
|
315
317
|
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
|
|
316
318
|
*/
|
|
317
319
|
export const enableEagerRootViewAttachment: Getter<boolean> = createNativeFlagGetter('enableEagerRootViewAttachment', false);
|
|
320
|
+
/**
|
|
321
|
+
* When enabled, Android will disable Props 1.5 raw value merging when Props 2.0 is available.
|
|
322
|
+
*/
|
|
323
|
+
export const enableExclusivePropsUpdateAndroid: Getter<boolean> = createNativeFlagGetter('enableExclusivePropsUpdateAndroid', false);
|
|
318
324
|
/**
|
|
319
325
|
* This feature flag enables logs for Fabric.
|
|
320
326
|
*/
|
|
@@ -359,6 +365,10 @@ export const enableImperativeFocus: Getter<boolean> = createNativeFlagGetter('en
|
|
|
359
365
|
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
|
360
366
|
*/
|
|
361
367
|
export const enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean> = createNativeFlagGetter('enableInteropViewManagerClassLookUpOptimizationIOS', false);
|
|
368
|
+
/**
|
|
369
|
+
* Enables the IntersectionObserver Web API in React Native.
|
|
370
|
+
*/
|
|
371
|
+
export const enableIntersectionObserverByDefault: Getter<boolean> = createNativeFlagGetter('enableIntersectionObserverByDefault', false);
|
|
362
372
|
/**
|
|
363
373
|
* Enables key up/down/press events to be sent to JS from components
|
|
364
374
|
*/
|
|
@@ -384,7 +394,7 @@ export const enableModuleArgumentNSNullConversionIOS: Getter<boolean> = createNa
|
|
|
384
394
|
*/
|
|
385
395
|
export const enableNativeCSSParsing: Getter<boolean> = createNativeFlagGetter('enableNativeCSSParsing', false);
|
|
386
396
|
/**
|
|
387
|
-
* Enable network event reporting hooks in each native platform through `NetworkReporter
|
|
397
|
+
* Enable network event reporting hooks in each native platform through `NetworkReporter` (Web Perf APIs + CDP). This flag should be combined with `fuseboxNetworkInspectionEnabled` to enable Network CDP debugging.
|
|
388
398
|
*/
|
|
389
399
|
export const enableNetworkEventReporting: Getter<boolean> = createNativeFlagGetter('enableNetworkEventReporting', false);
|
|
390
400
|
/**
|
|
@@ -395,10 +405,6 @@ export const enablePreparedTextLayout: Getter<boolean> = createNativeFlagGetter(
|
|
|
395
405
|
* When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
|
|
396
406
|
*/
|
|
397
407
|
export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNativeFlagGetter('enablePropsUpdateReconciliationAndroid', false);
|
|
398
|
-
/**
|
|
399
|
-
* Enables the reporting of network resource timings through `PerformanceObserver`.
|
|
400
|
-
*/
|
|
401
|
-
export const enableResourceTimingAPI: Getter<boolean> = createNativeFlagGetter('enableResourceTimingAPI', false);
|
|
402
408
|
/**
|
|
403
409
|
* When enabled, it will use SwiftUI for filter effects like blur on iOS.
|
|
404
410
|
*/
|
|
@@ -495,6 +501,10 @@ export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFl
|
|
|
495
501
|
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
|
|
496
502
|
*/
|
|
497
503
|
export const shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean> = createNativeFlagGetter('shouldPressibilityUseW3CPointerEventsForHover', false);
|
|
504
|
+
/**
|
|
505
|
+
* Fix BaseViewManager to properly set view.setEnabled() based on accessibilityState.disabled.
|
|
506
|
+
*/
|
|
507
|
+
export const shouldSetEnabledBasedOnAccessibilityState: Getter<boolean> = createNativeFlagGetter('shouldSetEnabledBasedOnAccessibilityState', true);
|
|
498
508
|
/**
|
|
499
509
|
* Do not emit touchcancel from Android ScrollView, instead native topScroll event will trigger responder transfer and terminate in RN renderer.
|
|
500
510
|
*/
|
|
@@ -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<<d5e09e0d1f62767dcc810d3295e1b724>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -48,6 +48,7 @@ export interface Spec extends TurboModule {
|
|
|
48
48
|
+enableDoubleMeasurementFixAndroid?: () => boolean;
|
|
49
49
|
+enableEagerMainQueueModulesOnIOS?: () => boolean;
|
|
50
50
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
51
|
+
+enableExclusivePropsUpdateAndroid?: () => boolean;
|
|
51
52
|
+enableFabricLogs?: () => boolean;
|
|
52
53
|
+enableFabricRenderer?: () => boolean;
|
|
53
54
|
+enableFontScaleChangesUpdatingLayout?: () => boolean;
|
|
@@ -59,6 +60,7 @@ export interface Spec extends TurboModule {
|
|
|
59
60
|
+enableImmediateUpdateModeForContentOffsetChanges?: () => boolean;
|
|
60
61
|
+enableImperativeFocus?: () => boolean;
|
|
61
62
|
+enableInteropViewManagerClassLookUpOptimizationIOS?: () => boolean;
|
|
63
|
+
+enableIntersectionObserverByDefault?: () => boolean;
|
|
62
64
|
+enableKeyEvents?: () => boolean;
|
|
63
65
|
+enableLayoutAnimationsOnAndroid?: () => boolean;
|
|
64
66
|
+enableLayoutAnimationsOnIOS?: () => boolean;
|
|
@@ -68,7 +70,6 @@ export interface Spec extends TurboModule {
|
|
|
68
70
|
+enableNetworkEventReporting?: () => boolean;
|
|
69
71
|
+enablePreparedTextLayout?: () => boolean;
|
|
70
72
|
+enablePropsUpdateReconciliationAndroid?: () => boolean;
|
|
71
|
-
+enableResourceTimingAPI?: () => boolean;
|
|
72
73
|
+enableSwiftUIBasedFilters?: () => boolean;
|
|
73
74
|
+enableViewCulling?: () => boolean;
|
|
74
75
|
+enableViewRecycling?: () => boolean;
|
|
@@ -93,6 +94,7 @@ export interface Spec extends TurboModule {
|
|
|
93
94
|
+preparedTextCacheSize?: () => number;
|
|
94
95
|
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
95
96
|
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
|
97
|
+
+shouldSetEnabledBasedOnAccessibilityState?: () => boolean;
|
|
96
98
|
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
|
97
99
|
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
|
98
100
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
@@ -41,4 +41,10 @@ export default function setUpDefaltReactNativeEnvironment(
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
require('../../../Libraries/ReactNative/AppRegistry');
|
|
44
|
+
|
|
45
|
+
if (
|
|
46
|
+
require('../../../src/private/featureflags/ReactNativeFeatureFlags').enableIntersectionObserverByDefault()
|
|
47
|
+
) {
|
|
48
|
+
require('./setUpIntersectionObserver').default();
|
|
49
|
+
}
|
|
44
50
|
}
|