react-native 0.82.0-rc.4 → 0.82.0-rc.5
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/nodes/AnimatedValue.js +0 -8
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Interaction/PanResponder.js +6 -51
- package/React/Base/RCTBridge.mm +16 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/RCTComponentViewProtocol.h +6 -0
- package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +1 -0
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +2 -0
- package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +5 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/index.js +6 -0
- package/package.json +8 -8
- package/sdks/hermes-engine/version.properties +1 -1
- 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/types_generated/Libraries/Interaction/PanResponder.d.ts +1 -4
|
@@ -18,7 +18,6 @@ import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
|
18
18
|
import type AnimatedTracking from './AnimatedTracking';
|
|
19
19
|
|
|
20
20
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
21
|
-
import InteractionManager from '../../Interaction/InteractionManager';
|
|
22
21
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
23
22
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
24
23
|
|
|
@@ -312,10 +311,6 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
312
311
|
* See https://reactnative.dev/docs/animatedvalue#animate
|
|
313
312
|
*/
|
|
314
313
|
animate(animation: Animation, callback: ?EndCallback): void {
|
|
315
|
-
let handle = null;
|
|
316
|
-
if (animation.__isInteraction) {
|
|
317
|
-
handle = InteractionManager.createInteractionHandle();
|
|
318
|
-
}
|
|
319
314
|
const previousAnimation = this._animation;
|
|
320
315
|
this._animation && this._animation.stop();
|
|
321
316
|
this._animation = animation;
|
|
@@ -328,9 +323,6 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
328
323
|
},
|
|
329
324
|
result => {
|
|
330
325
|
this._animation = null;
|
|
331
|
-
if (handle !== null) {
|
|
332
|
-
InteractionManager.clearInteractionHandle(handle);
|
|
333
|
-
}
|
|
334
326
|
callback && callback(result);
|
|
335
327
|
},
|
|
336
328
|
previousAnimation,
|
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 82;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'rc.
|
|
32
|
+
static prerelease: string | null = 'rc.5';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
import type {GestureResponderEvent} from '../Types/CoreEventTypes';
|
|
14
14
|
|
|
15
|
-
const InteractionManager = require('./InteractionManager').default;
|
|
16
15
|
const TouchHistoryMath = require('./TouchHistoryMath').default;
|
|
17
16
|
|
|
18
17
|
const currentCentroidXOfTouchesChangedAfter =
|
|
@@ -31,9 +30,6 @@ const currentCentroidY = TouchHistoryMath.currentCentroidY;
|
|
|
31
30
|
* single-touch gestures resilient to extra touches, and can be used to
|
|
32
31
|
* recognize simple multi-touch gestures.
|
|
33
32
|
*
|
|
34
|
-
* By default, `PanResponder` holds an `InteractionManager` handle to block
|
|
35
|
-
* long-running JS events from interrupting active gestures.
|
|
36
|
-
*
|
|
37
33
|
* It provides a predictable wrapper of the responder handlers provided by the
|
|
38
34
|
* [gesture responder system](docs/gesture-responder-system.html).
|
|
39
35
|
* For each handler, it provides a new `gestureState` object alongside the
|
|
@@ -405,9 +401,6 @@ const PanResponder = {
|
|
|
405
401
|
getInteractionHandle: () => ?number,
|
|
406
402
|
panHandlers: GestureResponderHandlerMethods,
|
|
407
403
|
} {
|
|
408
|
-
const interactionState = {
|
|
409
|
-
handle: (null: ?number),
|
|
410
|
-
};
|
|
411
404
|
const gestureState: PanResponderGestureState = {
|
|
412
405
|
// Useful for debugging
|
|
413
406
|
stateID: Math.random(),
|
|
@@ -464,10 +457,6 @@ const PanResponder = {
|
|
|
464
457
|
},
|
|
465
458
|
|
|
466
459
|
onResponderGrant(event: GestureResponderEvent): boolean {
|
|
467
|
-
if (!interactionState.handle) {
|
|
468
|
-
interactionState.handle =
|
|
469
|
-
InteractionManager.createInteractionHandle();
|
|
470
|
-
}
|
|
471
460
|
gestureState.x0 = currentCentroidX(event.touchHistory);
|
|
472
461
|
gestureState.y0 = currentCentroidY(event.touchHistory);
|
|
473
462
|
gestureState.dx = 0;
|
|
@@ -482,21 +471,11 @@ const PanResponder = {
|
|
|
482
471
|
},
|
|
483
472
|
|
|
484
473
|
onResponderReject(event: GestureResponderEvent): void {
|
|
485
|
-
|
|
486
|
-
interactionState,
|
|
487
|
-
config.onPanResponderReject,
|
|
488
|
-
event,
|
|
489
|
-
gestureState,
|
|
490
|
-
);
|
|
474
|
+
config.onPanResponderReject?.call(undefined, event, gestureState);
|
|
491
475
|
},
|
|
492
476
|
|
|
493
477
|
onResponderRelease(event: GestureResponderEvent): void {
|
|
494
|
-
|
|
495
|
-
interactionState,
|
|
496
|
-
config.onPanResponderRelease,
|
|
497
|
-
event,
|
|
498
|
-
gestureState,
|
|
499
|
-
);
|
|
478
|
+
config.onPanResponderRelease?.call(undefined, event, gestureState);
|
|
500
479
|
PanResponder._initializeGestureState(gestureState);
|
|
501
480
|
},
|
|
502
481
|
|
|
@@ -529,21 +508,11 @@ const PanResponder = {
|
|
|
529
508
|
onResponderEnd(event: GestureResponderEvent): void {
|
|
530
509
|
const touchHistory = event.touchHistory;
|
|
531
510
|
gestureState.numberActiveTouches = touchHistory.numberActiveTouches;
|
|
532
|
-
|
|
533
|
-
interactionState,
|
|
534
|
-
config.onPanResponderEnd,
|
|
535
|
-
event,
|
|
536
|
-
gestureState,
|
|
537
|
-
);
|
|
511
|
+
config.onPanResponderEnd?.call(undefined, event, gestureState);
|
|
538
512
|
},
|
|
539
513
|
|
|
540
514
|
onResponderTerminate(event: GestureResponderEvent): void {
|
|
541
|
-
|
|
542
|
-
interactionState,
|
|
543
|
-
config.onPanResponderTerminate,
|
|
544
|
-
event,
|
|
545
|
-
gestureState,
|
|
546
|
-
);
|
|
515
|
+
config.onPanResponderTerminate?.call(undefined, event, gestureState);
|
|
547
516
|
PanResponder._initializeGestureState(gestureState);
|
|
548
517
|
},
|
|
549
518
|
|
|
@@ -556,27 +525,13 @@ const PanResponder = {
|
|
|
556
525
|
return {
|
|
557
526
|
panHandlers,
|
|
558
527
|
getInteractionHandle(): ?number {
|
|
559
|
-
|
|
528
|
+
// TODO: Deprecate and delete this method.
|
|
529
|
+
return null;
|
|
560
530
|
},
|
|
561
531
|
};
|
|
562
532
|
},
|
|
563
533
|
};
|
|
564
534
|
|
|
565
|
-
function clearInteractionHandle(
|
|
566
|
-
interactionState: {handle: ?number, ...},
|
|
567
|
-
callback: ?(ActiveCallback | PassiveCallback),
|
|
568
|
-
event: GestureResponderEvent,
|
|
569
|
-
gestureState: PanResponderGestureState,
|
|
570
|
-
) {
|
|
571
|
-
if (interactionState.handle) {
|
|
572
|
-
InteractionManager.clearInteractionHandle(interactionState.handle);
|
|
573
|
-
interactionState.handle = null;
|
|
574
|
-
}
|
|
575
|
-
if (callback) {
|
|
576
|
-
callback(event, gestureState);
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
535
|
export type PanResponderInstance = ReturnType<(typeof PanResponder)['create']>;
|
|
581
536
|
|
|
582
537
|
export default PanResponder;
|
package/React/Base/RCTBridge.mm
CHANGED
|
@@ -380,6 +380,11 @@ static RCTBridge *RCTCurrentBridgeInstance = nil;
|
|
|
380
380
|
moduleProvider:(RCTBridgeModuleListProvider)block
|
|
381
381
|
launchOptions:(NSDictionary *)launchOptions
|
|
382
382
|
{
|
|
383
|
+
// Only enabld this assertion in OSS
|
|
384
|
+
#if COCOAPODS
|
|
385
|
+
[RCTBridge throwIfOnLegacyArch];
|
|
386
|
+
#endif
|
|
387
|
+
|
|
383
388
|
if (self = [super init]) {
|
|
384
389
|
RCTEnforceNewArchitectureValidation(RCTNotAllowedInBridgeless, self, nil);
|
|
385
390
|
_delegate = delegate;
|
|
@@ -393,6 +398,17 @@ static RCTBridge *RCTCurrentBridgeInstance = nil;
|
|
|
393
398
|
return self;
|
|
394
399
|
}
|
|
395
400
|
|
|
401
|
+
// Wrap the exception throwing in a static method to avoid the warning: "The code following the exception will never be
|
|
402
|
+
// executed". This might create build failures internally where we treat warnings as errors.
|
|
403
|
+
+ (void)throwIfOnLegacyArch
|
|
404
|
+
{
|
|
405
|
+
@throw [NSException
|
|
406
|
+
exceptionWithName:NSInternalInconsistencyException
|
|
407
|
+
reason:
|
|
408
|
+
@"You are trying to initialize the legacy architecture. This is not supported anymore and will be removed in the next version of React Native. Please use the New Architecture instead."
|
|
409
|
+
userInfo:nil];
|
|
410
|
+
}
|
|
411
|
+
|
|
396
412
|
RCT_NOT_IMPLEMENTED(-(instancetype)init)
|
|
397
413
|
|
|
398
414
|
- (void)dealloc
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -111,6 +111,12 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) {
|
|
|
111
111
|
*/
|
|
112
112
|
- (void)prepareForRecycle;
|
|
113
113
|
|
|
114
|
+
/*
|
|
115
|
+
* Called for unmounted components that won't be moved to a recycle pool.
|
|
116
|
+
* Useful for releasing any associated resources.
|
|
117
|
+
*/
|
|
118
|
+
- (void)invalidate;
|
|
119
|
+
|
|
114
120
|
/*
|
|
115
121
|
* Read the last props used to update the view.
|
|
116
122
|
*/
|
|
@@ -108,6 +108,7 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024;
|
|
|
108
108
|
auto &recycledViews = _recyclePool[componentHandle];
|
|
109
109
|
|
|
110
110
|
if (recycledViews.size() > RCTComponentViewRegistryRecyclePoolMaxSize || !componentViewDescriptor.shouldBeRecycled) {
|
|
111
|
+
[componentViewDescriptor.view invalidate];
|
|
111
112
|
return;
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -129,6 +129,11 @@ using namespace facebook::react;
|
|
|
129
129
|
// Default implementation does nothing.
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
- (void)invalidate
|
|
133
|
+
{
|
|
134
|
+
// Default implementation does nothing.
|
|
135
|
+
}
|
|
136
|
+
|
|
132
137
|
- (facebook::react::Props::Shared)props
|
|
133
138
|
{
|
|
134
139
|
RCTAssert(NO, @"props access should be implemented by RCTViewComponentView.");
|
package/index.js
CHANGED
|
@@ -224,6 +224,12 @@ module.exports = {
|
|
|
224
224
|
* @deprecated
|
|
225
225
|
*/
|
|
226
226
|
get InteractionManager() {
|
|
227
|
+
warnOnce(
|
|
228
|
+
'interaction-manager-deprecated',
|
|
229
|
+
'InteractionManager has been deprecated and will be removed in a ' +
|
|
230
|
+
'future release. Please refactor long tasks into smaller ones, and ' +
|
|
231
|
+
" use 'requestIdleCallback' instead.",
|
|
232
|
+
);
|
|
227
233
|
return require('./Libraries/Interaction/InteractionManager').default;
|
|
228
234
|
},
|
|
229
235
|
get Keyboard() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.82.0-rc.
|
|
3
|
+
"version": "0.82.0-rc.5",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -162,13 +162,13 @@
|
|
|
162
162
|
},
|
|
163
163
|
"dependencies": {
|
|
164
164
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
165
|
-
"@react-native/assets-registry": "0.82.0-rc.
|
|
166
|
-
"@react-native/codegen": "0.82.0-rc.
|
|
167
|
-
"@react-native/community-cli-plugin": "0.82.0-rc.
|
|
168
|
-
"@react-native/gradle-plugin": "0.82.0-rc.
|
|
169
|
-
"@react-native/js-polyfills": "0.82.0-rc.
|
|
170
|
-
"@react-native/normalize-colors": "0.82.0-rc.
|
|
171
|
-
"@react-native/virtualized-lists": "0.82.0-rc.
|
|
165
|
+
"@react-native/assets-registry": "0.82.0-rc.5",
|
|
166
|
+
"@react-native/codegen": "0.82.0-rc.5",
|
|
167
|
+
"@react-native/community-cli-plugin": "0.82.0-rc.5",
|
|
168
|
+
"@react-native/gradle-plugin": "0.82.0-rc.5",
|
|
169
|
+
"@react-native/js-polyfills": "0.82.0-rc.5",
|
|
170
|
+
"@react-native/normalize-colors": "0.82.0-rc.5",
|
|
171
|
+
"@react-native/virtualized-lists": "0.82.0-rc.5",
|
|
172
172
|
"abort-controller": "^3.0.0",
|
|
173
173
|
"anser": "^1.4.9",
|
|
174
174
|
"ansi-regex": "^5.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
HERMES_V1_VERSION_NAME=250829098.0.
|
|
1
|
+
HERMES_V1_VERSION_NAME=250829098.0.1
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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<<6c3f52d452fe844d027bee1f6d755fa1>>
|
|
8
8
|
*
|
|
9
9
|
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
10
|
* Original file: packages/react-native/Libraries/Interaction/PanResponder.js
|
|
@@ -16,9 +16,6 @@ import type { GestureResponderEvent } from "../Types/CoreEventTypes";
|
|
|
16
16
|
* single-touch gestures resilient to extra touches, and can be used to
|
|
17
17
|
* recognize simple multi-touch gestures.
|
|
18
18
|
*
|
|
19
|
-
* By default, `PanResponder` holds an `InteractionManager` handle to block
|
|
20
|
-
* long-running JS events from interrupting active gestures.
|
|
21
|
-
*
|
|
22
19
|
* It provides a predictable wrapper of the responder handlers provided by the
|
|
23
20
|
* [gesture responder system](docs/gesture-responder-system.html).
|
|
24
21
|
* For each handler, it provides a new `gestureState` object alongside the
|