react-native-windows 0.75.3 → 0.76.0-preview.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/.flowconfig +6 -4
- package/Directory.Build.props +4 -0
- package/Directory.Build.targets +5 -0
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Alert/Alert.windows.js +3 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +7 -7
- package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
- package/Libraries/Animated/animations/Animation.js +11 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -1
- package/Libraries/Animated/animations/SpringAnimation.js +1 -1
- package/Libraries/Animated/animations/TimingAnimation.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +10 -9
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
- package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
- package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
- package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
- package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
- package/Libraries/Animated/useAnimatedProps.js +142 -7
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/FileReader.js +1 -1
- package/Libraries/Blob/URL.js +2 -62
- package/Libraries/Blob/URLSearchParams.js +71 -0
- package/Libraries/Components/Button.windows.js +0 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +131 -169
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
- package/Libraries/Components/TextInput/TextInput.js +230 -94
- package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +32 -30
- package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/Libraries/Components/View/ViewNativeComponent.js +0 -1
- package/Libraries/Components/View/ViewPropTypes.js +14 -0
- package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +3 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +4 -4
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- package/Libraries/Core/setUpGlobals.js +1 -0
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- package/Libraries/Image/AssetSourceResolver.js +28 -1
- package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
- package/Libraries/Image/Image.android.js +9 -14
- package/Libraries/Image/Image.ios.js +11 -22
- package/Libraries/Image/Image.windows.js +11 -22
- package/Libraries/Image/ImageBackground.js +1 -8
- package/Libraries/Image/ImageUtils.js +9 -9
- package/Libraries/Image/ImageViewNativeComponent.js +1 -0
- package/Libraries/Inspector/Inspector.js +3 -2
- package/Libraries/Inspector/InspectorPanel.js +16 -10
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +24 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
- package/Libraries/Modal/Modal.js +0 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +7 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- package/Libraries/ReactNative/AppContainer-dev.js +1 -5
- package/Libraries/ReactNative/AppContainer-prod.js +1 -5
- package/Libraries/ReactNative/AppContainer.js +1 -2
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
- package/Libraries/ReactNative/AppRegistry.js +1 -7
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
- package/Libraries/ReactNative/RendererImplementation.js +26 -4
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/ReactNative/renderApplication.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +74 -15
- package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
- package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +231 -42
- package/Libraries/Text/Text.js +394 -196
- package/Libraries/Text/Text.windows.js +476 -300
- package/Libraries/Text/TextNativeComponent.js +2 -1
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/Appearance.js +108 -84
- package/Libraries/Utilities/DevLoadingView.js +2 -4
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +0 -9
- package/Libraries/Utilities/stringifyViewConfig.js +22 -0
- package/Libraries/Utilities/useColorScheme.js +3 -3
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +6 -5
- package/Microsoft.ReactNative/ComponentView.idl +11 -0
- package/Microsoft.ReactNative/Composition.Input.idl +1 -0
- package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
- package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
- package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
- package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
- package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
- package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
- package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
- package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
- package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
- package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
- package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
- package/Microsoft.ReactNative/packages.fabric.lock.json +159 -0
- package/Microsoft.ReactNative/packages.lock.json +11 -12
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
- package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
- package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
- package/Microsoft.ReactNative.Managed/packages.lock.json +9 -9
- package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.props +1 -1
- package/PropertySheets/Codegen.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +4 -4
- package/PropertySheets/NuGet.LockFile.props +18 -0
- package/README.md +29 -29
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
- package/ReactCommon/packages.lock.json +2 -2
- package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
- package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
- package/Shared/Modules/WebSocketModule.cpp +1 -2
- package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
- package/Shared/Shared.vcxitems +38 -2
- package/Shared/Shared.vcxitems.filters +6 -1
- package/Shared/TurboModuleManager.cpp +0 -3
- package/codegen/NativeLinkingManagerSpec.g.h +3 -3
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
- package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
- package/codegen/rnwcoreJSI-generated.cpp +245 -101
- package/codegen/rnwcoreJSI.h +847 -548
- package/index.js +3 -1
- package/index.windows.js +3 -1
- package/jest/mockComponent.js +4 -1
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +16 -13
- package/package.json +26 -25
- package/src/private/animated/NativeAnimatedHelper.js +438 -0
- package/src/private/animated/NativeAnimatedValidation.js +64 -0
- package/src/private/components/HScrollViewNativeComponents.js +56 -0
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
- package/src/private/components/VScrollViewNativeComponents.js +48 -0
- package/src/private/components/useSyncOnScroll.js +48 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
- package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
- package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
- package/src/private/setup/setUpDOM.js +28 -0
- package/src/private/setup/setUpIntersectionObserver.js +27 -0
- package/src/private/setup/setUpMutationObserver.js +26 -0
- package/src/private/setup/setUpPerformanceObserver.js +64 -0
- package/src/private/specs/modules/NativeAppearance.js +3 -3
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
- package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
- package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
- package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
- package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
- package/src/private/webapis/performance/LongTasks.js +39 -0
- package/src/private/webapis/performance/Performance.js +22 -9
- package/src/private/webapis/performance/PerformanceEntry.js +36 -18
- package/src/private/webapis/performance/PerformanceObserver.js +29 -43
- package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
- package/src/private/webapis/performance/UserTiming.js +17 -12
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
- package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
- package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
- package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
- package/template/index.windows.bundle +1 -1
- package/template/metro.config.js +2 -2
- package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
- package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
- package/templates/cpp-app/metro.config.js +2 -2
- package/templates/cpp-app/template.config.js +5 -5
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
- package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
- package/templates/cpp-lib/example/metro.config.js +2 -2
- package/templates/cpp-lib/template.config.js +3 -3
- package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
- package/types/experimental.d.ts +20 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
- package/Libraries/Core/setUpIntersectionObserver.js +0 -16
- package/Libraries/Core/setUpMutationObserver.js +0 -16
- package/Libraries/Core/setUpPerformanceObserver.js +0 -18
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
- package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
- package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
- package/src/private/core/setUpDOM.js +0 -18
- package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
- /package/src/private/{core → styles}/composeStyles.js +0 -0
|
@@ -19,31 +19,40 @@ import * as React from 'react';
|
|
|
19
19
|
|
|
20
20
|
const MAX_DEPTH = 5;
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/* $FlowIssue[incompatible-type-guard] - Flow does not know that the prototype
|
|
23
|
+
and ReactElement checks preserve the type refinement of `value`. */
|
|
24
|
+
function isPlainObject(value: mixed): value is $ReadOnly<{[string]: mixed}> {
|
|
23
25
|
return (
|
|
24
26
|
value !== null &&
|
|
25
27
|
typeof value === 'object' &&
|
|
26
|
-
Object.getPrototypeOf(value).isPrototypeOf(Object)
|
|
28
|
+
Object.getPrototypeOf(value).isPrototypeOf(Object) &&
|
|
29
|
+
!React.isValidElement(value)
|
|
27
30
|
);
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
function flatAnimatedNodes(
|
|
34
|
+
value: mixed,
|
|
35
|
+
nodes: Array<AnimatedNode> = [],
|
|
36
|
+
depth: number = 0,
|
|
37
|
+
): Array<AnimatedNode> {
|
|
32
38
|
if (depth >= MAX_DEPTH) {
|
|
33
|
-
return;
|
|
39
|
+
return nodes;
|
|
34
40
|
}
|
|
35
|
-
|
|
36
41
|
if (value instanceof AnimatedNode) {
|
|
37
|
-
|
|
42
|
+
nodes.push(value);
|
|
38
43
|
} else if (Array.isArray(value)) {
|
|
39
|
-
value.
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
for (let ii = 0, length = value.length; ii < length; ii++) {
|
|
45
|
+
const element = value[ii];
|
|
46
|
+
flatAnimatedNodes(element, nodes, depth + 1);
|
|
47
|
+
}
|
|
42
48
|
} else if (isPlainObject(value)) {
|
|
43
|
-
Object.
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
const keys = Object.keys(value);
|
|
50
|
+
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
51
|
+
const key = keys[ii];
|
|
52
|
+
flatAnimatedNodes(value[key], nodes, depth + 1);
|
|
53
|
+
}
|
|
46
54
|
}
|
|
55
|
+
return nodes;
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
// Returns a copy of value with a transformation fn applied to any AnimatedNodes
|
|
@@ -58,7 +67,9 @@ function mapAnimatedNodes(value: any, fn: any => any, depth: number = 0): any {
|
|
|
58
67
|
return value.map(element => mapAnimatedNodes(element, fn, depth + 1));
|
|
59
68
|
} else if (isPlainObject(value)) {
|
|
60
69
|
const result: {[string]: any} = {};
|
|
61
|
-
|
|
70
|
+
const keys = Object.keys(value);
|
|
71
|
+
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
72
|
+
const key = keys[ii];
|
|
62
73
|
result[key] = mapAnimatedNodes(value[key], fn, depth + 1);
|
|
63
74
|
}
|
|
64
75
|
return result;
|
|
@@ -67,38 +78,28 @@ function mapAnimatedNodes(value: any, fn: any => any, depth: number = 0): any {
|
|
|
67
78
|
}
|
|
68
79
|
}
|
|
69
80
|
|
|
70
|
-
export
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
} else if (isPlainObject(value)) {
|
|
84
|
-
// Don't consider React elements
|
|
85
|
-
if (React.isValidElement(value)) {
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
for (const key in value) {
|
|
89
|
-
if (hasAnimatedNode(value[key], depth + 1)) {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
81
|
+
export default class AnimatedObject extends AnimatedWithChildren {
|
|
82
|
+
#nodes: $ReadOnlyArray<AnimatedNode>;
|
|
83
|
+
_value: mixed;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Creates an `AnimatedObject` if `value` contains `AnimatedNode` instances.
|
|
87
|
+
* Otherwise, returns `null`.
|
|
88
|
+
*/
|
|
89
|
+
static from(value: mixed): ?AnimatedObject {
|
|
90
|
+
const nodes = flatAnimatedNodes(value);
|
|
91
|
+
if (nodes.length === 0) {
|
|
92
|
+
return null;
|
|
92
93
|
}
|
|
94
|
+
return new AnimatedObject(nodes, value);
|
|
93
95
|
}
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
constructor(value:
|
|
97
|
+
/**
|
|
98
|
+
* Should only be called by `AnimatedObject.from`.
|
|
99
|
+
*/
|
|
100
|
+
constructor(nodes: $ReadOnlyArray<AnimatedNode>, value: mixed) {
|
|
101
101
|
super();
|
|
102
|
+
this.#nodes = nodes;
|
|
102
103
|
this._value = value;
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -115,23 +116,28 @@ export default class AnimatedObject extends AnimatedWithChildren {
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
__attach(): void {
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
const nodes = this.#nodes;
|
|
120
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
121
|
+
const node = nodes[ii];
|
|
120
122
|
node.__addChild(this);
|
|
121
|
-
}
|
|
123
|
+
}
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
__detach(): void {
|
|
125
|
-
|
|
127
|
+
const nodes = this.#nodes;
|
|
128
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
129
|
+
const node = nodes[ii];
|
|
126
130
|
node.__removeChild(this);
|
|
127
|
-
}
|
|
131
|
+
}
|
|
128
132
|
super.__detach();
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
__makeNative(platformConfig: ?PlatformConfig): void {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
const nodes = this.#nodes;
|
|
137
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
138
|
+
const node = nodes[ii];
|
|
139
|
+
node.__makeNative(platformConfig);
|
|
140
|
+
}
|
|
135
141
|
super.__makeNative(platformConfig);
|
|
136
142
|
}
|
|
137
143
|
|
|
@@ -14,44 +14,74 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
|
14
14
|
|
|
15
15
|
import {findNodeHandle} from '../../ReactNative/RendererProxy';
|
|
16
16
|
import {AnimatedEvent} from '../AnimatedEvent';
|
|
17
|
-
import NativeAnimatedHelper from '
|
|
17
|
+
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
18
18
|
import AnimatedNode from './AnimatedNode';
|
|
19
|
-
import AnimatedObject
|
|
19
|
+
import AnimatedObject from './AnimatedObject';
|
|
20
20
|
import AnimatedStyle from './AnimatedStyle';
|
|
21
21
|
import invariant from 'invariant';
|
|
22
22
|
|
|
23
|
-
function createAnimatedProps(
|
|
23
|
+
function createAnimatedProps(
|
|
24
|
+
inputProps: Object,
|
|
25
|
+
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, Object] {
|
|
26
|
+
const nodeKeys: Array<string> = [];
|
|
27
|
+
const nodes: Array<AnimatedNode> = [];
|
|
24
28
|
const props: Object = {};
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
const keys = Object.keys(inputProps);
|
|
31
|
+
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
32
|
+
const key = keys[ii];
|
|
26
33
|
const value = inputProps[key];
|
|
34
|
+
|
|
27
35
|
if (key === 'style') {
|
|
28
|
-
|
|
36
|
+
const node = new AnimatedStyle(value);
|
|
37
|
+
nodeKeys.push(key);
|
|
38
|
+
nodes.push(node);
|
|
39
|
+
props[key] = node;
|
|
29
40
|
} else if (value instanceof AnimatedNode) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
const node = value;
|
|
42
|
+
nodeKeys.push(key);
|
|
43
|
+
nodes.push(node);
|
|
44
|
+
props[key] = node;
|
|
33
45
|
} else {
|
|
34
|
-
|
|
46
|
+
const node = AnimatedObject.from(value);
|
|
47
|
+
if (node == null) {
|
|
48
|
+
props[key] = value;
|
|
49
|
+
} else {
|
|
50
|
+
nodeKeys.push(key);
|
|
51
|
+
nodes.push(node);
|
|
52
|
+
props[key] = node;
|
|
53
|
+
}
|
|
35
54
|
}
|
|
36
55
|
}
|
|
37
|
-
|
|
56
|
+
|
|
57
|
+
return [nodeKeys, nodes, props];
|
|
38
58
|
}
|
|
39
59
|
|
|
40
60
|
export default class AnimatedProps extends AnimatedNode {
|
|
61
|
+
#nodeKeys: $ReadOnlyArray<string>;
|
|
62
|
+
#nodes: $ReadOnlyArray<AnimatedNode>;
|
|
63
|
+
|
|
64
|
+
_animatedView: any = null;
|
|
41
65
|
_props: Object;
|
|
42
|
-
_animatedView: any;
|
|
43
66
|
_callback: () => void;
|
|
44
67
|
|
|
45
|
-
constructor(
|
|
68
|
+
constructor(inputProps: Object, callback: () => void) {
|
|
46
69
|
super();
|
|
47
|
-
|
|
70
|
+
const [nodeKeys, nodes, props] = createAnimatedProps(inputProps);
|
|
71
|
+
this.#nodeKeys = nodeKeys;
|
|
72
|
+
this.#nodes = nodes;
|
|
73
|
+
this._props = props;
|
|
48
74
|
this._callback = callback;
|
|
49
75
|
}
|
|
50
76
|
|
|
51
77
|
__getValue(): Object {
|
|
52
78
|
const props: {[string]: any | ((...args: any) => void)} = {};
|
|
53
|
-
|
|
79
|
+
|
|
80
|
+
const keys = Object.keys(this._props);
|
|
81
|
+
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
82
|
+
const key = keys[ii];
|
|
54
83
|
const value = this._props[key];
|
|
84
|
+
|
|
55
85
|
if (value instanceof AnimatedNode) {
|
|
56
86
|
props[key] = value.__getValue();
|
|
57
87
|
} else if (value instanceof AnimatedEvent) {
|
|
@@ -66,21 +96,23 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
66
96
|
|
|
67
97
|
__getAnimatedValue(): Object {
|
|
68
98
|
const props: {[string]: any} = {};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
99
|
+
|
|
100
|
+
const nodeKeys = this.#nodeKeys;
|
|
101
|
+
const nodes = this.#nodes;
|
|
102
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
103
|
+
const key = nodeKeys[ii];
|
|
104
|
+
const node = nodes[ii];
|
|
105
|
+
props[key] = node.__getAnimatedValue();
|
|
74
106
|
}
|
|
107
|
+
|
|
75
108
|
return props;
|
|
76
109
|
}
|
|
77
110
|
|
|
78
111
|
__attach(): void {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
112
|
+
const nodes = this.#nodes;
|
|
113
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
114
|
+
const node = nodes[ii];
|
|
115
|
+
node.__addChild(this);
|
|
84
116
|
}
|
|
85
117
|
}
|
|
86
118
|
|
|
@@ -88,12 +120,14 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
88
120
|
if (this.__isNative && this._animatedView) {
|
|
89
121
|
this.__disconnectAnimatedView();
|
|
90
122
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
123
|
+
this._animatedView = null;
|
|
124
|
+
|
|
125
|
+
const nodes = this.#nodes;
|
|
126
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
127
|
+
const node = nodes[ii];
|
|
128
|
+
node.__removeChild(this);
|
|
96
129
|
}
|
|
130
|
+
|
|
97
131
|
super.__detach();
|
|
98
132
|
}
|
|
99
133
|
|
|
@@ -102,11 +136,10 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
102
136
|
}
|
|
103
137
|
|
|
104
138
|
__makeNative(platformConfig: ?PlatformConfig): void {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
139
|
+
const nodes = this.#nodes;
|
|
140
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
141
|
+
const node = nodes[ii];
|
|
142
|
+
node.__makeNative(platformConfig);
|
|
110
143
|
}
|
|
111
144
|
|
|
112
145
|
if (!this.__isNative) {
|
|
@@ -170,14 +203,18 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
170
203
|
}
|
|
171
204
|
|
|
172
205
|
__getNativeConfig(): Object {
|
|
206
|
+
const platformConfig = this.__getPlatformConfig();
|
|
173
207
|
const propsConfig: {[string]: number} = {};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
208
|
+
|
|
209
|
+
const nodeKeys = this.#nodeKeys;
|
|
210
|
+
const nodes = this.#nodes;
|
|
211
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
212
|
+
const key = nodeKeys[ii];
|
|
213
|
+
const node = nodes[ii];
|
|
214
|
+
node.__makeNative(platformConfig);
|
|
215
|
+
propsConfig[key] = node.__getNativeTag();
|
|
180
216
|
}
|
|
217
|
+
|
|
181
218
|
return {
|
|
182
219
|
type: 'props',
|
|
183
220
|
props: propsConfig,
|
|
@@ -12,116 +12,160 @@
|
|
|
12
12
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
14
|
|
|
15
|
+
import {validateStyles} from '../../../src/private/animated/NativeAnimatedValidation';
|
|
15
16
|
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
16
17
|
import flattenStyle from '../../StyleSheet/flattenStyle';
|
|
17
18
|
import Platform from '../../Utilities/Platform';
|
|
18
|
-
import NativeAnimatedHelper from '../NativeAnimatedHelper';
|
|
19
19
|
import AnimatedNode from './AnimatedNode';
|
|
20
|
-
import AnimatedObject
|
|
20
|
+
import AnimatedObject from './AnimatedObject';
|
|
21
21
|
import AnimatedTransform from './AnimatedTransform';
|
|
22
22
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
23
23
|
|
|
24
24
|
function createAnimatedStyle(
|
|
25
|
-
inputStyle:
|
|
25
|
+
inputStyle: {[string]: mixed},
|
|
26
26
|
keepUnanimatedValues: boolean,
|
|
27
|
-
): Object {
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
): [$ReadOnlyArray<string>, $ReadOnlyArray<AnimatedNode>, Object] {
|
|
28
|
+
const nodeKeys: Array<string> = [];
|
|
29
|
+
const nodes: Array<AnimatedNode> = [];
|
|
30
|
+
const style: {[string]: any} = {};
|
|
31
|
+
|
|
32
|
+
const keys = Object.keys(inputStyle);
|
|
33
|
+
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
34
|
+
const key = keys[ii];
|
|
35
|
+
const value = inputStyle[key];
|
|
36
|
+
|
|
33
37
|
if (value != null && key === 'transform') {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
const node = ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform()
|
|
39
|
+
? AnimatedObject.from(value)
|
|
40
|
+
: // $FlowFixMe[incompatible-call] - `value` is mixed.
|
|
41
|
+
new AnimatedTransform(value);
|
|
42
|
+
if (node == null) {
|
|
43
|
+
if (keepUnanimatedValues) {
|
|
44
|
+
style[key] = value;
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
nodeKeys.push(key);
|
|
48
|
+
nodes.push(node);
|
|
49
|
+
style[key] = node;
|
|
50
|
+
}
|
|
38
51
|
} else if (value instanceof AnimatedNode) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
const node = value;
|
|
53
|
+
nodeKeys.push(key);
|
|
54
|
+
nodes.push(node);
|
|
55
|
+
style[key] = value;
|
|
56
|
+
} else {
|
|
57
|
+
const node = AnimatedObject.from(value);
|
|
58
|
+
if (node == null) {
|
|
59
|
+
if (keepUnanimatedValues) {
|
|
60
|
+
style[key] = value;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
nodeKeys.push(key);
|
|
64
|
+
nodes.push(node);
|
|
65
|
+
style[key] = node;
|
|
66
|
+
}
|
|
44
67
|
}
|
|
45
68
|
}
|
|
46
|
-
|
|
69
|
+
|
|
70
|
+
return [nodeKeys, nodes, style];
|
|
47
71
|
}
|
|
48
72
|
|
|
49
73
|
export default class AnimatedStyle extends AnimatedWithChildren {
|
|
74
|
+
#nodeKeys: $ReadOnlyArray<string>;
|
|
75
|
+
#nodes: $ReadOnlyArray<AnimatedNode>;
|
|
76
|
+
|
|
50
77
|
_inputStyle: any;
|
|
51
|
-
_style:
|
|
78
|
+
_style: {[string]: any};
|
|
52
79
|
|
|
53
|
-
constructor(
|
|
80
|
+
constructor(inputStyle: any) {
|
|
54
81
|
super();
|
|
55
|
-
this._inputStyle =
|
|
56
|
-
|
|
82
|
+
this._inputStyle = inputStyle;
|
|
83
|
+
const [nodeKeys, nodes, style] = createAnimatedStyle(
|
|
84
|
+
// NOTE: This null check should not be necessary, but the types are not
|
|
85
|
+
// strong nor enforced as of this writing. This check should be hoisted
|
|
86
|
+
// to instantiation sites.
|
|
87
|
+
flattenStyle(inputStyle) ?? {},
|
|
88
|
+
Platform.OS !== 'web',
|
|
89
|
+
);
|
|
90
|
+
this.#nodeKeys = nodeKeys;
|
|
91
|
+
this.#nodes = nodes;
|
|
92
|
+
this._style = style;
|
|
57
93
|
}
|
|
58
94
|
|
|
59
95
|
__getValue(): Object | Array<Object> {
|
|
60
|
-
const
|
|
61
|
-
|
|
96
|
+
const style: {[string]: any} = {};
|
|
97
|
+
|
|
98
|
+
const keys = Object.keys(this._style);
|
|
99
|
+
for (let ii = 0, length = keys.length; ii < length; ii++) {
|
|
100
|
+
const key = keys[ii];
|
|
62
101
|
const value = this._style[key];
|
|
102
|
+
|
|
63
103
|
if (value instanceof AnimatedNode) {
|
|
64
|
-
|
|
104
|
+
style[key] = value.__getValue();
|
|
65
105
|
} else {
|
|
66
|
-
|
|
106
|
+
style[key] = value;
|
|
67
107
|
}
|
|
68
108
|
}
|
|
69
109
|
|
|
70
|
-
return Platform.OS === 'web' ? [this._inputStyle,
|
|
110
|
+
return Platform.OS === 'web' ? [this._inputStyle, style] : style;
|
|
71
111
|
}
|
|
72
112
|
|
|
73
113
|
__getAnimatedValue(): Object {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
114
|
+
const style: {[string]: any} = {};
|
|
115
|
+
|
|
116
|
+
const nodeKeys = this.#nodeKeys;
|
|
117
|
+
const nodes = this.#nodes;
|
|
118
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
119
|
+
const key = nodeKeys[ii];
|
|
120
|
+
const node = nodes[ii];
|
|
121
|
+
style[key] = node.__getAnimatedValue();
|
|
80
122
|
}
|
|
81
|
-
|
|
123
|
+
|
|
124
|
+
return style;
|
|
82
125
|
}
|
|
83
126
|
|
|
84
127
|
__attach(): void {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
128
|
+
const nodes = this.#nodes;
|
|
129
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
130
|
+
const node = nodes[ii];
|
|
131
|
+
node.__addChild(this);
|
|
90
132
|
}
|
|
91
133
|
}
|
|
92
134
|
|
|
93
135
|
__detach(): void {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
136
|
+
const nodes = this.#nodes;
|
|
137
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
138
|
+
const node = nodes[ii];
|
|
139
|
+
node.__removeChild(this);
|
|
99
140
|
}
|
|
100
141
|
super.__detach();
|
|
101
142
|
}
|
|
102
143
|
|
|
103
144
|
__makeNative(platformConfig: ?PlatformConfig) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
145
|
+
const nodes = this.#nodes;
|
|
146
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
147
|
+
const node = nodes[ii];
|
|
148
|
+
node.__makeNative(platformConfig);
|
|
109
149
|
}
|
|
110
150
|
super.__makeNative(platformConfig);
|
|
111
151
|
}
|
|
112
152
|
|
|
113
153
|
__getNativeConfig(): Object {
|
|
154
|
+
const platformConfig = this.__getPlatformConfig();
|
|
114
155
|
const styleConfig: {[string]: ?number} = {};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
156
|
+
|
|
157
|
+
const nodeKeys = this.#nodeKeys;
|
|
158
|
+
const nodes = this.#nodes;
|
|
159
|
+
for (let ii = 0, length = nodes.length; ii < length; ii++) {
|
|
160
|
+
const key = nodeKeys[ii];
|
|
161
|
+
const node = nodes[ii];
|
|
162
|
+
node.__makeNative(platformConfig);
|
|
163
|
+
styleConfig[key] = node.__getNativeTag();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (__DEV__) {
|
|
167
|
+
validateStyles(styleConfig);
|
|
123
168
|
}
|
|
124
|
-
NativeAnimatedHelper.validateStyles(styleConfig);
|
|
125
169
|
return {
|
|
126
170
|
type: 'style',
|
|
127
171
|
style: styleConfig,
|
|
@@ -14,7 +14,7 @@ import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
|
14
14
|
import type {EndCallback} from '../animations/Animation';
|
|
15
15
|
import type AnimatedValue from './AnimatedValue';
|
|
16
16
|
|
|
17
|
-
import NativeAnimatedHelper from '
|
|
17
|
+
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
18
18
|
import AnimatedNode from './AnimatedNode';
|
|
19
19
|
|
|
20
20
|
export default class AnimatedTracking extends AnimatedNode {
|