react-native 0.89.0-nightly-20261104-edf2b86e6 → 0.89.0-rc.1
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/Animated/AnimatedExports.js +10 -6
- package/Libraries/Animated/AnimatedExports.js.flow +0 -6
- package/Libraries/Animated/nodes/AnimatedProps.js +0 -3
- package/Libraries/Components/StatusBar/StatusBar.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Tests/Text/RCTAttributedTextUtilsTest.mm +0 -71
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +5 -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/ReactScrollViewHelper.kt +1 -13
- package/ReactAndroid/src/main/jni/react/jni/InspectorNetworkRequestListener.cpp +0 -1
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +0 -1
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.h +0 -1
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.h +0 -1
- package/ReactCommon/jsinspector-modern/network/NetworkHandler.h +0 -1
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +4 -4
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputShadowNode.h +1 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +0 -7
- package/ReactCommon/react/utils/ReactNativeVersion.h +1 -1
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +3 -38
- package/ReactCommon/yoga/yoga/style/StyleValueHandle.h +4 -0
- package/ReactCommon/yoga/yoga/style/StyleValuePool.h +3 -14
- package/index.js +0 -20
- package/index.js.flow +0 -6
- package/package.json +11 -11
- package/scripts/cocoapods/autolinking.rb +0 -1
- package/scripts/cocoapods/utils.rb +0 -18
- package/scripts/react_native_pods.rb +0 -3
- package/scripts/setup-apple-spm.js +180 -228
- package/scripts/spm/generate-spm-xcodeproj.js +3 -39
- package/scripts/spm/read-podspec.js +0 -1
- package/scripts/spm/spm-types.js +3 -9
- package/sdks/.hermesv1version +1 -0
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
- package/types_DEPRECATED/Libraries/Animated/Animated.d.ts +28 -42
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +1 -7
- package/types_generated/index.d.ts +1 -7
|
@@ -27,37 +27,41 @@ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
|
|
|
27
27
|
|
|
28
28
|
export default {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* FlatList and SectionList infer generic Type defined under their `data` and `section` props.
|
|
31
31
|
*/
|
|
32
32
|
get FlatList(): AnimatedFlatList<> {
|
|
33
33
|
return require('./components/AnimatedFlatList').default;
|
|
34
34
|
},
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
37
|
+
* props and style.
|
|
37
38
|
*/
|
|
38
39
|
get Image(): AnimatedImage {
|
|
39
40
|
return require('./components/AnimatedImage').default;
|
|
40
41
|
},
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
44
|
+
* props and style.
|
|
43
45
|
*/
|
|
44
46
|
get ScrollView(): AnimatedScrollView {
|
|
45
47
|
return require('./components/AnimatedScrollView').default;
|
|
46
48
|
},
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
50
|
+
* FlatList and SectionList infer generic Type defined under their `data` and `section` props.
|
|
49
51
|
*/
|
|
50
52
|
get SectionList(): AnimatedSectionList<> {
|
|
51
53
|
return require('./components/AnimatedSectionList').default;
|
|
52
54
|
},
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
56
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
57
|
+
* props and style.
|
|
55
58
|
*/
|
|
56
59
|
get Text(): AnimatedText {
|
|
57
60
|
return require('./components/AnimatedText').default;
|
|
58
61
|
},
|
|
59
62
|
/**
|
|
60
|
-
*
|
|
63
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
64
|
+
* props and style.
|
|
61
65
|
*/
|
|
62
66
|
get View(): AnimatedView {
|
|
63
67
|
return require('./components/AnimatedView').default;
|
|
@@ -15,17 +15,11 @@ export type {DecayAnimationConfig} from './animations/DecayAnimation';
|
|
|
15
15
|
export type {SpringAnimationConfig} from './animations/SpringAnimation';
|
|
16
16
|
export type {TimingAnimationConfig} from './animations/TimingAnimation';
|
|
17
17
|
|
|
18
|
-
/** @deprecated Use `AnimatedFlatList` instead. */
|
|
19
18
|
export {default as FlatList} from './components/AnimatedFlatList';
|
|
20
|
-
/** @deprecated Use `AnimatedImage` instead. */
|
|
21
19
|
export {default as Image} from './components/AnimatedImage';
|
|
22
|
-
/** @deprecated Use `AnimatedScrollView` instead. */
|
|
23
20
|
export {default as ScrollView} from './components/AnimatedScrollView';
|
|
24
|
-
/** @deprecated Use `AnimatedSectionList` instead. */
|
|
25
21
|
export {default as SectionList} from './components/AnimatedSectionList';
|
|
26
|
-
/** @deprecated Use `AnimatedText` instead. */
|
|
27
22
|
export {default as Text} from './components/AnimatedText';
|
|
28
|
-
/** @deprecated Use `AnimatedView` instead. */
|
|
29
23
|
export {default as View} from './components/AnimatedView';
|
|
30
24
|
export {default as Color} from './nodes/AnimatedColor';
|
|
31
25
|
export {AnimatedEvent as Event} from './AnimatedEvent';
|
|
@@ -268,9 +268,6 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
268
268
|
if (this._target?.instance === instance) {
|
|
269
269
|
return;
|
|
270
270
|
}
|
|
271
|
-
if (this.__isNative && this._target != null) {
|
|
272
|
-
this.#disconnectAnimatedView(this._target);
|
|
273
|
-
}
|
|
274
271
|
const target = (this._target = {instance, connectedViewTag: null});
|
|
275
272
|
if (this.__isNative) {
|
|
276
273
|
this.#connectAnimatedView(target);
|
|
@@ -141,7 +141,7 @@ function mergePropsStack(
|
|
|
141
141
|
propsStack: Array<StackProps>,
|
|
142
142
|
defaultValues: ResolvedStackProps,
|
|
143
143
|
): ResolvedStackProps {
|
|
144
|
-
const merged: ResolvedStackProps = propsStack.reduce
|
|
144
|
+
const merged: ResolvedStackProps = propsStack.reduce(
|
|
145
145
|
(prev, cur) => {
|
|
146
146
|
for (const prop in cur) {
|
|
147
147
|
// $FlowFixMe[invalid-computed-prop] dynamic merge over the known StackProps keys
|
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 89;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = '
|
|
32
|
+
static prerelease: string | null = 'rc.1';
|
|
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
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
#import <react/renderer/textlayoutmanager/RCTFontUtils.h>
|
|
15
15
|
|
|
16
16
|
#include <react/renderer/attributedstring/conversions.h>
|
|
17
|
-
#include <react/renderer/core/EventEmitter.h>
|
|
18
17
|
#include <react/renderer/core/RawValue.h>
|
|
19
18
|
|
|
20
19
|
#include <array>
|
|
@@ -246,76 +245,6 @@ static NSDictionary<NSNumber *, NSNumber *> *FontVariationsFromSettings(std::opt
|
|
|
246
245
|
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
247
246
|
}
|
|
248
247
|
|
|
249
|
-
- (void)testSamenessOfDifferentEventEmitters
|
|
250
|
-
{
|
|
251
|
-
// The emitter is metadata a TextInput never dispatches through, so even a different one is not a difference.
|
|
252
|
-
auto eventEmitter1 = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
253
|
-
auto eventEmitter2 = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
254
|
-
|
|
255
|
-
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
256
|
-
[attributedString1 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
257
|
-
[attributedString1 addAttribute:RCTAttributedStringEventEmitterKey
|
|
258
|
-
value:RCTWrapEventEmitter(eventEmitter1)
|
|
259
|
-
range:NSMakeRange(0, 12)];
|
|
260
|
-
|
|
261
|
-
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
262
|
-
[attributedString2 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
263
|
-
[attributedString2 addAttribute:RCTAttributedStringEventEmitterKey
|
|
264
|
-
value:RCTWrapEventEmitter(eventEmitter2)
|
|
265
|
-
range:NSMakeRange(0, 12)];
|
|
266
|
-
|
|
267
|
-
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes = @{};
|
|
268
|
-
|
|
269
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
270
|
-
attributedString1, attributedString2, insensitiveAttributes, TextAttributes{}));
|
|
271
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
272
|
-
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
- (void)testSamenessOfMissingEventEmitter
|
|
276
|
-
{
|
|
277
|
-
// Text typed into a field carries no event emitter; the state echoing it does.
|
|
278
|
-
auto eventEmitter = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
279
|
-
|
|
280
|
-
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
281
|
-
[attributedString1 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
282
|
-
[attributedString1 addAttribute:RCTAttributedStringEventEmitterKey
|
|
283
|
-
value:RCTWrapEventEmitter(eventEmitter)
|
|
284
|
-
range:NSMakeRange(0, 12)];
|
|
285
|
-
|
|
286
|
-
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
287
|
-
[attributedString2 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
288
|
-
|
|
289
|
-
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes = @{};
|
|
290
|
-
|
|
291
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
292
|
-
attributedString1, attributedString2, insensitiveAttributes, TextAttributes{}));
|
|
293
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
294
|
-
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
- (void)testDifferenceOfOtherAttributesNextToEventEmitter
|
|
298
|
-
{
|
|
299
|
-
// Ignoring the event emitter must not hide a real difference in the same run.
|
|
300
|
-
auto eventEmitter = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
301
|
-
|
|
302
|
-
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
303
|
-
[attributedString1 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 12)];
|
|
304
|
-
[attributedString1 addAttribute:RCTAttributedStringEventEmitterKey
|
|
305
|
-
value:RCTWrapEventEmitter(eventEmitter)
|
|
306
|
-
range:NSMakeRange(0, 12)];
|
|
307
|
-
|
|
308
|
-
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
309
|
-
[attributedString2 addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0, 12)];
|
|
310
|
-
|
|
311
|
-
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes = @{};
|
|
312
|
-
|
|
313
|
-
XCTAssertFalse(RCTIsAttributedStringEffectivelySame(
|
|
314
|
-
attributedString1, attributedString2, insensitiveAttributes, TextAttributes{}));
|
|
315
|
-
XCTAssertFalse(RCTIsAttributedStringEffectivelySame(
|
|
316
|
-
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
317
|
-
}
|
|
318
|
-
|
|
319
248
|
- (void)testSamenessOfResolvedParagraphStyleLtr
|
|
320
249
|
{
|
|
321
250
|
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
@@ -99,11 +99,7 @@ val prefabHeadersDir = File("$buildDir/prefab-headers")
|
|
|
99
99
|
// CMake reads the backslashes of a Windows path as escape sequences, so we pass forward slashes.
|
|
100
100
|
val jsiDir = File(reactNativeRootDir, "ReactCommon/jsi")
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
// version, like it already does for the other third-party sources. Release tags are
|
|
104
|
-
// `hermes-v<version>`, so that prefix is stripped to keep the name at `hermes-<version>.tar.gz`.
|
|
105
|
-
val hermesTarballName = "hermes-${hermesVersionProvider.get().removePrefix("hermes-v")}.tar.gz"
|
|
106
|
-
val downloadHermesDest = File(downloadsDir, hermesTarballName)
|
|
102
|
+
val downloadHermesDest = File(downloadsDir, "hermes.tar.gz")
|
|
107
103
|
val downloadHermes by
|
|
108
104
|
tasks.registering(Download::class) {
|
|
109
105
|
src(
|
package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt
CHANGED
|
@@ -335,7 +335,11 @@ internal constructor(
|
|
|
335
335
|
logViewHierarchy(parentView, false)
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
var currParentView = view.parent
|
|
339
|
+
if (currParentView is ViewGroup && currParentView.indexOfChild(view) == -1) {
|
|
340
|
+
currParentView.endViewTransition(view)
|
|
341
|
+
currParentView = view.parent
|
|
342
|
+
}
|
|
339
343
|
if (currParentView != null) {
|
|
340
344
|
val actualParentId = if (currParentView is ViewGroup) currParentView.id else View.NO_ID
|
|
341
345
|
ReactSoftExceptionLogger.logSoftException(
|
|
@@ -40,7 +40,6 @@ public object ReactScrollViewHelper {
|
|
|
40
40
|
private val TAG = ReactScrollView::class.java.simpleName
|
|
41
41
|
private val DEBUG_MODE = false // ReactBuildConfig.DEBUG
|
|
42
42
|
|
|
43
|
-
private const val UNSET_SCROLL_POSITION = -1
|
|
44
43
|
private const val CONTENT_OFFSET_LEFT = "contentOffsetLeft"
|
|
45
44
|
private const val CONTENT_OFFSET_TOP = "contentOffsetTop"
|
|
46
45
|
private const val SCROLL_AWAY_PADDING_TOP = "scrollAwayPaddingTop"
|
|
@@ -374,17 +373,6 @@ public object ReactScrollViewHelper {
|
|
|
374
373
|
// User driven scrolling should disable scroll state updates coming from Fabric
|
|
375
374
|
scrollState.isUpdatedByScroll = true
|
|
376
375
|
|
|
377
|
-
// Until a view sends its first update it doesn't know the offset in its state. On mount that
|
|
378
|
-
// offset is usually already correct, and sending it again would only commit an unchanged tree.
|
|
379
|
-
if (scrollState.lastStateUpdateScroll.equals(UNSET_SCROLL_POSITION, UNSET_SCROLL_POSITION)) {
|
|
380
|
-
scrollView.stateWrapper?.stateData?.let { stateData ->
|
|
381
|
-
scrollState.setLastStateUpdateScroll(
|
|
382
|
-
toPixelFromDIP(stateData.getDouble(CONTENT_OFFSET_LEFT)).toInt(),
|
|
383
|
-
toPixelFromDIP(stateData.getDouble(CONTENT_OFFSET_TOP)).toInt(),
|
|
384
|
-
)
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
376
|
// Dedupe events to reduce JNI traffic
|
|
389
377
|
if (scrollState.lastStateUpdateScroll.equals(scrollX, scrollY)) {
|
|
390
378
|
return
|
|
@@ -672,7 +660,7 @@ public object ReactScrollViewHelper {
|
|
|
672
660
|
/** Get the padding on the bottom for tab bar */
|
|
673
661
|
var scrollAwayPaddingBottom: Int = 0,
|
|
674
662
|
/** Get the Fabric state of last scroll position */
|
|
675
|
-
val lastStateUpdateScroll: Point = Point(
|
|
663
|
+
val lastStateUpdateScroll: Point = Point(-1, -1),
|
|
676
664
|
/** Get true if the previous animation was canceled */
|
|
677
665
|
var isCanceled: Boolean = false,
|
|
678
666
|
/** Get true if previous animation was finished */
|
package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp
CHANGED
|
@@ -892,8 +892,8 @@ jsi::Value JavaTurboModule::invokeJavaMethod(
|
|
|
892
892
|
|
|
893
893
|
jsi::Value returnValue = jsi::Value::null();
|
|
894
894
|
if (returnObject != nullptr) {
|
|
895
|
-
auto
|
|
896
|
-
|
|
895
|
+
auto jResult = jni::adopt_local(returnObject);
|
|
896
|
+
auto result = jni::static_ref_cast<NativeMap::jhybridobject>(jResult);
|
|
897
897
|
returnValue =
|
|
898
898
|
jsi::valueFromDynamic(runtime, result->cthis()->consume());
|
|
899
899
|
}
|
|
@@ -912,8 +912,8 @@ jsi::Value JavaTurboModule::invokeJavaMethod(
|
|
|
912
912
|
|
|
913
913
|
jsi::Value returnValue = jsi::Value::null();
|
|
914
914
|
if (returnObject != nullptr) {
|
|
915
|
-
auto
|
|
916
|
-
|
|
915
|
+
auto jResult = jni::adopt_local(returnObject);
|
|
916
|
+
auto result = jni::static_ref_cast<NativeArray::jhybridobject>(jResult);
|
|
917
917
|
returnValue =
|
|
918
918
|
jsi::valueFromDynamic(runtime, result->cthis()->consume());
|
|
919
919
|
}
|
|
@@ -157,9 +157,7 @@ class BaseTextInputShadowNode
|
|
|
157
157
|
const auto &stateData = BaseShadowNode::getStateData();
|
|
158
158
|
const auto &reactTreeAttributedString = getAttributedString(layoutContext);
|
|
159
159
|
|
|
160
|
-
if (stateData.reactTreeAttributedString.isContentEqual(reactTreeAttributedString)
|
|
161
|
-
stateData.reactTreeAttributedString.getBaseTextAttributes() ==
|
|
162
|
-
reactTreeAttributedString.getBaseTextAttributes()) {
|
|
160
|
+
if (stateData.reactTreeAttributedString.isContentEqual(reactTreeAttributedString)) {
|
|
163
161
|
return;
|
|
164
162
|
}
|
|
165
163
|
|
|
@@ -568,13 +568,6 @@ static BOOL RCTIsAttributeEffectivelySame(
|
|
|
568
568
|
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes,
|
|
569
569
|
const TextAttributes &baseTextAttributes)
|
|
570
570
|
{
|
|
571
|
-
// The event emitter is React-internal metadata, not something UIKit shows, and a TextInput dispatches its events
|
|
572
|
-
// through its own emitter rather than through this attribute. Text typed into the field often carries no
|
|
573
|
-
// emitter while the state echoing it does, so comparing it reports a difference for identical text.
|
|
574
|
-
if ([attributeKey isEqualToString:RCTAttributedStringEventEmitterKey]) {
|
|
575
|
-
return YES;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
571
|
id attribute1 = attributes1[attributeKey] ?: insensitiveAttributes[attributeKey];
|
|
579
572
|
id attribute2 = attributes2[attributeKey] ?: insensitiveAttributes[attributeKey];
|
|
580
573
|
|
|
@@ -24,7 +24,7 @@ struct ReactNativeVersionType {
|
|
|
24
24
|
int32_t Major = 0;
|
|
25
25
|
int32_t Minor = 89;
|
|
26
26
|
int32_t Patch = 0;
|
|
27
|
-
std::string_view Prerelease = "
|
|
27
|
+
std::string_view Prerelease = "rc.1";
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
constexpr ReactNativeVersionType ReactNativeVersion;
|
|
@@ -663,50 +663,15 @@ static bool measureNodeWithFixedSize(
|
|
|
663
663
|
return false;
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
static bool isLayoutZeroedOutRecursively(const yoga::Node* const node) {
|
|
667
|
-
if (!node->getHasNewLayout()) {
|
|
668
|
-
return false;
|
|
669
|
-
}
|
|
670
|
-
// `configVersion` only validates the layout cache, which is empty after
|
|
671
|
-
// zeroing out. Embedders set it again when they give a cloned node a config.
|
|
672
|
-
LayoutResults zeroedOutLayout;
|
|
673
|
-
zeroedOutLayout.setDimension(Dimension::Width, 0);
|
|
674
|
-
zeroedOutLayout.setDimension(Dimension::Height, 0);
|
|
675
|
-
zeroedOutLayout.configVersion = node->getLayout().configVersion;
|
|
676
|
-
if (!(node->getLayout() == zeroedOutLayout)) {
|
|
677
|
-
return false;
|
|
678
|
-
}
|
|
679
|
-
for (const auto child : node->getChildren()) {
|
|
680
|
-
if (!isLayoutZeroedOutRecursively(child)) {
|
|
681
|
-
return false;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
return true;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
666
|
void zeroOutLayoutRecursively(yoga::Node* const node) {
|
|
688
667
|
node->getLayout() = {};
|
|
689
668
|
node->setLayoutDimension(0, Dimension::Width);
|
|
690
669
|
node->setLayoutDimension(0, Dimension::Height);
|
|
691
670
|
node->setHasNewLayout(true);
|
|
692
671
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
// clone the children, and recurse, when part of the subtree needs it.
|
|
697
|
-
//
|
|
698
|
-
// This relies on the embedder leaving `hasNewLayout` set under display: none
|
|
699
|
-
// nodes. Children that are skipped keep their owner from the earlier tree.
|
|
700
|
-
bool didCloneChildren = false;
|
|
701
|
-
for (size_t i = 0; i < node->getChildCount(); i++) {
|
|
702
|
-
if (isLayoutZeroedOutRecursively(node->getChild(i))) {
|
|
703
|
-
continue;
|
|
704
|
-
}
|
|
705
|
-
if (!didCloneChildren) {
|
|
706
|
-
node->cloneChildrenIfNeeded();
|
|
707
|
-
didCloneChildren = true;
|
|
708
|
-
}
|
|
709
|
-
zeroOutLayoutRecursively(node->getChild(i));
|
|
672
|
+
node->cloneChildrenIfNeeded();
|
|
673
|
+
for (const auto child : node->getChildren()) {
|
|
674
|
+
zeroOutLayoutRecursively(child);
|
|
710
675
|
}
|
|
711
676
|
}
|
|
712
677
|
|
|
@@ -76,6 +76,10 @@ class StyleValueHandle {
|
|
|
76
76
|
// Intentionally leaving out auto as a fast path
|
|
77
77
|
enum class Keyword : uint8_t { MaxContent, FitContent, Stretch };
|
|
78
78
|
|
|
79
|
+
constexpr bool isKeyword(Keyword keyword) const {
|
|
80
|
+
return type() == Type::Keyword && value() == static_cast<uint16_t>(keyword);
|
|
81
|
+
}
|
|
82
|
+
|
|
79
83
|
constexpr Type type() const {
|
|
80
84
|
return static_cast<Type>(repr_ & kHandleTypeMask);
|
|
81
85
|
}
|
|
@@ -89,11 +89,11 @@ class StyleValuePool {
|
|
|
89
89
|
return StyleSizeLength::undefined();
|
|
90
90
|
} else if (handle.isAuto()) {
|
|
91
91
|
return StyleSizeLength::ofAuto();
|
|
92
|
-
} else if (isKeyword(
|
|
92
|
+
} else if (handle.isKeyword(StyleValueHandle::Keyword::MaxContent)) {
|
|
93
93
|
return StyleSizeLength::ofMaxContent();
|
|
94
|
-
} else if (isKeyword(
|
|
94
|
+
} else if (handle.isKeyword(StyleValueHandle::Keyword::FitContent)) {
|
|
95
95
|
return StyleSizeLength::ofFitContent();
|
|
96
|
-
} else if (isKeyword(
|
|
96
|
+
} else if (handle.isKeyword(StyleValueHandle::Keyword::Stretch)) {
|
|
97
97
|
return StyleSizeLength::ofStretch();
|
|
98
98
|
} else {
|
|
99
99
|
assert(
|
|
@@ -132,17 +132,6 @@ class StyleValuePool {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
private:
|
|
135
|
-
bool isKeyword(StyleValueHandle handle, StyleValueHandle::Keyword keyword)
|
|
136
|
-
const {
|
|
137
|
-
if (handle.type() != StyleValueHandle::Type::Keyword) {
|
|
138
|
-
return false;
|
|
139
|
-
}
|
|
140
|
-
// storeKeyword() keeps an existing pool slot, so the keyword may be there
|
|
141
|
-
uint32_t value = handle.isValueIndexed() ? buffer_.get32(handle.value())
|
|
142
|
-
: handle.value();
|
|
143
|
-
return value == static_cast<uint32_t>(keyword);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
135
|
void storeValue(
|
|
147
136
|
StyleValueHandle& handle,
|
|
148
137
|
float value,
|
package/index.js
CHANGED
|
@@ -221,26 +221,6 @@ module.exports = {
|
|
|
221
221
|
get Animated() {
|
|
222
222
|
return require('./Libraries/Animated/Animated').default;
|
|
223
223
|
},
|
|
224
|
-
get AnimatedFlatList() {
|
|
225
|
-
return require('./Libraries/Animated/components/AnimatedFlatList').default;
|
|
226
|
-
},
|
|
227
|
-
get AnimatedImage() {
|
|
228
|
-
return require('./Libraries/Animated/components/AnimatedImage').default;
|
|
229
|
-
},
|
|
230
|
-
get AnimatedScrollView() {
|
|
231
|
-
return require('./Libraries/Animated/components/AnimatedScrollView')
|
|
232
|
-
.default;
|
|
233
|
-
},
|
|
234
|
-
get AnimatedSectionList() {
|
|
235
|
-
return require('./Libraries/Animated/components/AnimatedSectionList')
|
|
236
|
-
.default;
|
|
237
|
-
},
|
|
238
|
-
get AnimatedText() {
|
|
239
|
-
return require('./Libraries/Animated/components/AnimatedText').default;
|
|
240
|
-
},
|
|
241
|
-
get AnimatedView() {
|
|
242
|
-
return require('./Libraries/Animated/components/AnimatedView').default;
|
|
243
|
-
},
|
|
244
224
|
get Appearance() {
|
|
245
225
|
return require('./Libraries/Utilities/Appearance');
|
|
246
226
|
},
|
package/index.js.flow
CHANGED
|
@@ -260,12 +260,6 @@ export type {
|
|
|
260
260
|
export {default as Alert} from './Libraries/Alert/Alert';
|
|
261
261
|
|
|
262
262
|
export {default as Animated} from './Libraries/Animated/Animated';
|
|
263
|
-
export {default as AnimatedFlatList} from './Libraries/Animated/components/AnimatedFlatList';
|
|
264
|
-
export {default as AnimatedImage} from './Libraries/Animated/components/AnimatedImage';
|
|
265
|
-
export {default as AnimatedScrollView} from './Libraries/Animated/components/AnimatedScrollView';
|
|
266
|
-
export {default as AnimatedSectionList} from './Libraries/Animated/components/AnimatedSectionList';
|
|
267
|
-
export {default as AnimatedText} from './Libraries/Animated/components/AnimatedText';
|
|
268
|
-
export {default as AnimatedView} from './Libraries/Animated/components/AnimatedView';
|
|
269
263
|
|
|
270
264
|
export * as Appearance from './Libraries/Utilities/Appearance';
|
|
271
265
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.89.0-
|
|
3
|
+
"version": "0.89.0-rc.1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -150,22 +150,22 @@
|
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
"dependencies": {
|
|
153
|
-
"@react-native/asset-utils": "0.89.0-
|
|
154
|
-
"@react-native/codegen": "0.89.0-
|
|
155
|
-
"@react-native/community-cli-plugin": "0.89.0-
|
|
156
|
-
"@react-native/gradle-plugin": "0.89.0-
|
|
157
|
-
"@react-native/normalize-colors": "0.89.0-
|
|
158
|
-
"@react-native/virtualized-lists": "0.89.0-
|
|
153
|
+
"@react-native/asset-utils": "0.89.0-rc.1",
|
|
154
|
+
"@react-native/codegen": "0.89.0-rc.1",
|
|
155
|
+
"@react-native/community-cli-plugin": "0.89.0-rc.1",
|
|
156
|
+
"@react-native/gradle-plugin": "0.89.0-rc.1",
|
|
157
|
+
"@react-native/normalize-colors": "0.89.0-rc.1",
|
|
158
|
+
"@react-native/virtualized-lists": "0.89.0-rc.1",
|
|
159
159
|
"anser": "^1.4.9",
|
|
160
160
|
"ansi-regex": "^5.0.0",
|
|
161
|
+
"flow-parser": "0.336.0",
|
|
161
162
|
"base64-js": "^1.5.1",
|
|
162
163
|
"flow-enums-runtime": "^0.0.6",
|
|
163
|
-
"
|
|
164
|
-
"hermes-compiler": "260318099.0.6",
|
|
164
|
+
"hermes-compiler": "260318099.0.7",
|
|
165
165
|
"invariant": "^2.2.4",
|
|
166
166
|
"memoize-one": "^6.0.0",
|
|
167
|
-
"metro-runtime": "^0.
|
|
168
|
-
"metro-source-map": "^0.
|
|
167
|
+
"metro-runtime": "^0.88.0",
|
|
168
|
+
"metro-source-map": "^0.88.0",
|
|
169
169
|
"nullthrows": "^1.1.1",
|
|
170
170
|
"pretty-format": "^29.7.0",
|
|
171
171
|
"promise": "^8.3.0",
|
|
@@ -208,6 +208,5 @@ $default_command = ['node', '-e', "process.argv=['', '', 'config'];require('@rea
|
|
|
208
208
|
# - config_command: the command to run to get the application's current config, e.g. ['npx', '@react-native-community/cli', 'config'],
|
|
209
209
|
# you can override this if you'd like to avoid the dependency. e.g. ['cat', 'your_config.json']
|
|
210
210
|
def use_native_modules!(config_command = $default_command)
|
|
211
|
-
ReactNativePodsUtils.error_if_spm_injected
|
|
212
211
|
return link_native_modules!(list_native_modules!(config_command))
|
|
213
212
|
end
|
|
@@ -316,24 +316,6 @@ class ReactNativePodsUtils
|
|
|
316
316
|
end
|
|
317
317
|
end
|
|
318
318
|
|
|
319
|
-
# Stops `pod install` on an app that `npx react-native spm add` converted to
|
|
320
|
-
# Swift Package Manager. Codegen would rewrite the app's generated
|
|
321
|
-
# Package.swift, and Xcode resolves packages before any build phase can
|
|
322
|
-
# report it, so this has to run before React Native writes any file.
|
|
323
|
-
# prepare_react_native_project!, use_native_modules! and use_react_native!
|
|
324
|
-
# all call it, because a Podfile need not call the first.
|
|
325
|
-
def self.error_if_spm_injected
|
|
326
|
-
podfile_dir = Pod::Config.instance.installation_root.to_s
|
|
327
|
-
xcodeproj = Dir.glob('*.xcodeproj', base: podfile_dir).sort.find do |name|
|
|
328
|
-
File.exist?(File.join(podfile_dir, name, '.spm-injected.json'))
|
|
329
|
-
end
|
|
330
|
-
return if xcodeproj.nil?
|
|
331
|
-
|
|
332
|
-
raise Pod::Informative, "This app uses Swift Package Manager for React Native " +
|
|
333
|
-
"(#{xcodeproj} has .spm-injected.json), so `pod install` would break the Xcode project. " +
|
|
334
|
-
"To go back to CocoaPods, run `npx react-native spm deinit` first, then `pod install`."
|
|
335
|
-
end
|
|
336
|
-
|
|
337
319
|
# It examines the target_definition property and sets the appropriate value for
|
|
338
320
|
# ENV['USE_FRAMEWORKS'] variable.
|
|
339
321
|
#
|
|
@@ -47,8 +47,6 @@ end
|
|
|
47
47
|
# This function prepares the project for React Native, before processing
|
|
48
48
|
# all the target exposed by the framework.
|
|
49
49
|
def prepare_react_native_project!
|
|
50
|
-
ReactNativePodsUtils.error_if_spm_injected
|
|
51
|
-
|
|
52
50
|
# Temporary solution to suppress duplicated GUID error & master specs repo warning.
|
|
53
51
|
# Can be removed once we move to generate files outside pod install.
|
|
54
52
|
install! 'cocoapods', :deterministic_uuids => false, :warn_for_unused_master_specs_repo => false
|
|
@@ -98,7 +96,6 @@ def use_react_native! (
|
|
|
98
96
|
config_file_dir: '',
|
|
99
97
|
privacy_file_aggregation_enabled: true
|
|
100
98
|
)
|
|
101
|
-
ReactNativePodsUtils.error_if_spm_injected
|
|
102
99
|
error_if_try_to_use_jsc_from_core()
|
|
103
100
|
warn_if_new_arch_disabled()
|
|
104
101
|
|