@office-iss/react-native-win32 0.0.0-canary.276 → 0.0.0-canary.278
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/.flowconfig +2 -1
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Animated/NativeAnimatedAllowlist.js +4 -4
- package/Libraries/Animated/animations/Animation.js +13 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -0
- package/Libraries/Animated/animations/SpringAnimation.js +1 -0
- package/Libraries/Animated/animations/TimingAnimation.js +1 -0
- package/Libraries/Animated/nodes/AnimatedAddition.js +8 -2
- package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +9 -2
- package/Libraries/Animated/nodes/AnimatedDivision.js +8 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -1
- package/Libraries/Animated/nodes/AnimatedModulo.js +4 -2
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +8 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +25 -0
- package/Libraries/Animated/nodes/AnimatedObject.js +8 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +13 -2
- package/Libraries/Animated/nodes/AnimatedStyle.js +13 -2
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +8 -2
- package/Libraries/Animated/nodes/AnimatedTracking.js +4 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +4 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +4 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Network/FormData.js +11 -3
- package/Libraries/Text/Text.d.ts +6 -1
- package/Libraries/Text/TextProps.js +2 -2
- package/Libraries/Text/TextProps.win32.js +2 -2
- package/overrides.json +4 -4
- package/package.json +10 -11
- package/src/private/animated/useAnimatedPropsMemo.js +12 -4
- package/src/private/featureflags/ReactNativeFeatureFlags.js +18 -7
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +3 -2
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +48 -6
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +3 -1
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +11 -11
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
- package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -1
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/Performance.js +0 -12
- package/src/private/webapis/performance/specs/NativePerformance.js +0 -11
- package/src-win/Libraries/Text/Text.d.ts +6 -1
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
- package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +0 -413
- package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +0 -181
- package/src/private/webapis/mutationobserver/specs/__mocks__/NativeMutationObserver.js +0 -327
package/.flowconfig
CHANGED
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Wed,
|
|
5
|
+
"date": "Wed, 08 Jan 2025 06:30:20 GMT",
|
|
6
|
+
"version": "0.0.0-canary.278",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.278",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "34109996+chiaramooney@users.noreply.github.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "533b3f2f8ef146c2dc807465aa948505c1f99ac2",
|
|
14
|
+
"comment": "Integrate 12/10"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 20 Dec 2024 06:22:28 GMT",
|
|
21
|
+
"version": "0.0.0-canary.277",
|
|
22
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.277",
|
|
23
|
+
"comments": {
|
|
24
|
+
"prerelease": [
|
|
25
|
+
{
|
|
26
|
+
"author": "email not defined",
|
|
27
|
+
"package": "@office-iss/react-native-win32",
|
|
28
|
+
"commit": "9372e929083b78c3d8c05ee713a57537f864cdd9",
|
|
29
|
+
"comment": "integrate 0.78.0-nightly-20241201-91e217ff5"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Wed, 18 Dec 2024 06:22:23 GMT",
|
|
6
36
|
"version": "0.0.0-canary.276",
|
|
7
37
|
"tag": "@office-iss/react-native-win32_v0.0.0-canary.276",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Wed,
|
|
3
|
+
<!-- This log was last generated on Wed, 08 Jan 2025 06:30:20 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.0.0-canary.
|
|
7
|
+
## 0.0.0-canary.278
|
|
8
8
|
|
|
9
|
-
Wed,
|
|
9
|
+
Wed, 08 Jan 2025 06:30:20 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- Integrate 12/10 (34109996+chiaramooney@users.noreply.github.com)
|
|
14
14
|
|
|
15
|
+
## 0.0.0-canary.277
|
|
16
|
+
|
|
17
|
+
Fri, 20 Dec 2024 06:22:28 GMT
|
|
18
|
+
|
|
19
|
+
### Changes
|
|
20
|
+
|
|
21
|
+
- integrate 0.78.0-nightly-20241201-91e217ff5 (email not defined)
|
|
22
|
+
|
|
23
|
+
## 0.0.0-canary.276
|
|
24
|
+
|
|
25
|
+
Wed, 18 Dec 2024 06:22:23 GMT
|
|
26
|
+
|
|
27
|
+
### Changes
|
|
28
|
+
|
|
29
|
+
- integrate RN-Nightly 0.77.0-nightly-20241125-4cffff35e (email not defined)
|
|
30
|
+
|
|
15
31
|
## 0.0.0-canary.275
|
|
16
32
|
|
|
17
33
|
Sat, 14 Dec 2024 06:29:12 GMT
|
|
@@ -106,17 +106,17 @@ export function allowTransformProp(prop: string): void {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export function isSupportedColorStyleProp(prop: string): boolean {
|
|
109
|
-
return
|
|
109
|
+
return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export function isSupportedInterpolationParam(param: string): boolean {
|
|
113
|
-
return
|
|
113
|
+
return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export function isSupportedStyleProp(prop: string): boolean {
|
|
117
|
-
return
|
|
117
|
+
return SUPPORTED_STYLES.hasOwnProperty(prop);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
export function isSupportedTransformProp(prop: string): boolean {
|
|
121
|
-
return
|
|
121
|
+
return SUPPORTED_TRANSFORMS.hasOwnProperty(prop);
|
|
122
122
|
}
|
|
@@ -26,6 +26,7 @@ export type AnimationConfig = $ReadOnly<{
|
|
|
26
26
|
onComplete?: ?EndCallback,
|
|
27
27
|
iterations?: number,
|
|
28
28
|
isLooping?: boolean,
|
|
29
|
+
debugID?: ?string,
|
|
29
30
|
...
|
|
30
31
|
}>;
|
|
31
32
|
|
|
@@ -43,6 +44,7 @@ export default class Animation {
|
|
|
43
44
|
__isInteraction: boolean;
|
|
44
45
|
__isLooping: ?boolean;
|
|
45
46
|
__iterations: number;
|
|
47
|
+
__debugID: ?string;
|
|
46
48
|
|
|
47
49
|
constructor(config: AnimationConfig) {
|
|
48
50
|
this.#useNativeDriver = NativeAnimatedHelper.shouldUseNativeDriver(config);
|
|
@@ -51,6 +53,9 @@ export default class Animation {
|
|
|
51
53
|
this.__isInteraction = config.isInteraction ?? !this.#useNativeDriver;
|
|
52
54
|
this.__isLooping = config.isLooping;
|
|
53
55
|
this.__iterations = config.iterations ?? 1;
|
|
56
|
+
if (__DEV__) {
|
|
57
|
+
this.__debugID = config.debugID;
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
start(
|
|
@@ -165,7 +170,14 @@ export default class Animation {
|
|
|
165
170
|
const callback = this.#onEnd;
|
|
166
171
|
if (callback != null) {
|
|
167
172
|
this.#onEnd = null;
|
|
168
|
-
|
|
173
|
+
callback(result);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
__getDebugID(): ?string {
|
|
178
|
+
if (__DEV__) {
|
|
179
|
+
return this.__debugID;
|
|
169
180
|
}
|
|
181
|
+
return undefined;
|
|
170
182
|
}
|
|
171
183
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
15
|
import type AnimatedNode from './AnimatedNode';
|
|
16
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
16
17
|
|
|
17
18
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
18
19
|
import AnimatedValue from './AnimatedValue';
|
|
@@ -22,8 +23,12 @@ export default class AnimatedAddition extends AnimatedWithChildren {
|
|
|
22
23
|
_a: AnimatedNode;
|
|
23
24
|
_b: AnimatedNode;
|
|
24
25
|
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
26
|
+
constructor(
|
|
27
|
+
a: AnimatedNode | number,
|
|
28
|
+
b: AnimatedNode | number,
|
|
29
|
+
config?: ?AnimatedNodeConfig,
|
|
30
|
+
) {
|
|
31
|
+
super(config);
|
|
27
32
|
this._a = typeof a === 'number' ? new AnimatedValue(a) : a;
|
|
28
33
|
this._b = typeof b === 'number' ? new AnimatedValue(b) : b;
|
|
29
34
|
}
|
|
@@ -59,6 +64,7 @@ export default class AnimatedAddition extends AnimatedWithChildren {
|
|
|
59
64
|
return {
|
|
60
65
|
type: 'addition',
|
|
61
66
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
67
|
+
debugID: this.__getDebugID(),
|
|
62
68
|
};
|
|
63
69
|
}
|
|
64
70
|
}
|
|
@@ -14,6 +14,7 @@ import type {ProcessedColorValue} from '../../StyleSheet/processColor';
|
|
|
14
14
|
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
|
15
15
|
import type {NativeColorValue} from '../../StyleSheet/StyleSheetTypes';
|
|
16
16
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
17
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
17
18
|
|
|
18
19
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
19
20
|
import normalizeColor from '../../StyleSheet/normalizeColor';
|
|
@@ -22,6 +23,7 @@ import AnimatedValue, {flushValue} from './AnimatedValue';
|
|
|
22
23
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
23
24
|
|
|
24
25
|
export type AnimatedColorConfig = $ReadOnly<{
|
|
26
|
+
...AnimatedNodeConfig,
|
|
25
27
|
useNativeDriver: boolean,
|
|
26
28
|
}>;
|
|
27
29
|
|
|
@@ -118,7 +120,7 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
118
120
|
_suspendCallbacks: number = 0;
|
|
119
121
|
|
|
120
122
|
constructor(valueIn?: InputValue, config?: ?AnimatedColorConfig) {
|
|
121
|
-
super();
|
|
123
|
+
super(config);
|
|
122
124
|
|
|
123
125
|
let value: RgbaValue | RgbaAnimatedValue | ColorValue =
|
|
124
126
|
valueIn ?? defaultColor;
|
|
@@ -315,6 +317,7 @@ export default class AnimatedColor extends AnimatedWithChildren {
|
|
|
315
317
|
b: this.b.__getNativeTag(),
|
|
316
318
|
a: this.a.__getNativeTag(),
|
|
317
319
|
nativeColor: this.nativeColor,
|
|
320
|
+
debugID: this.__getDebugID(),
|
|
318
321
|
};
|
|
319
322
|
}
|
|
320
323
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
15
|
import type AnimatedNode from './AnimatedNode';
|
|
16
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
16
17
|
|
|
17
18
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
18
19
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
@@ -24,8 +25,13 @@ export default class AnimatedDiffClamp extends AnimatedWithChildren {
|
|
|
24
25
|
_value: number;
|
|
25
26
|
_lastValue: number;
|
|
26
27
|
|
|
27
|
-
constructor(
|
|
28
|
-
|
|
28
|
+
constructor(
|
|
29
|
+
a: AnimatedNode,
|
|
30
|
+
min: number,
|
|
31
|
+
max: number,
|
|
32
|
+
config?: ?AnimatedNodeConfig,
|
|
33
|
+
) {
|
|
34
|
+
super(config);
|
|
29
35
|
|
|
30
36
|
this._a = a;
|
|
31
37
|
this._min = min;
|
|
@@ -67,6 +73,7 @@ export default class AnimatedDiffClamp extends AnimatedWithChildren {
|
|
|
67
73
|
input: this._a.__getNativeTag(),
|
|
68
74
|
min: this._min,
|
|
69
75
|
max: this._max,
|
|
76
|
+
debugID: this.__getDebugID(),
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
79
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
15
16
|
|
|
16
17
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
17
18
|
import AnimatedNode from './AnimatedNode';
|
|
@@ -23,8 +24,12 @@ export default class AnimatedDivision extends AnimatedWithChildren {
|
|
|
23
24
|
_b: AnimatedNode;
|
|
24
25
|
_warnedAboutDivideByZero: boolean = false;
|
|
25
26
|
|
|
26
|
-
constructor(
|
|
27
|
-
|
|
27
|
+
constructor(
|
|
28
|
+
a: AnimatedNode | number,
|
|
29
|
+
b: AnimatedNode | number,
|
|
30
|
+
config?: ?AnimatedNodeConfig,
|
|
31
|
+
) {
|
|
32
|
+
super(config);
|
|
28
33
|
if (b === 0 || (b instanceof AnimatedNode && b.__getValue() === 0)) {
|
|
29
34
|
console.error('Detected potential division by zero in AnimatedDivision');
|
|
30
35
|
}
|
|
@@ -75,6 +80,7 @@ export default class AnimatedDivision extends AnimatedWithChildren {
|
|
|
75
80
|
return {
|
|
76
81
|
type: 'division',
|
|
77
82
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
83
|
+
debugID: this.__getDebugID(),
|
|
78
84
|
};
|
|
79
85
|
}
|
|
80
86
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
16
16
|
import type AnimatedNode from './AnimatedNode';
|
|
17
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
17
18
|
|
|
18
19
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
19
20
|
import {validateInterpolation} from '../../../src/private/animated/NativeAnimatedValidation';
|
|
@@ -26,6 +27,7 @@ import invariant from 'invariant';
|
|
|
26
27
|
type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
|
27
28
|
|
|
28
29
|
export type InterpolationConfigType<OutputT: number | string> = $ReadOnly<{
|
|
30
|
+
...AnimatedNodeConfig,
|
|
29
31
|
inputRange: $ReadOnlyArray<number>,
|
|
30
32
|
outputRange: $ReadOnlyArray<OutputT>,
|
|
31
33
|
easing?: (input: number) => number,
|
|
@@ -327,7 +329,7 @@ export default class AnimatedInterpolation<
|
|
|
327
329
|
_interpolation: ?(input: number) => OutputT;
|
|
328
330
|
|
|
329
331
|
constructor(parent: AnimatedNode, config: InterpolationConfigType<OutputT>) {
|
|
330
|
-
super();
|
|
332
|
+
super(config);
|
|
331
333
|
this._parent = parent;
|
|
332
334
|
this._config = config;
|
|
333
335
|
|
|
@@ -411,6 +413,7 @@ export default class AnimatedInterpolation<
|
|
|
411
413
|
extrapolateRight:
|
|
412
414
|
this._config.extrapolateRight || this._config.extrapolate || 'extend',
|
|
413
415
|
type: 'interpolation',
|
|
416
|
+
debugID: this.__getDebugID(),
|
|
414
417
|
};
|
|
415
418
|
}
|
|
416
419
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
15
|
import type AnimatedNode from './AnimatedNode';
|
|
16
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
16
17
|
|
|
17
18
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
18
19
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
@@ -21,8 +22,8 @@ export default class AnimatedModulo extends AnimatedWithChildren {
|
|
|
21
22
|
_a: AnimatedNode;
|
|
22
23
|
_modulus: number;
|
|
23
24
|
|
|
24
|
-
constructor(a: AnimatedNode, modulus: number) {
|
|
25
|
-
super();
|
|
25
|
+
constructor(a: AnimatedNode, modulus: number, config?: ?AnimatedNodeConfig) {
|
|
26
|
+
super(config);
|
|
26
27
|
this._a = a;
|
|
27
28
|
this._modulus = modulus;
|
|
28
29
|
}
|
|
@@ -58,6 +59,7 @@ export default class AnimatedModulo extends AnimatedWithChildren {
|
|
|
58
59
|
type: 'modulus',
|
|
59
60
|
input: this._a.__getNativeTag(),
|
|
60
61
|
modulus: this._modulus,
|
|
62
|
+
debugID: this.__getDebugID(),
|
|
61
63
|
};
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
15
|
import type AnimatedNode from './AnimatedNode';
|
|
16
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
16
17
|
|
|
17
18
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
18
19
|
import AnimatedValue from './AnimatedValue';
|
|
@@ -22,8 +23,12 @@ export default class AnimatedMultiplication extends AnimatedWithChildren {
|
|
|
22
23
|
_a: AnimatedNode;
|
|
23
24
|
_b: AnimatedNode;
|
|
24
25
|
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
26
|
+
constructor(
|
|
27
|
+
a: AnimatedNode | number,
|
|
28
|
+
b: AnimatedNode | number,
|
|
29
|
+
config?: ?AnimatedNodeConfig,
|
|
30
|
+
) {
|
|
31
|
+
super(config);
|
|
27
32
|
this._a = typeof a === 'number' ? new AnimatedValue(a) : a;
|
|
28
33
|
this._b = typeof b === 'number' ? new AnimatedValue(b) : b;
|
|
29
34
|
}
|
|
@@ -58,6 +63,7 @@ export default class AnimatedMultiplication extends AnimatedWithChildren {
|
|
|
58
63
|
return {
|
|
59
64
|
type: 'multiplication',
|
|
60
65
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
66
|
+
debugID: this.__getDebugID(),
|
|
61
67
|
};
|
|
62
68
|
}
|
|
63
69
|
}
|
|
@@ -19,6 +19,10 @@ const {startListeningToAnimatedNodeValue, stopListeningToAnimatedNodeValue} =
|
|
|
19
19
|
|
|
20
20
|
type ValueListenerCallback = (state: {value: number, ...}) => mixed;
|
|
21
21
|
|
|
22
|
+
export type AnimatedNodeConfig = $ReadOnly<{
|
|
23
|
+
debugID?: string,
|
|
24
|
+
}>;
|
|
25
|
+
|
|
22
26
|
let _uniqueId = 1;
|
|
23
27
|
let _assertNativeAnimatedModule: ?() => void = () => {
|
|
24
28
|
NativeAnimatedHelper.assertNativeAnimatedModule();
|
|
@@ -32,6 +36,18 @@ export default class AnimatedNode {
|
|
|
32
36
|
#updateSubscription: ?EventSubscription = null;
|
|
33
37
|
|
|
34
38
|
_platformConfig: ?PlatformConfig = undefined;
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
config?: ?$ReadOnly<{
|
|
42
|
+
...AnimatedNodeConfig,
|
|
43
|
+
...
|
|
44
|
+
}>,
|
|
45
|
+
) {
|
|
46
|
+
if (__DEV__) {
|
|
47
|
+
this.__debugID = config?.debugID;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
35
51
|
__attach(): void {}
|
|
36
52
|
__detach(): void {
|
|
37
53
|
this.removeAllListeners();
|
|
@@ -197,4 +213,13 @@ export default class AnimatedNode {
|
|
|
197
213
|
toJSON(): mixed {
|
|
198
214
|
return this.__getValue();
|
|
199
215
|
}
|
|
216
|
+
|
|
217
|
+
__debugID: ?string = undefined;
|
|
218
|
+
|
|
219
|
+
__getDebugID(): ?string {
|
|
220
|
+
if (__DEV__) {
|
|
221
|
+
return this.__debugID;
|
|
222
|
+
}
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
200
225
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
15
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
15
16
|
|
|
16
17
|
import AnimatedNode from './AnimatedNode';
|
|
17
18
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
@@ -99,8 +100,12 @@ export default class AnimatedObject extends AnimatedWithChildren {
|
|
|
99
100
|
/**
|
|
100
101
|
* Should only be called by `AnimatedObject.from`.
|
|
101
102
|
*/
|
|
102
|
-
constructor(
|
|
103
|
-
|
|
103
|
+
constructor(
|
|
104
|
+
nodes: $ReadOnlyArray<AnimatedNode>,
|
|
105
|
+
value: mixed,
|
|
106
|
+
config?: ?AnimatedNodeConfig,
|
|
107
|
+
) {
|
|
108
|
+
super(config);
|
|
104
109
|
this.#nodes = nodes;
|
|
105
110
|
this._value = value;
|
|
106
111
|
}
|
|
@@ -157,6 +162,7 @@ export default class AnimatedObject extends AnimatedWithChildren {
|
|
|
157
162
|
value: mapAnimatedNodes(this._value, node => {
|
|
158
163
|
return {nodeTag: node.__getNativeTag()};
|
|
159
164
|
}),
|
|
165
|
+
debugID: this.__getDebugID(),
|
|
160
166
|
};
|
|
161
167
|
}
|
|
162
168
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
12
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
12
13
|
import type {AnimatedStyleAllowlist} from './AnimatedStyle';
|
|
13
14
|
|
|
14
15
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
@@ -37,7 +38,7 @@ function createAnimatedProps(
|
|
|
37
38
|
const key = keys[ii];
|
|
38
39
|
const value = inputProps[key];
|
|
39
40
|
|
|
40
|
-
if (allowlist == null ||
|
|
41
|
+
if (allowlist == null || hasOwn(allowlist, key)) {
|
|
41
42
|
let node;
|
|
42
43
|
if (key === 'style') {
|
|
43
44
|
node = AnimatedStyle.from(value, allowlist?.style);
|
|
@@ -84,8 +85,9 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
84
85
|
inputProps: {[string]: mixed},
|
|
85
86
|
callback: () => void,
|
|
86
87
|
allowlist?: ?AnimatedPropsAllowlist,
|
|
88
|
+
config?: ?AnimatedNodeConfig,
|
|
87
89
|
) {
|
|
88
|
-
super();
|
|
90
|
+
super(config);
|
|
89
91
|
const [nodeKeys, nodes, props] = createAnimatedProps(inputProps, allowlist);
|
|
90
92
|
this.#nodeKeys = nodeKeys;
|
|
91
93
|
this.#nodes = nodes;
|
|
@@ -268,6 +270,15 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
268
270
|
return {
|
|
269
271
|
type: 'props',
|
|
270
272
|
props: propsConfig,
|
|
273
|
+
debugID: this.__getDebugID(),
|
|
271
274
|
};
|
|
272
275
|
}
|
|
273
276
|
}
|
|
277
|
+
|
|
278
|
+
// Supported versions of JSC do not implement the newer Object.hasOwn. Remove
|
|
279
|
+
// this shim when they do.
|
|
280
|
+
// $FlowIgnore[method-unbinding]
|
|
281
|
+
const _hasOwnProp = Object.prototype.hasOwnProperty;
|
|
282
|
+
const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean =
|
|
283
|
+
// $FlowIgnore[method-unbinding]
|
|
284
|
+
Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop));
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
12
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
12
13
|
|
|
13
14
|
import {validateStyles} from '../../../src/private/animated/NativeAnimatedValidation';
|
|
14
15
|
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
@@ -35,7 +36,7 @@ function createAnimatedStyle(
|
|
|
35
36
|
const key = keys[ii];
|
|
36
37
|
const value = inputStyle[key];
|
|
37
38
|
|
|
38
|
-
if (allowlist == null ||
|
|
39
|
+
if (allowlist == null || hasOwn(allowlist, key)) {
|
|
39
40
|
let node;
|
|
40
41
|
if (value != null && key === 'transform') {
|
|
41
42
|
node = ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform()
|
|
@@ -112,8 +113,9 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
112
113
|
nodes: $ReadOnlyArray<AnimatedNode>,
|
|
113
114
|
style: {[string]: mixed},
|
|
114
115
|
inputStyle: any,
|
|
116
|
+
config?: ?AnimatedNodeConfig,
|
|
115
117
|
) {
|
|
116
|
-
super();
|
|
118
|
+
super(config);
|
|
117
119
|
this.#nodeKeys = nodeKeys;
|
|
118
120
|
this.#nodes = nodes;
|
|
119
121
|
this.#style = style;
|
|
@@ -238,6 +240,15 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
238
240
|
return {
|
|
239
241
|
type: 'style',
|
|
240
242
|
style: styleConfig,
|
|
243
|
+
debugID: this.__getDebugID(),
|
|
241
244
|
};
|
|
242
245
|
}
|
|
243
246
|
}
|
|
247
|
+
|
|
248
|
+
// Supported versions of JSC do not implement the newer Object.hasOwn. Remove
|
|
249
|
+
// this shim when they do.
|
|
250
|
+
// $FlowIgnore[method-unbinding]
|
|
251
|
+
const _hasOwnProp = Object.prototype.hasOwnProperty;
|
|
252
|
+
const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean =
|
|
253
|
+
// $FlowIgnore[method-unbinding]
|
|
254
|
+
Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop));
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
15
|
import type AnimatedNode from './AnimatedNode';
|
|
16
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
16
17
|
|
|
17
18
|
import AnimatedInterpolation from './AnimatedInterpolation';
|
|
18
19
|
import AnimatedValue from './AnimatedValue';
|
|
@@ -22,8 +23,12 @@ export default class AnimatedSubtraction extends AnimatedWithChildren {
|
|
|
22
23
|
_a: AnimatedNode;
|
|
23
24
|
_b: AnimatedNode;
|
|
24
25
|
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
26
|
+
constructor(
|
|
27
|
+
a: AnimatedNode | number,
|
|
28
|
+
b: AnimatedNode | number,
|
|
29
|
+
config?: ?AnimatedNodeConfig,
|
|
30
|
+
) {
|
|
31
|
+
super(config);
|
|
27
32
|
this._a = typeof a === 'number' ? new AnimatedValue(a) : a;
|
|
28
33
|
this._b = typeof b === 'number' ? new AnimatedValue(b) : b;
|
|
29
34
|
}
|
|
@@ -59,6 +64,7 @@ export default class AnimatedSubtraction extends AnimatedWithChildren {
|
|
|
59
64
|
return {
|
|
60
65
|
type: 'subtraction',
|
|
61
66
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
67
|
+
debugID: this.__getDebugID(),
|
|
62
68
|
};
|
|
63
69
|
}
|
|
64
70
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
import type {EndCallback} from '../animations/Animation';
|
|
15
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
15
16
|
import type AnimatedValue from './AnimatedValue';
|
|
16
17
|
|
|
17
18
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
@@ -31,8 +32,9 @@ export default class AnimatedTracking extends AnimatedNode {
|
|
|
31
32
|
animationClass: any,
|
|
32
33
|
animationConfig: Object,
|
|
33
34
|
callback?: ?EndCallback,
|
|
35
|
+
config?: ?AnimatedNodeConfig,
|
|
34
36
|
) {
|
|
35
|
-
super();
|
|
37
|
+
super(config);
|
|
36
38
|
this._value = value;
|
|
37
39
|
this._parent = parent;
|
|
38
40
|
this._animationClass = animationClass;
|
|
@@ -95,6 +97,7 @@ export default class AnimatedTracking extends AnimatedNode {
|
|
|
95
97
|
animationConfig,
|
|
96
98
|
toValue: this._parent.__getNativeTag(),
|
|
97
99
|
value: this._value.__getNativeTag(),
|
|
100
|
+
debugID: this.__getDebugID(),
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
14
15
|
|
|
15
16
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
16
17
|
import {validateTransform} from '../../../src/private/animated/NativeAnimatedValidation';
|
|
@@ -70,8 +71,9 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
70
71
|
constructor(
|
|
71
72
|
nodes: $ReadOnlyArray<AnimatedNode>,
|
|
72
73
|
transforms: $ReadOnlyArray<Transform<>>,
|
|
74
|
+
config?: ?AnimatedNodeConfig,
|
|
73
75
|
) {
|
|
74
|
-
super();
|
|
76
|
+
super(config);
|
|
75
77
|
this.#nodes = nodes;
|
|
76
78
|
this._transforms = transforms;
|
|
77
79
|
}
|
|
@@ -160,6 +162,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
160
162
|
return {
|
|
161
163
|
type: 'transform',
|
|
162
164
|
transforms: transformsConfig,
|
|
165
|
+
debugID: this.__getDebugID(),
|
|
163
166
|
};
|
|
164
167
|
}
|
|
165
168
|
}
|