react-native-windows 0.77.0 → 0.78.0-preview.2
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 +1 -1
- package/Chakra/ChakraTracing.cpp +1 -1
- package/Libraries/Animated/animations/Animation.js +22 -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 +9 -2
- package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +10 -2
- package/Libraries/Animated/nodes/AnimatedDivision.js +9 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -1
- package/Libraries/Animated/nodes/AnimatedModulo.js +5 -2
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +9 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +25 -46
- package/Libraries/Animated/nodes/AnimatedObject.js +9 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +5 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +5 -1
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +9 -2
- package/Libraries/Animated/nodes/AnimatedTracking.js +5 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +49 -4
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/Animated/useAnimatedProps.js +0 -43
- package/Libraries/Components/Button.windows.js +3 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +9 -0
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +3 -0
- package/Libraries/Components/View/ViewAccessibility.d.ts +7 -2
- package/Libraries/Components/View/ViewAccessibility.windows.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +0 -9
- package/Libraries/Components/View/ViewPropTypes.windows.js +1 -9
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpBatchedBridge.js +1 -16
- package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
- package/Libraries/Image/AssetSourceResolver.js +11 -0
- package/Libraries/Image/AssetSourceResolver.windows.js +11 -0
- package/Libraries/Image/Image.windows.js +2 -0
- package/Libraries/Inspector/BorderBox.js +26 -14
- package/Libraries/Inspector/BoxInspector.js +60 -42
- package/Libraries/Inspector/ElementBox.js +55 -48
- package/Libraries/Inspector/StyleInspector.js +36 -30
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Lists/FlatList.d.ts +1 -1
- package/Libraries/Modal/Modal.js +2 -0
- package/Libraries/Modal/Modal.windows.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +0 -2
- package/Libraries/Network/RCTNetworking.android.js +24 -16
- package/Libraries/Network/RCTNetworking.ios.js +1 -46
- package/Libraries/Network/RCTNetworking.windows.js +1 -46
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
- package/Libraries/ReactNative/UIManagerProperties.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
- package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
- package/Libraries/StyleSheet/processTransform.js +6 -0
- package/Libraries/Text/Text.d.ts +6 -1
- package/Libraries/Text/Text.windows.js +4 -0
- package/Libraries/Text/TextProps.js +2 -2
- package/Libraries/Text/TextProps.windows.js +3 -2
- package/Libraries/Utilities/BackHandler.android.js +5 -4
- package/Libraries/Utilities/BackHandler.ios.js +4 -5
- package/Libraries/Utilities/BackHandler.windows.js +5 -4
- package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +92 -17
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +13 -33
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -3
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -10
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +11 -9
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +191 -329
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +66 -0
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +21 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -4
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +79 -19
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +71 -17
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +16 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +5 -10
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +138 -110
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +27 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +38 -33
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +0 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +5 -16
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +9 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +5 -0
- package/Microsoft.ReactNative/IReactContext.cpp +2 -2
- package/Microsoft.ReactNative/IReactContext.h +1 -1
- package/Microsoft.ReactNative/IReactContext.idl +2 -2
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +10 -10
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +24 -24
- package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
- package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
- package/Microsoft.ReactNative/ReactHost/React.h +0 -3
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +39 -16
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +4 -2
- package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
- package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
- package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
- package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.cpp +0 -1
- package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
- package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +2 -2
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +2 -2
- package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
- package/Microsoft.ReactNative/XamlUIService.h +4 -1
- package/Microsoft.ReactNative/XamlUIService.idl +2 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
- package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/React.Cpp.props +3 -0
- package/PropertySheets/WebView2.props +1 -1
- package/PropertySheets/WinUI.props +5 -4
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +91 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +1 -12
- package/{Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h → ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h} +37 -35
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +30 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +4 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/primitives.h +179 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +43 -57
- package/Shared/HermesRuntimeHolder.cpp +2 -2
- package/Shared/Shared.vcxitems +8 -14
- package/Shared/Shared.vcxitems.filters +4 -16
- package/Shared/Threading/BatchingQueueThread.cpp +3 -3
- package/codegen/NativeCPUTimeSpec.g.h +41 -0
- package/codegen/NativeFantomSpec.g.h +78 -0
- package/codegen/NativePerformanceSpec.g.h +31 -43
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +84 -84
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
- package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
- package/codegen/react/components/rnwcore/Switch.g.h +263 -0
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
- package/codegen/rnwcoreJSI-generated.cpp +90 -57
- package/codegen/rnwcoreJSI.h +241 -104
- package/index.js +5 -0
- package/index.windows.js +5 -0
- package/just-task.js +1 -1
- package/package.json +25 -26
- package/src/private/animated/NativeAnimatedValidation.js +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +33 -27
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -5
- package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
- package/src/private/specs/modules/{NativeJSCSamplingProfiler.js → NativeCPUTime.js} +7 -2
- package/src/private/specs/modules/NativeFantom.js +37 -0
- package/src/private/utilities/ensureInstance.js +21 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +49 -6
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +17 -9
- 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/types/index.d.ts +1 -0
- package/Libraries/HeapCapture/HeapCapture.js +0 -29
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
- package/Libraries/Performance/SamplingProfiler.js +0 -39
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -34
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +0 -53
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +0 -26
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +0 -363
- package/codegen/NativeJSCSamplingProfilerSpec.g.h +0 -35
- 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/Chakra/ChakraTracing.cpp
CHANGED
|
@@ -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(
|
|
@@ -74,7 +79,16 @@ export default class Animation {
|
|
|
74
79
|
|
|
75
80
|
stop(): void {
|
|
76
81
|
if (this.#nativeID != null) {
|
|
77
|
-
|
|
82
|
+
const nativeID = this.#nativeID;
|
|
83
|
+
const identifier = `${nativeID}:stopAnimation`;
|
|
84
|
+
try {
|
|
85
|
+
// This is only required when singleOpBatching is used, as otherwise
|
|
86
|
+
// we flush calls immediately when there's no pending queue.
|
|
87
|
+
NativeAnimatedHelper.API.setWaitingForIdentifier(identifier);
|
|
88
|
+
NativeAnimatedHelper.API.stopAnimation(nativeID);
|
|
89
|
+
} finally {
|
|
90
|
+
NativeAnimatedHelper.API.unsetWaitingForIdentifier(identifier);
|
|
91
|
+
}
|
|
78
92
|
}
|
|
79
93
|
this.__active = false;
|
|
80
94
|
}
|
|
@@ -168,4 +182,11 @@ export default class Animation {
|
|
|
168
182
|
callback(result);
|
|
169
183
|
}
|
|
170
184
|
}
|
|
185
|
+
|
|
186
|
+
__getDebugID(): ?string {
|
|
187
|
+
if (__DEV__) {
|
|
188
|
+
return this.__debugID;
|
|
189
|
+
}
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
171
192
|
}
|
|
@@ -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
|
}
|
|
@@ -47,6 +52,7 @@ export default class AnimatedAddition extends AnimatedWithChildren {
|
|
|
47
52
|
__attach(): void {
|
|
48
53
|
this._a.__addChild(this);
|
|
49
54
|
this._b.__addChild(this);
|
|
55
|
+
super.__attach();
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
__detach(): void {
|
|
@@ -59,6 +65,7 @@ export default class AnimatedAddition extends AnimatedWithChildren {
|
|
|
59
65
|
return {
|
|
60
66
|
type: 'addition',
|
|
61
67
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
68
|
+
debugID: this.__getDebugID(),
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
71
|
}
|
|
@@ -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;
|
|
@@ -54,6 +60,7 @@ export default class AnimatedDiffClamp extends AnimatedWithChildren {
|
|
|
54
60
|
|
|
55
61
|
__attach(): void {
|
|
56
62
|
this._a.__addChild(this);
|
|
63
|
+
super.__attach();
|
|
57
64
|
}
|
|
58
65
|
|
|
59
66
|
__detach(): void {
|
|
@@ -67,6 +74,7 @@ export default class AnimatedDiffClamp extends AnimatedWithChildren {
|
|
|
67
74
|
input: this._a.__getNativeTag(),
|
|
68
75
|
min: this._min,
|
|
69
76
|
max: this._max,
|
|
77
|
+
debugID: this.__getDebugID(),
|
|
70
78
|
};
|
|
71
79
|
}
|
|
72
80
|
}
|
|
@@ -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
|
}
|
|
@@ -63,6 +68,7 @@ export default class AnimatedDivision extends AnimatedWithChildren {
|
|
|
63
68
|
__attach(): void {
|
|
64
69
|
this._a.__addChild(this);
|
|
65
70
|
this._b.__addChild(this);
|
|
71
|
+
super.__attach();
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
__detach(): void {
|
|
@@ -75,6 +81,7 @@ export default class AnimatedDivision extends AnimatedWithChildren {
|
|
|
75
81
|
return {
|
|
76
82
|
type: 'division',
|
|
77
83
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
84
|
+
debugID: this.__getDebugID(),
|
|
78
85
|
};
|
|
79
86
|
}
|
|
80
87
|
}
|
|
@@ -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
|
|
|
@@ -374,6 +376,7 @@ export default class AnimatedInterpolation<
|
|
|
374
376
|
|
|
375
377
|
__attach(): void {
|
|
376
378
|
this._parent.__addChild(this);
|
|
379
|
+
super.__attach();
|
|
377
380
|
}
|
|
378
381
|
|
|
379
382
|
__detach(): void {
|
|
@@ -411,6 +414,7 @@ export default class AnimatedInterpolation<
|
|
|
411
414
|
extrapolateRight:
|
|
412
415
|
this._config.extrapolateRight || this._config.extrapolate || 'extend',
|
|
413
416
|
type: 'interpolation',
|
|
417
|
+
debugID: this.__getDebugID(),
|
|
414
418
|
};
|
|
415
419
|
}
|
|
416
420
|
}
|
|
@@ -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
|
}
|
|
@@ -46,6 +47,7 @@ export default class AnimatedModulo extends AnimatedWithChildren {
|
|
|
46
47
|
|
|
47
48
|
__attach(): void {
|
|
48
49
|
this._a.__addChild(this);
|
|
50
|
+
super.__attach();
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
__detach(): void {
|
|
@@ -58,6 +60,7 @@ export default class AnimatedModulo extends AnimatedWithChildren {
|
|
|
58
60
|
type: 'modulus',
|
|
59
61
|
input: this._a.__getNativeTag(),
|
|
60
62
|
modulus: this._modulus,
|
|
63
|
+
debugID: this.__getDebugID(),
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -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
|
}
|
|
@@ -46,6 +51,7 @@ export default class AnimatedMultiplication extends AnimatedWithChildren {
|
|
|
46
51
|
__attach(): void {
|
|
47
52
|
this._a.__addChild(this);
|
|
48
53
|
this._b.__addChild(this);
|
|
54
|
+
super.__attach();
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
__detach(): void {
|
|
@@ -58,6 +64,7 @@ export default class AnimatedMultiplication extends AnimatedWithChildren {
|
|
|
58
64
|
return {
|
|
59
65
|
type: 'multiplication',
|
|
60
66
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
67
|
+
debugID: this.__getDebugID(),
|
|
61
68
|
};
|
|
62
69
|
}
|
|
63
70
|
}
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
12
11
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
13
12
|
|
|
14
13
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
15
14
|
import invariant from 'invariant';
|
|
16
15
|
|
|
17
|
-
const {startListeningToAnimatedNodeValue, stopListeningToAnimatedNodeValue} =
|
|
18
|
-
NativeAnimatedHelper.API;
|
|
19
|
-
|
|
20
16
|
type ValueListenerCallback = (state: {value: number, ...}) => mixed;
|
|
21
17
|
|
|
18
|
+
export type AnimatedNodeConfig = $ReadOnly<{
|
|
19
|
+
debugID?: string,
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
22
|
let _uniqueId = 1;
|
|
23
23
|
let _assertNativeAnimatedModule: ?() => void = () => {
|
|
24
24
|
NativeAnimatedHelper.assertNativeAnimatedModule();
|
|
@@ -29,9 +29,20 @@ let _assertNativeAnimatedModule: ?() => void = () => {
|
|
|
29
29
|
|
|
30
30
|
export default class AnimatedNode {
|
|
31
31
|
#listeners: Map<string, ValueListenerCallback> = new Map();
|
|
32
|
-
#updateSubscription: ?EventSubscription = null;
|
|
33
32
|
|
|
34
33
|
_platformConfig: ?PlatformConfig = undefined;
|
|
34
|
+
|
|
35
|
+
constructor(
|
|
36
|
+
config?: ?$ReadOnly<{
|
|
37
|
+
...AnimatedNodeConfig,
|
|
38
|
+
...
|
|
39
|
+
}>,
|
|
40
|
+
) {
|
|
41
|
+
if (__DEV__) {
|
|
42
|
+
this.__debugID = config?.debugID;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
35
46
|
__attach(): void {}
|
|
36
47
|
__detach(): void {
|
|
37
48
|
this.removeAllListeners();
|
|
@@ -62,9 +73,6 @@ export default class AnimatedNode {
|
|
|
62
73
|
);
|
|
63
74
|
|
|
64
75
|
this._platformConfig = platformConfig;
|
|
65
|
-
if (this.#listeners.size > 0) {
|
|
66
|
-
this.#ensureUpdateSubscriptionExists();
|
|
67
|
-
}
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
/**
|
|
@@ -77,9 +85,6 @@ export default class AnimatedNode {
|
|
|
77
85
|
addListener(callback: (value: any) => mixed): string {
|
|
78
86
|
const id = String(_uniqueId++);
|
|
79
87
|
this.#listeners.set(id, callback);
|
|
80
|
-
if (this.__isNative) {
|
|
81
|
-
this.#ensureUpdateSubscriptionExists();
|
|
82
|
-
}
|
|
83
88
|
return id;
|
|
84
89
|
}
|
|
85
90
|
|
|
@@ -91,9 +96,6 @@ export default class AnimatedNode {
|
|
|
91
96
|
*/
|
|
92
97
|
removeListener(id: string): void {
|
|
93
98
|
this.#listeners.delete(id);
|
|
94
|
-
if (this.__isNative && this.#listeners.size === 0) {
|
|
95
|
-
this.#updateSubscription?.remove();
|
|
96
|
-
}
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
/**
|
|
@@ -103,44 +105,12 @@ export default class AnimatedNode {
|
|
|
103
105
|
*/
|
|
104
106
|
removeAllListeners(): void {
|
|
105
107
|
this.#listeners.clear();
|
|
106
|
-
if (this.__isNative) {
|
|
107
|
-
this.#updateSubscription?.remove();
|
|
108
|
-
}
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
hasListeners(): boolean {
|
|
112
111
|
return this.#listeners.size > 0;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
#ensureUpdateSubscriptionExists(): void {
|
|
116
|
-
if (this.#updateSubscription != null) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const nativeTag = this.__getNativeTag();
|
|
120
|
-
startListeningToAnimatedNodeValue(nativeTag);
|
|
121
|
-
const subscription: EventSubscription =
|
|
122
|
-
NativeAnimatedHelper.nativeEventEmitter.addListener(
|
|
123
|
-
'onAnimatedValueUpdate',
|
|
124
|
-
data => {
|
|
125
|
-
if (data.tag === nativeTag) {
|
|
126
|
-
this.__onAnimatedValueUpdateReceived(data.value);
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
this.#updateSubscription = {
|
|
132
|
-
remove: () => {
|
|
133
|
-
// Only this function assigns to `this.#updateSubscription`.
|
|
134
|
-
if (this.#updateSubscription == null) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
this.#updateSubscription = null;
|
|
138
|
-
subscription.remove();
|
|
139
|
-
stopListeningToAnimatedNodeValue(nativeTag);
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
|
|
144
114
|
__onAnimatedValueUpdateReceived(value: number): void {
|
|
145
115
|
this.__callListeners(value);
|
|
146
116
|
}
|
|
@@ -197,4 +167,13 @@ export default class AnimatedNode {
|
|
|
197
167
|
toJSON(): mixed {
|
|
198
168
|
return this.__getValue();
|
|
199
169
|
}
|
|
170
|
+
|
|
171
|
+
__debugID: ?string = undefined;
|
|
172
|
+
|
|
173
|
+
__getDebugID(): ?string {
|
|
174
|
+
if (__DEV__) {
|
|
175
|
+
return this.__debugID;
|
|
176
|
+
}
|
|
177
|
+
return undefined;
|
|
178
|
+
}
|
|
200
179
|
}
|
|
@@ -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
|
}
|
|
@@ -131,6 +136,7 @@ export default class AnimatedObject extends AnimatedWithChildren {
|
|
|
131
136
|
const node = nodes[ii];
|
|
132
137
|
node.__addChild(this);
|
|
133
138
|
}
|
|
139
|
+
super.__attach();
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
__detach(): void {
|
|
@@ -157,6 +163,7 @@ export default class AnimatedObject extends AnimatedWithChildren {
|
|
|
157
163
|
value: mapAnimatedNodes(this._value, node => {
|
|
158
164
|
return {nodeTag: node.__getNativeTag()};
|
|
159
165
|
}),
|
|
166
|
+
debugID: this.__getDebugID(),
|
|
160
167
|
};
|
|
161
168
|
}
|
|
162
169
|
}
|
|
@@ -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';
|
|
@@ -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;
|
|
@@ -158,6 +160,7 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
158
160
|
const node = nodes[ii];
|
|
159
161
|
node.__addChild(this);
|
|
160
162
|
}
|
|
163
|
+
super.__attach();
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
__detach(): void {
|
|
@@ -268,6 +271,7 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
268
271
|
return {
|
|
269
272
|
type: 'props',
|
|
270
273
|
props: propsConfig,
|
|
274
|
+
debugID: this.__getDebugID(),
|
|
271
275
|
};
|
|
272
276
|
}
|
|
273
277
|
}
|
|
@@ -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';
|
|
@@ -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;
|
|
@@ -199,6 +201,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
199
201
|
const node = nodes[ii];
|
|
200
202
|
node.__addChild(this);
|
|
201
203
|
}
|
|
204
|
+
super.__attach();
|
|
202
205
|
}
|
|
203
206
|
|
|
204
207
|
__detach(): void {
|
|
@@ -238,6 +241,7 @@ export default class AnimatedStyle extends AnimatedWithChildren {
|
|
|
238
241
|
return {
|
|
239
242
|
type: 'style',
|
|
240
243
|
style: styleConfig,
|
|
244
|
+
debugID: this.__getDebugID(),
|
|
241
245
|
};
|
|
242
246
|
}
|
|
243
247
|
}
|
|
@@ -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
|
}
|
|
@@ -47,6 +52,7 @@ export default class AnimatedSubtraction extends AnimatedWithChildren {
|
|
|
47
52
|
__attach(): void {
|
|
48
53
|
this._a.__addChild(this);
|
|
49
54
|
this._b.__addChild(this);
|
|
55
|
+
super.__attach();
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
__detach(): void {
|
|
@@ -59,6 +65,7 @@ export default class AnimatedSubtraction extends AnimatedWithChildren {
|
|
|
59
65
|
return {
|
|
60
66
|
type: 'subtraction',
|
|
61
67
|
input: [this._a.__getNativeTag(), this._b.__getNativeTag()],
|
|
68
|
+
debugID: this.__getDebugID(),
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
71
|
}
|
|
@@ -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;
|
|
@@ -65,6 +67,7 @@ export default class AnimatedTracking extends AnimatedNode {
|
|
|
65
67
|
let {platformConfig} = this._animationConfig;
|
|
66
68
|
this.__makeNative(platformConfig);
|
|
67
69
|
}
|
|
70
|
+
super.__attach();
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
__detach(): void {
|
|
@@ -95,6 +98,7 @@ export default class AnimatedTracking extends AnimatedNode {
|
|
|
95
98
|
animationConfig,
|
|
96
99
|
toValue: this._parent.__getNativeTag(),
|
|
97
100
|
value: this._value.__getNativeTag(),
|
|
101
|
+
debugID: this.__getDebugID(),
|
|
98
102
|
};
|
|
99
103
|
}
|
|
100
104
|
}
|