react-native-reanimated 3.9.0-rc.0 → 3.9.0
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/Common/cpp/Fabric/ShadowTreeCloner.cpp +2 -1
- package/Common/cpp/NativeModules/NativeReanimatedModule.cpp +11 -4
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +5 -3
- package/apple/REAModule.mm +14 -29
- package/apple/REANodesManager.mm +7 -6
- package/lib/module/Animated.js.map +1 -1
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/animationBuilder.js.map +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js +2 -2
- package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js +4 -4
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.web.js.map +1 -1
- package/lib/module/createAnimatedComponent/PropsFilter.js +5 -5
- package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
- package/lib/module/createAnimatedComponent/commonTypes.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +33 -33
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/createAnimatedComponent/getViewInfo.js +2 -2
- package/lib/module/createAnimatedComponent/getViewInfo.js.map +1 -1
- package/lib/module/createAnimatedComponent/index.js.map +1 -1
- package/lib/module/createAnimatedComponent/setAndForwardRef.js +4 -5
- package/lib/module/createAnimatedComponent/setAndForwardRef.js.map +1 -1
- package/lib/module/createAnimatedComponent/utils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/mock.js +3 -8
- package/lib/module/mock.js.map +1 -1
- package/lib/module/propsAllowlists.js.map +1 -1
- package/lib/module/reanimated2/Bezier.js.map +1 -1
- package/lib/module/reanimated2/Colors.js +4 -11
- package/lib/module/reanimated2/Colors.js.map +1 -1
- package/lib/module/reanimated2/Easing.js +3 -7
- package/lib/module/reanimated2/Easing.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js +3 -3
- package/lib/module/reanimated2/NativeReanimated/NativeReanimated.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.js.map +1 -1
- package/lib/module/reanimated2/NativeReanimated/index.web.js.map +1 -1
- package/lib/module/reanimated2/PlatformChecker.js +1 -0
- package/lib/module/reanimated2/PlatformChecker.js.map +1 -1
- package/lib/module/reanimated2/PropAdapters.js +1 -1
- package/lib/module/reanimated2/PropAdapters.js.map +1 -1
- package/lib/module/reanimated2/PropsRegistry.js.map +1 -1
- package/lib/module/reanimated2/Sensor.js +2 -2
- package/lib/module/reanimated2/Sensor.js.map +1 -1
- package/lib/module/reanimated2/SensorContainer.js +2 -2
- package/lib/module/reanimated2/SensorContainer.js.map +1 -1
- package/lib/module/reanimated2/UpdateLayoutAnimations.js.map +1 -1
- package/lib/module/reanimated2/UpdateProps.js.map +1 -1
- package/lib/module/reanimated2/ViewDescriptorsSet.js.map +1 -1
- package/lib/module/reanimated2/WorkletEventHandler.js +74 -31
- package/lib/module/reanimated2/WorkletEventHandler.js.map +1 -1
- package/lib/module/reanimated2/animation/clamp.js.map +1 -1
- package/lib/module/reanimated2/animation/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/decay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/index.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/rigidDecay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/rubberBandDecay.js.map +1 -1
- package/lib/module/reanimated2/animation/decay/utils.js.map +1 -1
- package/lib/module/reanimated2/animation/delay.js.map +1 -1
- package/lib/module/reanimated2/animation/index.js.map +1 -1
- package/lib/module/reanimated2/animation/repeat.js +1 -6
- package/lib/module/reanimated2/animation/repeat.js.map +1 -1
- package/lib/module/reanimated2/animation/sequence.js +1 -5
- package/lib/module/reanimated2/animation/sequence.js.map +1 -1
- package/lib/module/reanimated2/animation/spring.js.map +1 -1
- package/lib/module/reanimated2/animation/springUtils.js +8 -10
- package/lib/module/reanimated2/animation/springUtils.js.map +1 -1
- package/lib/module/reanimated2/animation/styleAnimation.js +5 -4
- package/lib/module/reanimated2/animation/styleAnimation.js.map +1 -1
- package/lib/module/reanimated2/animation/timing.js.map +1 -1
- package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js +1 -2
- package/lib/module/reanimated2/animation/transformationMatrix/matrixUtils.js.map +1 -1
- package/lib/module/reanimated2/animation/util.js.map +1 -1
- package/lib/module/reanimated2/commonTypes.js +2 -0
- package/lib/module/reanimated2/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/component/FlatList.js +1 -0
- package/lib/module/reanimated2/component/FlatList.js.map +1 -1
- package/lib/module/reanimated2/component/Image.js +1 -0
- package/lib/module/reanimated2/component/Image.js.map +1 -1
- package/lib/module/reanimated2/component/LayoutAnimationConfig.js +1 -0
- package/lib/module/reanimated2/component/LayoutAnimationConfig.js.map +1 -1
- package/lib/module/reanimated2/component/PerformanceMonitor.js +3 -4
- package/lib/module/reanimated2/component/PerformanceMonitor.js.map +1 -1
- package/lib/module/reanimated2/component/ScrollView.js +1 -0
- package/lib/module/reanimated2/component/ScrollView.js.map +1 -1
- package/lib/module/reanimated2/component/Text.js +1 -0
- package/lib/module/reanimated2/component/Text.js.map +1 -1
- package/lib/module/reanimated2/component/View.js +1 -0
- package/lib/module/reanimated2/component/View.js.map +1 -1
- package/lib/module/reanimated2/core.js +2 -4
- package/lib/module/reanimated2/core.js.map +1 -1
- package/lib/module/reanimated2/errors.js +7 -8
- package/lib/module/reanimated2/errors.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.js +4 -4
- package/lib/module/reanimated2/fabricUtils.js.map +1 -1
- package/lib/module/reanimated2/fabricUtils.web.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js +2 -2
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryJS.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/FrameCallbackRegistryUI.js.map +1 -1
- package/lib/module/reanimated2/frameCallback/index.js.map +1 -1
- package/lib/module/reanimated2/globals.d.js.map +1 -1
- package/lib/module/reanimated2/helperTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/hook/index.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js +1 -0
- package/lib/module/reanimated2/hook/useAnimatedGestureHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js +3 -4
- package/lib/module/reanimated2/hook/useAnimatedKeyboard.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedProps.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedReaction.js +1 -0
- package/lib/module/reanimated2/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js +1 -1
- package/lib/module/reanimated2/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js +3 -1
- package/lib/module/reanimated2/hook/useAnimatedScrollHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedSensor.js.map +1 -1
- package/lib/module/reanimated2/hook/useAnimatedStyle.js +3 -6
- package/lib/module/reanimated2/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js +3 -1
- package/lib/module/reanimated2/hook/useDerivedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useEvent.js +4 -5
- package/lib/module/reanimated2/hook/useEvent.js.map +1 -1
- package/lib/module/reanimated2/hook/useFrameCallback.js +1 -2
- package/lib/module/reanimated2/hook/useFrameCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/useHandler.js +3 -1
- package/lib/module/reanimated2/hook/useHandler.js.map +1 -1
- package/lib/module/reanimated2/hook/useReducedMotion.js.map +1 -1
- package/lib/module/reanimated2/hook/useScrollViewOffset.js +14 -6
- package/lib/module/reanimated2/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/reanimated2/hook/useSharedValue.js.map +1 -1
- package/lib/module/reanimated2/hook/useWorkletCallback.js.map +1 -1
- package/lib/module/reanimated2/hook/utils.js.map +1 -1
- package/lib/module/reanimated2/index.js.map +1 -1
- package/lib/module/reanimated2/initializers.js +1 -5
- package/lib/module/reanimated2/initializers.js.map +1 -1
- package/lib/module/reanimated2/interpolateColor.js +2 -6
- package/lib/module/reanimated2/interpolateColor.js.map +1 -1
- package/lib/module/reanimated2/interpolation.js +1 -1
- package/lib/module/reanimated2/interpolation.js.map +1 -1
- package/lib/module/reanimated2/isSharedValue.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.js +3 -6
- package/lib/module/reanimated2/jestUtils.js.map +1 -1
- package/lib/module/reanimated2/jestUtils.web.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js +4 -5
- package/lib/module/reanimated2/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/WebSensor.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/index.js +2 -2
- package/lib/module/reanimated2/js-reanimated/index.js.map +1 -1
- package/lib/module/reanimated2/js-reanimated/react-native-web.d.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +4 -2
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js +8 -11
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/ComplexAnimationBuilder.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js +8 -9
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js +1 -2
- package/lib/module/reanimated2/layoutReanimation/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js +22 -22
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Bounce.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js +22 -22
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Fade.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js +26 -26
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Flip.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Lightspeed.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js +6 -6
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Roll.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js +18 -18
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Rotate.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js +18 -18
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Slide.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js +10 -10
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Stretch.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js +34 -34
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultAnimations/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/CurvedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/EntryExitTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/FadingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/JumpingTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/LinearTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/SequencedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/defaultTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js +4 -6
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/ProgressTransitionManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js +4 -6
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/SharedTransition.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/sharedTransitions/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Bounce.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Fade.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Flip.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Lightspeed.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Pinwheel.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Roll.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Rotate.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Slide.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Stretch.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animation/Zoom.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animationParser.js +0 -2
- package/lib/module/reanimated2/layoutReanimation/web/animationParser.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js +1 -2
- package/lib/module/reanimated2/layoutReanimation/web/animationsManager.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js +3 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentStyle.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js +6 -7
- package/lib/module/reanimated2/layoutReanimation/web/componentUtils.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/config.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js +2 -2
- package/lib/module/reanimated2/layoutReanimation/web/createAnimation.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/domUtils.js +4 -4
- package/lib/module/reanimated2/layoutReanimation/web/domUtils.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/index.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Fading.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Linear.web.js.map +1 -1
- package/lib/module/reanimated2/layoutReanimation/web/transition/Sequenced.web.js.map +1 -1
- package/lib/module/reanimated2/mappers.js +2 -4
- package/lib/module/reanimated2/mappers.js.map +1 -1
- package/lib/module/reanimated2/mockedRequestAnimationFrame.js.map +1 -1
- package/lib/module/reanimated2/mutables.js +2 -4
- package/lib/module/reanimated2/mutables.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/RNRenderer.web.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/checkCppVersion.js.map +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js +1 -1
- package/lib/module/reanimated2/platform-specific/jsVersion.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.js +2 -4
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/dispatchCommand.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js +2 -2
- package/lib/module/reanimated2/platformFunctions/getRelativeCoords.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/index.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/measure.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/measure.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.web.js +1 -1
- package/lib/module/reanimated2/platformFunctions/scrollTo.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setGestureState.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setGestureState.web.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setNativeProps.js.map +1 -1
- package/lib/module/reanimated2/platformFunctions/setNativeProps.web.js.map +1 -1
- package/lib/module/reanimated2/pluginUtils.js.map +1 -1
- package/lib/module/reanimated2/publicGlobals.js.map +1 -1
- package/lib/module/reanimated2/runtimes.js +11 -19
- package/lib/module/reanimated2/runtimes.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/RNScreensTurboModule.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/animationManager.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/commonTypes.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/index.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/presets.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/styleUpdater.js.map +1 -1
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js +1 -1
- package/lib/module/reanimated2/screenTransition/swipeSimulator.js.map +1 -1
- package/lib/module/reanimated2/shareableMappingCache.js.map +1 -1
- package/lib/module/reanimated2/shareables.js +2 -4
- package/lib/module/reanimated2/shareables.js.map +1 -1
- package/lib/module/reanimated2/threads.js +9 -34
- package/lib/module/reanimated2/threads.js.map +1 -1
- package/lib/module/reanimated2/valueSetter.js +1 -2
- package/lib/module/reanimated2/valueSetter.js.map +1 -1
- package/lib/module/reanimated2/valueUnpacker.js.map +1 -1
- package/lib/module/specs/NativeReanimatedModule.js.map +1 -1
- package/lib/typescript/reanimated2/WorkletEventHandler.d.ts +16 -9
- package/lib/typescript/reanimated2/component/LayoutAnimationConfig.d.ts +1 -1
- package/lib/typescript/reanimated2/component/PerformanceMonitor.d.ts +2 -1
- package/lib/typescript/reanimated2/hook/commonTypes.d.ts +5 -0
- package/lib/typescript/reanimated2/hook/useEvent.d.ts +2 -3
- package/lib/typescript/reanimated2/platform-specific/jsVersion.d.ts +1 -1
- package/package.json +18 -14
- package/plugin/build/plugin.js +7 -2
- package/src/createAnimatedComponent/PropsFilter.tsx +1 -1
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +29 -33
- package/src/reanimated2/WorkletEventHandler.ts +98 -39
- package/src/reanimated2/animation/styleAnimation.ts +8 -6
- package/src/reanimated2/hook/commonTypes.ts +9 -0
- package/src/reanimated2/hook/useEvent.ts +4 -4
- package/src/reanimated2/hook/useScrollViewOffset.ts +21 -5
- package/src/reanimated2/js-reanimated/JSReanimated.ts +6 -3
- package/src/reanimated2/layoutReanimation/web/animationsManager.ts +1 -1
- package/src/reanimated2/layoutReanimation/web/componentStyle.ts +3 -1
- package/src/reanimated2/layoutReanimation/web/componentUtils.ts +1 -1
- package/src/reanimated2/layoutReanimation/web/createAnimation.ts +2 -2
- package/src/reanimated2/platform-specific/jsVersion.ts +1 -1
- package/src/reanimated2/platformFunctions/getRelativeCoords.ts +2 -2
|
@@ -26,7 +26,7 @@ ShadowNode::Unshared cloneShadowTreeWithNewProps(
|
|
|
26
26
|
const auto props = source->getComponentDescriptor().cloneProps(
|
|
27
27
|
propsParserContext, source->getProps(), std::move(rawProps));
|
|
28
28
|
|
|
29
|
-
auto newChildNode = source->clone({/* .props = */ props});
|
|
29
|
+
auto newChildNode = source->clone({/* .props = */ props, ShadowNodeFragment::childrenPlaceholder(), source->getState()});
|
|
30
30
|
|
|
31
31
|
for (auto it = ancestors.rbegin(); it != ancestors.rend(); ++it) {
|
|
32
32
|
auto &parentNode = it->first.get();
|
|
@@ -53,6 +53,7 @@ ShadowNode::Unshared cloneShadowTreeWithNewProps(
|
|
|
53
53
|
newChildNode = parentNode.clone({
|
|
54
54
|
ShadowNodeFragment::propsPlaceholder(),
|
|
55
55
|
std::make_shared<ShadowNode::ListOfShared>(children),
|
|
56
|
+
parentNode.getState()
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -251,9 +251,16 @@ void NativeReanimatedModule::unregisterEventHandler(
|
|
|
251
251
|
|
|
252
252
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
253
253
|
static inline std::string intColorToHex(const int val) {
|
|
254
|
-
std::stringstream
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
std::stringstream
|
|
255
|
+
invertedHexColorStream; // By default transparency is first, color second
|
|
256
|
+
invertedHexColorStream << std::setfill('0') << std::setw(8) << std::hex
|
|
257
|
+
<< val;
|
|
258
|
+
|
|
259
|
+
auto invertedHexColor = invertedHexColorStream.str();
|
|
260
|
+
auto hexColor =
|
|
261
|
+
"#" + invertedHexColor.substr(2, 6) + invertedHexColor.substr(0, 2);
|
|
262
|
+
|
|
263
|
+
return hexColor;
|
|
257
264
|
}
|
|
258
265
|
|
|
259
266
|
std::string NativeReanimatedModule::obtainPropFromShadowNode(
|
|
@@ -545,7 +552,7 @@ bool NativeReanimatedModule::handleRawEvent(
|
|
|
545
552
|
double currentTime) {
|
|
546
553
|
const EventTarget *eventTarget = rawEvent.eventTarget.get();
|
|
547
554
|
if (eventTarget == nullptr) {
|
|
548
|
-
// after app reload
|
|
555
|
+
// after app reload scrollView is unmounted and its content offset is set
|
|
549
556
|
// to 0 and view is thrown into recycle pool setting content offset
|
|
550
557
|
// triggers scroll event eventTarget is null though, because it's
|
|
551
558
|
// unmounting we can just ignore this event, because it's an event on
|
|
@@ -172,7 +172,7 @@ public class NodesManager implements EventDispatcherListener {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
// We register as event listener at the end, because we pass `this` and we haven't finished
|
|
175
|
-
//
|
|
175
|
+
// constructing an object yet.
|
|
176
176
|
// This lead to a crash described in
|
|
177
177
|
// https://github.com/software-mansion/react-native-reanimated/issues/604 which was caused by
|
|
178
178
|
// Nodes Manager being constructed on UI thread and registering for events.
|
|
@@ -257,7 +257,7 @@ public class NodesManager implements EventDispatcherListener {
|
|
|
257
257
|
try {
|
|
258
258
|
semaphore.tryAcquire(16, TimeUnit.MILLISECONDS);
|
|
259
259
|
} catch (InterruptedException e) {
|
|
260
|
-
// if the thread is
|
|
260
|
+
// if the thread is interrupted we just continue and let the layout update happen
|
|
261
261
|
// asynchronously
|
|
262
262
|
}
|
|
263
263
|
}
|
|
@@ -431,7 +431,9 @@ public class NodesManager implements EventDispatcherListener {
|
|
|
431
431
|
return "unable to resolve background color";
|
|
432
432
|
}
|
|
433
433
|
int actualColor = ((ReactViewBackgroundDrawable) background).getColor();
|
|
434
|
-
|
|
434
|
+
String invertedColor = String.format("%08x", (0xFFFFFFFF & actualColor));
|
|
435
|
+
// By default transparency is first, color second
|
|
436
|
+
return "#" + invertedColor.substring(2, 8) + invertedColor.substring(0, 2);
|
|
435
437
|
default:
|
|
436
438
|
throw new IllegalArgumentException(
|
|
437
439
|
"[Reanimated] Attempted to get unsupported property"
|
package/apple/REAModule.mm
CHANGED
|
@@ -59,6 +59,7 @@ typedef void (^AnimatedOperation)(REANodesManager *nodesManager);
|
|
|
59
59
|
SingleInstanceChecker<REAModule> singleInstanceChecker_;
|
|
60
60
|
#endif // NDEBUG
|
|
61
61
|
bool hasListeners;
|
|
62
|
+
bool _isBridgeless;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
@synthesize moduleRegistry = _moduleRegistry;
|
|
@@ -130,7 +131,11 @@ RCT_EXPORT_MODULE(ReanimatedModule);
|
|
|
130
131
|
|
|
131
132
|
- (void)handleJavaScriptDidLoadNotification:(NSNotification *)notification
|
|
132
133
|
{
|
|
133
|
-
|
|
134
|
+
[self attachReactEventListener];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
- (void)attachReactEventListener
|
|
138
|
+
{
|
|
134
139
|
RCTScheduler *scheduler = [_surfacePresenter scheduler];
|
|
135
140
|
__weak __typeof__(self) weakSelf = self;
|
|
136
141
|
_surfacePresenter.runtimeExecutor(^(jsi::Runtime &runtime) {
|
|
@@ -158,50 +163,35 @@ RCT_EXPORT_MODULE(ReanimatedModule);
|
|
|
158
163
|
|
|
159
164
|
/*
|
|
160
165
|
* Taken from RCTNativeAnimatedTurboModule:
|
|
161
|
-
*
|
|
162
|
-
* BridgelessTurboModuleSetup.
|
|
166
|
+
* This selector is invoked via BridgelessTurboModuleSetup.
|
|
163
167
|
*/
|
|
164
168
|
- (void)setSurfacePresenter:(id<RCTSurfacePresenterStub>)surfacePresenter
|
|
165
169
|
{
|
|
166
170
|
_surfacePresenter = surfacePresenter;
|
|
171
|
+
_isBridgeless = true;
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
- (void)setBridge:(RCTBridge *)bridge
|
|
170
175
|
{
|
|
171
|
-
// This method isn't called on Bridgeless mode.
|
|
172
176
|
[super setBridge:bridge];
|
|
173
|
-
|
|
174
|
-
[bridge.uiManager.observerCoordinator addObserver:self];
|
|
175
|
-
|
|
176
177
|
// only within the first loading `self.bridge.surfacePresenter` exists
|
|
177
178
|
// during the reload `self.bridge.surfacePresenter` is null
|
|
178
|
-
|
|
179
|
+
if (self.bridge.surfacePresenter) {
|
|
180
|
+
_surfacePresenter = self.bridge.surfacePresenter;
|
|
181
|
+
}
|
|
179
182
|
|
|
180
|
-
#ifndef NDEBUG
|
|
181
183
|
[self setReaSurfacePresenter];
|
|
182
|
-
#endif // NDEBUG
|
|
183
184
|
|
|
184
|
-
[
|
|
185
|
-
}
|
|
185
|
+
_nodesManager = [[REANodesManager alloc] initWithModule:self bridge:bridge surfacePresenter:_surfacePresenter];
|
|
186
186
|
|
|
187
|
-
- (void)initialize
|
|
188
|
-
{
|
|
189
187
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
190
188
|
selector:@selector(handleJavaScriptDidLoadNotification:)
|
|
191
189
|
name:RCTJavaScriptDidLoadNotification
|
|
192
190
|
object:nil];
|
|
193
191
|
|
|
194
192
|
[[self.moduleRegistry moduleForName:"EventDispatcher"] addDispatchObserver:self];
|
|
195
|
-
|
|
196
|
-
// [bridge.uiManager.observerCoordinator addObserver:self]; // TODO: Check if it's needed on new arch.
|
|
197
|
-
#ifndef NDEBUG
|
|
198
|
-
[self setReaSurfacePresenter];
|
|
199
|
-
#endif // NDEBUG
|
|
200
|
-
|
|
201
|
-
[self setNodesManager:nil];
|
|
202
193
|
}
|
|
203
194
|
|
|
204
|
-
#ifndef NDEBUG
|
|
205
195
|
- (void)setReaSurfacePresenter
|
|
206
196
|
{
|
|
207
197
|
if (reaSurface == nil) {
|
|
@@ -211,12 +201,6 @@ RCT_EXPORT_MODULE(ReanimatedModule);
|
|
|
211
201
|
}
|
|
212
202
|
reaSurface.reaModule = self;
|
|
213
203
|
}
|
|
214
|
-
#endif // NDEBUG
|
|
215
|
-
|
|
216
|
-
- (void)setNodesManager:(RCTBridge *)bridge
|
|
217
|
-
{
|
|
218
|
-
_nodesManager = [[REANodesManager alloc] initWithModule:self bridge:bridge surfacePresenter:_surfacePresenter];
|
|
219
|
-
}
|
|
220
204
|
|
|
221
205
|
#else // RCT_NEW_ARCH_ENABLED
|
|
222
206
|
|
|
@@ -295,7 +279,7 @@ RCT_EXPORT_MODULE(ReanimatedModule);
|
|
|
295
279
|
|
|
296
280
|
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(installTurboModule : (nonnull NSString *)valueUnpackerCode)
|
|
297
281
|
{
|
|
298
|
-
if (
|
|
282
|
+
if (_isBridgeless) {
|
|
299
283
|
#if REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED)
|
|
300
284
|
RCTCxxBridge *cxxBridge = (RCTCxxBridge *)[RCTBridge currentBridge];
|
|
301
285
|
auto &rnRuntime = *(jsi::Runtime *)cxxBridge.runtime;
|
|
@@ -309,6 +293,7 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(installTurboModule : (nonnull NSString *)
|
|
|
309
293
|
});
|
|
310
294
|
auto nativeReanimatedModule = reanimated::createReanimatedModuleBridgeless(
|
|
311
295
|
_moduleRegistry, rnRuntime, std::string([valueUnpackerCode UTF8String]), executorFunction);
|
|
296
|
+
[self attachReactEventListener];
|
|
312
297
|
[self commonInit:nativeReanimatedModule withRnRuntime:rnRuntime];
|
|
313
298
|
#else // REACT_NATIVE_MINOR_VERSION >= 74 && defined(RCT_NEW_ARCH_ENABLED)
|
|
314
299
|
[NSException raise:@"Missing bridge" format:@"[Reanimated] Failed to obtain the bridge."];
|
package/apple/REANodesManager.mm
CHANGED
|
@@ -71,7 +71,7 @@ using namespace facebook::react;
|
|
|
71
71
|
// store reference to the observers array
|
|
72
72
|
id oldObservers = [self.observerCoordinator valueForKey:@"_observers"];
|
|
73
73
|
|
|
74
|
-
// temporarily replace observers with a table
|
|
74
|
+
// temporarily replace observers with a table containing just nodesManager (we need
|
|
75
75
|
// this to capture mounting block)
|
|
76
76
|
NSHashTable<id<RCTUIManagerObserver>> *soleObserver = [NSHashTable new];
|
|
77
77
|
[soleObserver addObject:observer];
|
|
@@ -109,7 +109,7 @@ using namespace facebook::react;
|
|
|
109
109
|
|
|
110
110
|
- (void)dealloc
|
|
111
111
|
{
|
|
112
|
-
RCTAssert(_mounting == nil, @"
|
|
112
|
+
RCTAssert(_mounting == nil, @"Mounting block was set but never executed. This may lead to UI inconsistencies");
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
- (void)unblockUIThread
|
|
@@ -550,10 +550,11 @@ using namespace facebook::react;
|
|
|
550
550
|
}
|
|
551
551
|
const size_t totalComponents = CGColorGetNumberOfComponents(color.CGColor);
|
|
552
552
|
const CGFloat *components = CGColorGetComponents(color.CGColor);
|
|
553
|
-
int r = 255 * components[MIN(0, totalComponents -
|
|
554
|
-
int g = 255 * components[MIN(1, totalComponents -
|
|
555
|
-
int b = 255 * components[MIN(2, totalComponents -
|
|
556
|
-
|
|
553
|
+
int r = 255 * components[MIN(0, totalComponents - 1)];
|
|
554
|
+
int g = 255 * components[MIN(1, totalComponents - 1)];
|
|
555
|
+
int b = 255 * components[MIN(2, totalComponents - 1)];
|
|
556
|
+
int alpha = 255 * components[MIN(3, totalComponents - 1)];
|
|
557
|
+
return [NSString stringWithFormat:@"#%02x%02x%02x%02x", r, g, b, alpha];
|
|
557
558
|
}
|
|
558
559
|
|
|
559
560
|
return [NSString
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createAnimatedComponent","AnimatedText","Text","AnimatedView","View","AnimatedScrollView","ScrollView","AnimatedImage","Image","ReanimatedFlatList","FlatList","addWhitelistedNativeProps","addWhitelistedUIProps"],"sources":["Animated.ts"],"sourcesContent":["'use strict';\nimport type { Extrapolate as _Extrapolate } from './reanimated2/interpolateColor';\nimport type { SharedValue as _SharedValue } from './reanimated2/commonTypes';\nimport type { DerivedValue as _DerivedValue } from './reanimated2/hook/useDerivedValue';\nimport type {\n TransformStyleTypes as _TransformStyleTypes,\n Adaptable as _Adaptable,\n AdaptTransforms as _AdaptTransforms,\n AnimatedTransform as _AnimatedTransform,\n AnimateStyle as _AnimateStyle,\n StylesOrDefault as _StylesOrDefault,\n AnimateProps as _AnimateProps,\n} from './reanimated2/helperTypes';\nimport type { EasingFunction as _EasingFunction } from './reanimated2/Easing';\n\nimport type { AnimatedScrollViewProps as _AnimatedScrollViewProps } from './reanimated2/component/ScrollView';\nimport type { FlatListPropsWithLayout as _FlatListPropsWithLayout } from './reanimated2/component/FlatList';\n\nexport { createAnimatedComponent } from './createAnimatedComponent';\nexport { AnimatedText as Text } from './reanimated2/component/Text';\nexport { AnimatedView as View } from './reanimated2/component/View';\nexport { AnimatedScrollView as ScrollView } from './reanimated2/component/ScrollView';\nexport { AnimatedImage as Image } from './reanimated2/component/Image';\nexport { ReanimatedFlatList as FlatList } from './reanimated2/component/FlatList';\nexport {\n addWhitelistedNativeProps,\n addWhitelistedUIProps,\n} from './ConfigHelper';\n/**\n * @deprecated Please import `Extrapolate` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type Extrapolate = typeof _Extrapolate;\n/**\n * @deprecated Please import `SharedValue` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\n\nexport type SharedValue<T> = _SharedValue<T>;\n/**\n * @deprecated Please import `DerivedValue` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type DerivedValue<T> = _DerivedValue<T>;\n/**\n * @deprecated Please import `Adaptable` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type Adaptable<T> = _Adaptable<T>;\n/**\n * @deprecated Please import `TransformStyleTypes` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type TransformStyleTypes = _TransformStyleTypes;\n/**\n * @deprecated Please import `AdaptTransforms` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AdaptTransforms<T> = _AdaptTransforms<T>;\n/**\n * @deprecated Please import `AnimatedTransform` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type AnimatedTransform = _AnimatedTransform;\n/**\n * @deprecated Please import `AnimateStyle` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimateStyle<S> = _AnimateStyle<S>;\n/**\n * @deprecated Please import `StylesOrDefault` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type StylesOrDefault<S> = _StylesOrDefault<S>;\n/**\n * @deprecated Please import `AnimateProps` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimateProps<P extends object> = _AnimateProps<P>;\n/**\n * @deprecated Please import `EasingFunction` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type EasingFunction = _EasingFunction;\n/**\n * @deprecated Please import `AnimatedScrollViewProps` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimatedScrollViewProps = _AnimatedScrollViewProps;\n/**\n * @deprecated Please import `FlatListPropsWithLayout` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type FlatListPropsWithLayout<T> = _FlatListPropsWithLayout<T>;\n"],"mappings":"AAAA,YAAY;;AAkBZ,SAASA,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,YAAY,IAAIC,IAAI,QAAQ,8BAA8B;AACnE,SAASC,YAAY,IAAIC,IAAI,QAAQ,8BAA8B;AACnE,SAASC,kBAAkB,IAAIC,UAAU,QAAQ,oCAAoC;AACrF,SAASC,aAAa,IAAIC,KAAK,QAAQ,+BAA+B;AACtE,SAASC,kBAAkB,IAAIC,QAAQ,QAAQ,kCAAkC;AACjF,SACEC,yBAAyB,EACzBC,qBAAqB,QAChB,gBAAgB;AACvB;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA"}
|
|
1
|
+
{"version":3,"names":["createAnimatedComponent","AnimatedText","Text","AnimatedView","View","AnimatedScrollView","ScrollView","AnimatedImage","Image","ReanimatedFlatList","FlatList","addWhitelistedNativeProps","addWhitelistedUIProps"],"sources":["Animated.ts"],"sourcesContent":["'use strict';\nimport type { Extrapolate as _Extrapolate } from './reanimated2/interpolateColor';\nimport type { SharedValue as _SharedValue } from './reanimated2/commonTypes';\nimport type { DerivedValue as _DerivedValue } from './reanimated2/hook/useDerivedValue';\nimport type {\n TransformStyleTypes as _TransformStyleTypes,\n Adaptable as _Adaptable,\n AdaptTransforms as _AdaptTransforms,\n AnimatedTransform as _AnimatedTransform,\n AnimateStyle as _AnimateStyle,\n StylesOrDefault as _StylesOrDefault,\n AnimateProps as _AnimateProps,\n} from './reanimated2/helperTypes';\nimport type { EasingFunction as _EasingFunction } from './reanimated2/Easing';\n\nimport type { AnimatedScrollViewProps as _AnimatedScrollViewProps } from './reanimated2/component/ScrollView';\nimport type { FlatListPropsWithLayout as _FlatListPropsWithLayout } from './reanimated2/component/FlatList';\n\nexport { createAnimatedComponent } from './createAnimatedComponent';\nexport { AnimatedText as Text } from './reanimated2/component/Text';\nexport { AnimatedView as View } from './reanimated2/component/View';\nexport { AnimatedScrollView as ScrollView } from './reanimated2/component/ScrollView';\nexport { AnimatedImage as Image } from './reanimated2/component/Image';\nexport { ReanimatedFlatList as FlatList } from './reanimated2/component/FlatList';\nexport {\n addWhitelistedNativeProps,\n addWhitelistedUIProps,\n} from './ConfigHelper';\n/**\n * @deprecated Please import `Extrapolate` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type Extrapolate = typeof _Extrapolate;\n/**\n * @deprecated Please import `SharedValue` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\n\nexport type SharedValue<T> = _SharedValue<T>;\n/**\n * @deprecated Please import `DerivedValue` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type DerivedValue<T> = _DerivedValue<T>;\n/**\n * @deprecated Please import `Adaptable` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type Adaptable<T> = _Adaptable<T>;\n/**\n * @deprecated Please import `TransformStyleTypes` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type TransformStyleTypes = _TransformStyleTypes;\n/**\n * @deprecated Please import `AdaptTransforms` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AdaptTransforms<T> = _AdaptTransforms<T>;\n/**\n * @deprecated Please import `AnimatedTransform` directly from `react-native-reanimated` instead of `Animated` namespace.\n */\nexport type AnimatedTransform = _AnimatedTransform;\n/**\n * @deprecated Please import `AnimateStyle` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimateStyle<S> = _AnimateStyle<S>;\n/**\n * @deprecated Please import `StylesOrDefault` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type StylesOrDefault<S> = _StylesOrDefault<S>;\n/**\n * @deprecated Please import `AnimateProps` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimateProps<P extends object> = _AnimateProps<P>;\n/**\n * @deprecated Please import `EasingFunction` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type EasingFunction = _EasingFunction;\n/**\n * @deprecated Please import `AnimatedScrollViewProps` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type AnimatedScrollViewProps = _AnimatedScrollViewProps;\n/**\n * @deprecated Please import `FlatListPropsWithLayout` directly from `react-native-reanimated` instead of `Animated` namespace.\n * */\nexport type FlatListPropsWithLayout<T> = _FlatListPropsWithLayout<T>;\n"],"mappings":"AAAA,YAAY;;AAkBZ,SAASA,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,YAAY,IAAIC,IAAI,QAAQ,8BAA8B;AACnE,SAASC,YAAY,IAAIC,IAAI,QAAQ,8BAA8B;AACnE,SAASC,kBAAkB,IAAIC,UAAU,QAAQ,oCAAoC;AACrF,SAASC,aAAa,IAAIC,KAAK,QAAQ,+BAA+B;AACtE,SAASC,kBAAkB,IAAIC,QAAQ,QAAQ,kCAAkC;AACjF,SACEC,yBAAyB,EACzBC,qBAAqB,QAChB,gBAAgB;AACvB;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PropsAllowlists","jsiConfigureProps","assertNoOverlapInLists","key","NATIVE_THREAD_PROPS_WHITELIST","UI_THREAD_PROPS_WHITELIST","Error","configureProps","Object","keys","addWhitelistedNativeProps","props","oldSize","length","addWhitelistedUIProps","PROCESSED_VIEW_NAMES","Set","adaptViewConfig","viewConfig","viewName","uiViewClassName","validAttributes","has","propsToAdd","forEach","add"],"sources":["ConfigHelper.ts"],"sourcesContent":["'use strict';\nimport { PropsAllowlists } from './propsAllowlists';\nimport { jsiConfigureProps } from './reanimated2/core';\nfunction assertNoOverlapInLists() {\n for (const key in PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST) {\n if (key in PropsAllowlists.UI_THREAD_PROPS_WHITELIST) {\n throw new Error(\n `[Reanimated] Property \\`${key}\\` was whitelisted both as UI and native prop. Please remove it from one of the lists.`\n );\n }\n }\n}\n\nexport function configureProps(): void {\n assertNoOverlapInLists();\n jsiConfigureProps(\n Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST),\n Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST)\n );\n}\n\nexport function addWhitelistedNativeProps(\n props: Record<string, boolean>\n): void {\n const oldSize = Object.keys(\n PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST\n ).length;\n PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST = {\n ...PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST,\n ...props,\n };\n if (\n oldSize !==\n Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST).length\n ) {\n configureProps();\n }\n}\n\nexport function addWhitelistedUIProps(props: Record<string, boolean>): void {\n const oldSize = Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length;\n PropsAllowlists.UI_THREAD_PROPS_WHITELIST = {\n ...PropsAllowlists.UI_THREAD_PROPS_WHITELIST,\n ...props,\n };\n if (\n oldSize !== Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length\n ) {\n configureProps();\n }\n}\n\nconst PROCESSED_VIEW_NAMES = new Set();\n\nexport interface ViewConfig {\n uiViewClassName: string;\n validAttributes: Record<string, unknown>;\n}\n/**\n * updates UI props whitelist for given view host instance\n * this will work just once for every view name\n */\n\nexport function adaptViewConfig(viewConfig: ViewConfig): void {\n const viewName = viewConfig.uiViewClassName;\n const props = viewConfig.validAttributes;\n\n // update whitelist of UI props for this view name only once\n if (!PROCESSED_VIEW_NAMES.has(viewName)) {\n const propsToAdd: Record<string, boolean> = {};\n Object.keys(props).forEach((key) => {\n // we don't want to add native props as they affect layout\n // we also skip props which repeat here\n if (\n !(key in PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST) &&\n !(key in PropsAllowlists.UI_THREAD_PROPS_WHITELIST)\n ) {\n propsToAdd[key] = true;\n }\n });\n addWhitelistedUIProps(propsToAdd);\n\n PROCESSED_VIEW_NAMES.add(viewName);\n }\n}\n\nconfigureProps();\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,sBAAsBA,CAAA,EAAG;EAChC,KAAK,MAAMC,GAAG,IAAIH,eAAe,CAACI,6BAA6B,EAAE;IAC/D,IAAID,GAAG,IAAIH,eAAe,CAACK,yBAAyB,EAAE;MACpD,MAAM,IAAIC,KAAK,CACZ,2BAA0BH,GAAI,
|
|
1
|
+
{"version":3,"names":["PropsAllowlists","jsiConfigureProps","assertNoOverlapInLists","key","NATIVE_THREAD_PROPS_WHITELIST","UI_THREAD_PROPS_WHITELIST","Error","configureProps","Object","keys","addWhitelistedNativeProps","props","oldSize","length","addWhitelistedUIProps","PROCESSED_VIEW_NAMES","Set","adaptViewConfig","viewConfig","viewName","uiViewClassName","validAttributes","has","propsToAdd","forEach","add"],"sources":["ConfigHelper.ts"],"sourcesContent":["'use strict';\nimport { PropsAllowlists } from './propsAllowlists';\nimport { jsiConfigureProps } from './reanimated2/core';\nfunction assertNoOverlapInLists() {\n for (const key in PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST) {\n if (key in PropsAllowlists.UI_THREAD_PROPS_WHITELIST) {\n throw new Error(\n `[Reanimated] Property \\`${key}\\` was whitelisted both as UI and native prop. Please remove it from one of the lists.`\n );\n }\n }\n}\n\nexport function configureProps(): void {\n assertNoOverlapInLists();\n jsiConfigureProps(\n Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST),\n Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST)\n );\n}\n\nexport function addWhitelistedNativeProps(\n props: Record<string, boolean>\n): void {\n const oldSize = Object.keys(\n PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST\n ).length;\n PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST = {\n ...PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST,\n ...props,\n };\n if (\n oldSize !==\n Object.keys(PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST).length\n ) {\n configureProps();\n }\n}\n\nexport function addWhitelistedUIProps(props: Record<string, boolean>): void {\n const oldSize = Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length;\n PropsAllowlists.UI_THREAD_PROPS_WHITELIST = {\n ...PropsAllowlists.UI_THREAD_PROPS_WHITELIST,\n ...props,\n };\n if (\n oldSize !== Object.keys(PropsAllowlists.UI_THREAD_PROPS_WHITELIST).length\n ) {\n configureProps();\n }\n}\n\nconst PROCESSED_VIEW_NAMES = new Set();\n\nexport interface ViewConfig {\n uiViewClassName: string;\n validAttributes: Record<string, unknown>;\n}\n/**\n * updates UI props whitelist for given view host instance\n * this will work just once for every view name\n */\n\nexport function adaptViewConfig(viewConfig: ViewConfig): void {\n const viewName = viewConfig.uiViewClassName;\n const props = viewConfig.validAttributes;\n\n // update whitelist of UI props for this view name only once\n if (!PROCESSED_VIEW_NAMES.has(viewName)) {\n const propsToAdd: Record<string, boolean> = {};\n Object.keys(props).forEach((key) => {\n // we don't want to add native props as they affect layout\n // we also skip props which repeat here\n if (\n !(key in PropsAllowlists.NATIVE_THREAD_PROPS_WHITELIST) &&\n !(key in PropsAllowlists.UI_THREAD_PROPS_WHITELIST)\n ) {\n propsToAdd[key] = true;\n }\n });\n addWhitelistedUIProps(propsToAdd);\n\n PROCESSED_VIEW_NAMES.add(viewName);\n }\n}\n\nconfigureProps();\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,eAAe,QAAQ,mBAAmB;AACnD,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,sBAAsBA,CAAA,EAAG;EAChC,KAAK,MAAMC,GAAG,IAAIH,eAAe,CAACI,6BAA6B,EAAE;IAC/D,IAAID,GAAG,IAAIH,eAAe,CAACK,yBAAyB,EAAE;MACpD,MAAM,IAAIC,KAAK,CACZ,2BAA0BH,GAAI,wFACjC,CAAC;IACH;EACF;AACF;AAEA,OAAO,SAASI,cAAcA,CAAA,EAAS;EACrCL,sBAAsB,CAAC,CAAC;EACxBD,iBAAiB,CACfO,MAAM,CAACC,IAAI,CAACT,eAAe,CAACK,yBAAyB,CAAC,EACtDG,MAAM,CAACC,IAAI,CAACT,eAAe,CAACI,6BAA6B,CAC3D,CAAC;AACH;AAEA,OAAO,SAASM,yBAAyBA,CACvCC,KAA8B,EACxB;EACN,MAAMC,OAAO,GAAGJ,MAAM,CAACC,IAAI,CACzBT,eAAe,CAACI,6BAClB,CAAC,CAACS,MAAM;EACRb,eAAe,CAACI,6BAA6B,GAAG;IAC9C,GAAGJ,eAAe,CAACI,6BAA6B;IAChD,GAAGO;EACL,CAAC;E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@@
|
|
|
1
|
-
{"version":3,"names":["mockTargetValues","targetOriginX","targetOriginY","targetWidth","targetHeight","targetGlobalOriginX","targetGlobalOriginY","targetBorderRadius","windowWidth","windowHeight","currentOriginX","currentOriginY","currentWidth","currentHeight","currentGlobalOriginX","currentGlobalOriginY","currentBorderRadius","getCommonProperties","layoutStyle","componentStyle","componentStyleFlat","Array","isArray","flat","filter","Boolean","map","style","initial","value","componentStylesKeys","flatMap","Object","keys","commonKeys","key","includes","maybeReportOverwrittenProperties","layoutAnimationStyle","displayName","commonProperties","length","console","warn","join","maybeBuild","layoutAnimationOrBuilder","isAnimationBuilder","build","animationFactory","__DEV__","layoutAnimation","animations"],"sources":["animationBuilder.tsx"],"sourcesContent":["'use strict';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n LayoutAnimationsValues,\n} from './reanimated2/layoutReanimation';\nimport type { StyleProps } from './reanimated2/commonTypes';\nimport type { NestedArray } from './createAnimatedComponent/commonTypes';\n\nconst mockTargetValues: LayoutAnimationsValues = {\n targetOriginX: 0,\n targetOriginY: 0,\n targetWidth: 0,\n targetHeight: 0,\n targetGlobalOriginX: 0,\n targetGlobalOriginY: 0,\n targetBorderRadius: 0,\n windowWidth: 0,\n windowHeight: 0,\n currentOriginX: 0,\n currentOriginY: 0,\n currentWidth: 0,\n currentHeight: 0,\n currentGlobalOriginX: 0,\n currentGlobalOriginY: 0,\n currentBorderRadius: 0,\n};\n\nfunction getCommonProperties(\n layoutStyle: StyleProps,\n componentStyle: StyleProps | Array<StyleProps>\n) {\n let componentStyleFlat = Array.isArray(componentStyle)\n ? componentStyle.flat()\n : [componentStyle];\n\n componentStyleFlat = componentStyleFlat.filter(Boolean);\n\n componentStyleFlat = componentStyleFlat.map((style) =>\n 'initial' in style\n ? style.initial.value // Include properties of animated style\n : style\n );\n\n const componentStylesKeys = componentStyleFlat.flatMap((style) =>\n Object.keys(style)\n );\n\n const commonKeys = Object.keys(layoutStyle).filter((key) =>\n componentStylesKeys.includes(key)\n );\n\n return commonKeys;\n}\n\nfunction maybeReportOverwrittenProperties(\n layoutAnimationStyle: StyleProps,\n style: NestedArray<StyleProps>,\n displayName: string\n) {\n const commonProperties = getCommonProperties(layoutAnimationStyle, style);\n\n if (commonProperties.length > 0) {\n console.warn(\n `[Reanimated] ${\n commonProperties.length === 1 ? 'Property' : 'Properties'\n } \"${commonProperties.join(\n ', '\n )}\" of ${displayName} may be overwritten by a layout animation. Please wrap your component with an animated view and apply the layout animation on the wrapper.`\n );\n }\n}\n\nexport function maybeBuild(\n layoutAnimationOrBuilder:\n | ILayoutAnimationBuilder\n | LayoutAnimationFunction\n | Keyframe,\n style: NestedArray<StyleProps> | undefined,\n displayName: string\n): LayoutAnimationFunction | Keyframe {\n const isAnimationBuilder = (\n value: ILayoutAnimationBuilder | LayoutAnimationFunction | Keyframe\n ): value is ILayoutAnimationBuilder =>\n 'build' in layoutAnimationOrBuilder &&\n typeof layoutAnimationOrBuilder.build === 'function';\n\n if (isAnimationBuilder(layoutAnimationOrBuilder)) {\n const animationFactory = layoutAnimationOrBuilder.build();\n\n if (__DEV__ && style) {\n const layoutAnimation = animationFactory(mockTargetValues);\n maybeReportOverwrittenProperties(\n layoutAnimation.animations,\n style,\n displayName\n );\n }\n\n return animationFactory;\n } else {\n return layoutAnimationOrBuilder;\n }\n}\n"],"mappings":"AAAA,YAAY;;AASZ,MAAMA,gBAAwC,GAAG;EAC/CC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE,CAAC;EAChBC,WAAW,EAAE,CAAC;EACdC,YAAY,EAAE,CAAC;EACfC,mBAAmB,EAAE,CAAC;EACtBC,mBAAmB,EAAE,CAAC;EACtBC,kBAAkB,EAAE,CAAC;EACrBC,WAAW,EAAE,CAAC;EACdC,YAAY,EAAE,CAAC;EACfC,cAAc,EAAE,CAAC;EACjBC,cAAc,EAAE,CAAC;EACjBC,YAAY,EAAE,CAAC;EACfC,aAAa,EAAE,CAAC;EAChBC,oBAAoB,EAAE,CAAC;EACvBC,oBAAoB,EAAE,CAAC;EACvBC,mBAAmB,EAAE;AACvB,CAAC;AAED,SAASC,mBAAmBA,CAC1BC,WAAuB,EACvBC,cAA8C,EAC9C;EACA,IAAIC,kBAAkB,GAAGC,KAAK,CAACC,OAAO,CAACH,cAAc,CAAC,GAClDA,cAAc,CAACI,IAAI,
|
|
1
|
+
{"version":3,"names":["mockTargetValues","targetOriginX","targetOriginY","targetWidth","targetHeight","targetGlobalOriginX","targetGlobalOriginY","targetBorderRadius","windowWidth","windowHeight","currentOriginX","currentOriginY","currentWidth","currentHeight","currentGlobalOriginX","currentGlobalOriginY","currentBorderRadius","getCommonProperties","layoutStyle","componentStyle","componentStyleFlat","Array","isArray","flat","filter","Boolean","map","style","initial","value","componentStylesKeys","flatMap","Object","keys","commonKeys","key","includes","maybeReportOverwrittenProperties","layoutAnimationStyle","displayName","commonProperties","length","console","warn","join","maybeBuild","layoutAnimationOrBuilder","isAnimationBuilder","build","animationFactory","__DEV__","layoutAnimation","animations"],"sources":["animationBuilder.tsx"],"sourcesContent":["'use strict';\nimport type {\n ILayoutAnimationBuilder,\n LayoutAnimationFunction,\n LayoutAnimationsValues,\n} from './reanimated2/layoutReanimation';\nimport type { StyleProps } from './reanimated2/commonTypes';\nimport type { NestedArray } from './createAnimatedComponent/commonTypes';\n\nconst mockTargetValues: LayoutAnimationsValues = {\n targetOriginX: 0,\n targetOriginY: 0,\n targetWidth: 0,\n targetHeight: 0,\n targetGlobalOriginX: 0,\n targetGlobalOriginY: 0,\n targetBorderRadius: 0,\n windowWidth: 0,\n windowHeight: 0,\n currentOriginX: 0,\n currentOriginY: 0,\n currentWidth: 0,\n currentHeight: 0,\n currentGlobalOriginX: 0,\n currentGlobalOriginY: 0,\n currentBorderRadius: 0,\n};\n\nfunction getCommonProperties(\n layoutStyle: StyleProps,\n componentStyle: StyleProps | Array<StyleProps>\n) {\n let componentStyleFlat = Array.isArray(componentStyle)\n ? componentStyle.flat()\n : [componentStyle];\n\n componentStyleFlat = componentStyleFlat.filter(Boolean);\n\n componentStyleFlat = componentStyleFlat.map((style) =>\n 'initial' in style\n ? style.initial.value // Include properties of animated style\n : style\n );\n\n const componentStylesKeys = componentStyleFlat.flatMap((style) =>\n Object.keys(style)\n );\n\n const commonKeys = Object.keys(layoutStyle).filter((key) =>\n componentStylesKeys.includes(key)\n );\n\n return commonKeys;\n}\n\nfunction maybeReportOverwrittenProperties(\n layoutAnimationStyle: StyleProps,\n style: NestedArray<StyleProps>,\n displayName: string\n) {\n const commonProperties = getCommonProperties(layoutAnimationStyle, style);\n\n if (commonProperties.length > 0) {\n console.warn(\n `[Reanimated] ${\n commonProperties.length === 1 ? 'Property' : 'Properties'\n } \"${commonProperties.join(\n ', '\n )}\" of ${displayName} may be overwritten by a layout animation. Please wrap your component with an animated view and apply the layout animation on the wrapper.`\n );\n }\n}\n\nexport function maybeBuild(\n layoutAnimationOrBuilder:\n | ILayoutAnimationBuilder\n | LayoutAnimationFunction\n | Keyframe,\n style: NestedArray<StyleProps> | undefined,\n displayName: string\n): LayoutAnimationFunction | Keyframe {\n const isAnimationBuilder = (\n value: ILayoutAnimationBuilder | LayoutAnimationFunction | Keyframe\n ): value is ILayoutAnimationBuilder =>\n 'build' in layoutAnimationOrBuilder &&\n typeof layoutAnimationOrBuilder.build === 'function';\n\n if (isAnimationBuilder(layoutAnimationOrBuilder)) {\n const animationFactory = layoutAnimationOrBuilder.build();\n\n if (__DEV__ && style) {\n const layoutAnimation = animationFactory(mockTargetValues);\n maybeReportOverwrittenProperties(\n layoutAnimation.animations,\n style,\n displayName\n );\n }\n\n return animationFactory;\n } else {\n return layoutAnimationOrBuilder;\n }\n}\n"],"mappings":"AAAA,YAAY;;AASZ,MAAMA,gBAAwC,GAAG;EAC/CC,aAAa,EAAE,CAAC;EAChBC,aAAa,EAAE,CAAC;EAChBC,WAAW,EAAE,CAAC;EACdC,YAAY,EAAE,CAAC;EACfC,mBAAmB,EAAE,CAAC;EACtBC,mBAAmB,EA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G,YAC9C,KAAID,gBAAgB,CAACI,IAAI,CACxB,IACF,CAAE,QAAOL,WAAY,4IACvB,CAAC;EACH;AACF;AAEA,OAAO,SAASM,UAAUA,CACxBC,wBAGY,EACZnB,KAA0C,EAC1CY,WAAmB,EACiB;EACpC,MAAMQ,kBAAkB,GACtBlB,KAAmE,IAEnE,OAAO,IAAIiB,wBAAwB,IACnC,OAAOA,wBAAwB,CAACE,KAAK,KAAK,UAAU;EAEtD,IAAID,kBAAkB,CAACD,wBAAwB,CAAC,EAAE;IAChD,MAAMG,gBAAgB,GAAGH,wBAAwB,CAACE,KAAK,CAAC,CAAC;IAEzD,IAAIE,OAAO,IAAIvB,KAAK,EAAE;MACpB,MAAMwB,eAAe,GAAGF,gBAAgB,CAACjD,gBAAgB,CAAC;MAC1DqC,gCAAgC,CAC9Bc,eAAe,CAACC,UAAU,EAC1BzB,KAAK,EACLY,WACF,CAAC;IACH;IAEA,OAAOU,gBAAgB;EACzB,CAAC,MAAM;IACL,OAAOH,wBAAwB;EACjC;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { flattenArray } from './utils';
|
|
7
7
|
import { makeViewDescriptorsSet } from '../reanimated2/ViewDescriptorsSet';
|
|
8
8
|
import { adaptViewConfig } from '../ConfigHelper';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","flattenArray","makeViewDescriptorsSet","adaptViewConfig","updateProps","stopMapper","startMapper","isSharedValue","shouldBeUseWeb","SHOULD_BE_USE_WEB","isInlineStyleTransform","transform","Array","isArray","some","t","hasInlineStyles","inlinePropsHasChanged","styles1","styles2","keys","length","getInlinePropsUpdate","inlineProps","update","styleValue","entries","map","item","extractSharedValuesMapFromProps","props","styles","style","forEach","styleKey","getInlineStyle","shouldGetInitialStyle","newStyle","InlinePropManager","constructor","attachInlineProps","animatedComponent","viewInfo","newInlineProps","hasChanged","_inlineProps","_inlinePropsViewDescriptors","viewTag","viewName","shadowNodeWrapper","viewConfig","add","tag","name","shareableViewDescriptors","maybeViewRef","items","Set","updaterFunction","_inlinePropsMapperId","values","detachInlineProps"],"sources":["InlinePropManager.ts"],"sourcesContent":["'use strict';\nimport type { StyleProps } from '../reanimated2';\nimport type {\n IAnimatedComponentInternal,\n AnimatedComponentProps,\n IInlinePropManager,\n ViewInfo,\n} from './commonTypes';\nimport { flattenArray } from './utils';\nimport { makeViewDescriptorsSet } from '../reanimated2/ViewDescriptorsSet';\nimport type {\n ViewDescriptorsSet,\n ViewRefSet,\n} from '../reanimated2/ViewDescriptorsSet';\nimport { adaptViewConfig } from '../ConfigHelper';\nimport updateProps from '../reanimated2/UpdateProps';\nimport { stopMapper, startMapper } from '../reanimated2/mappers';\nimport { isSharedValue } from '../reanimated2/isSharedValue';\nimport { shouldBeUseWeb } from '../reanimated2/PlatformChecker';\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\nfunction isInlineStyleTransform(transform: unknown): boolean {\n if (!Array.isArray(transform)) {\n return false;\n }\n\n return transform.some((t: Record<string, unknown>) => hasInlineStyles(t));\n}\n\nfunction inlinePropsHasChanged(\n styles1: StyleProps,\n styles2: StyleProps\n): boolean {\n if (Object.keys(styles1).length !== Object.keys(styles2).length) {\n return true;\n }\n\n for (const key of Object.keys(styles1)) {\n if (styles1[key] !== styles2[key]) return true;\n }\n\n return false;\n}\n\nfunction getInlinePropsUpdate(inlineProps: Record<string, unknown>) {\n 'worklet';\n const update: Record<string, unknown> = {};\n for (const [key, styleValue] of Object.entries(inlineProps)) {\n if (isSharedValue(styleValue)) {\n update[key] = styleValue.value;\n } else if (Array.isArray(styleValue)) {\n update[key] = styleValue.map((item) => {\n return getInlinePropsUpdate(item);\n });\n } else if (typeof styleValue === 'object') {\n update[key] = getInlinePropsUpdate(styleValue as Record<string, unknown>);\n } else {\n update[key] = styleValue;\n }\n }\n return update;\n}\n\nfunction extractSharedValuesMapFromProps(\n props: AnimatedComponentProps<\n Record<string, unknown> /* Initial component props */\n >\n): Record<string, unknown> {\n const inlineProps: Record<string, unknown> = {};\n\n for (const key in props) {\n const value = props[key];\n if (key === 'style') {\n const styles = flattenArray<StyleProps>(props.style ?? []);\n styles.forEach((style) => {\n if (!style) {\n return;\n }\n for (const [styleKey, styleValue] of Object.entries(style)) {\n if (isSharedValue(styleValue)) {\n inlineProps[styleKey] = styleValue;\n } else if (\n styleKey === 'transform' &&\n isInlineStyleTransform(styleValue)\n ) {\n inlineProps[styleKey] = styleValue;\n }\n }\n });\n } else if (isSharedValue(value)) {\n inlineProps[key] = value;\n }\n }\n\n return inlineProps;\n}\n\nexport function hasInlineStyles(style: StyleProps): boolean {\n if (!style) {\n return false;\n }\n return Object.keys(style).some((key) => {\n const styleValue = style[key];\n return (\n isSharedValue(styleValue) ||\n (key === 'transform' && isInlineStyleTransform(styleValue))\n );\n });\n}\n\nexport function getInlineStyle(\n style: Record<string, unknown>,\n shouldGetInitialStyle: boolean\n) {\n if (shouldGetInitialStyle) {\n return getInlinePropsUpdate(style);\n }\n const newStyle: StyleProps = {};\n for (const [key, styleValue] of Object.entries(style)) {\n if (\n !isSharedValue(styleValue) &&\n !(key === 'transform' && isInlineStyleTransform(styleValue))\n ) {\n newStyle[key] = styleValue;\n }\n }\n return newStyle;\n}\n\nexport class InlinePropManager implements IInlinePropManager {\n _inlinePropsViewDescriptors: ViewDescriptorsSet | null = null;\n _inlinePropsMapperId: number | null = null;\n _inlineProps: StyleProps = {};\n\n public attachInlineProps(\n animatedComponent: React.Component<unknown, unknown> &\n IAnimatedComponentInternal,\n viewInfo: ViewInfo\n ) {\n const newInlineProps: Record<string, unknown> =\n extractSharedValuesMapFromProps(animatedComponent.props);\n const hasChanged = inlinePropsHasChanged(newInlineProps, this._inlineProps);\n\n if (hasChanged) {\n if (!this._inlinePropsViewDescriptors) {\n this._inlinePropsViewDescriptors = makeViewDescriptorsSet();\n\n const { viewTag, viewName, shadowNodeWrapper, viewConfig } = viewInfo;\n\n if (Object.keys(newInlineProps).length && viewConfig) {\n adaptViewConfig(viewConfig);\n }\n\n this._inlinePropsViewDescriptors.add({\n tag: viewTag as number,\n name: viewName!,\n shadowNodeWrapper: shadowNodeWrapper!,\n });\n }\n const shareableViewDescriptors =\n this._inlinePropsViewDescriptors.shareableViewDescriptors;\n\n const maybeViewRef = SHOULD_BE_USE_WEB\n ? ({ items: new Set([animatedComponent]) } as ViewRefSet<unknown>) // see makeViewsRefSet\n : undefined;\n const updaterFunction = () => {\n 'worklet';\n const update = getInlinePropsUpdate(newInlineProps);\n updateProps(shareableViewDescriptors, update, maybeViewRef);\n };\n this._inlineProps = newInlineProps;\n if (this._inlinePropsMapperId) {\n stopMapper(this._inlinePropsMapperId);\n }\n this._inlinePropsMapperId = null;\n if (Object.keys(newInlineProps).length) {\n this._inlinePropsMapperId = startMapper(\n updaterFunction,\n Object.values(newInlineProps)\n );\n }\n }\n }\n\n public detachInlineProps() {\n if (this._inlinePropsMapperId) {\n stopMapper(this._inlinePropsMapperId);\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,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A,MAAMK,wBAAwB,GAC5B,IAAI,CAACR,2BAA2B,CAACQ,wBAAwB;MAE3D,MAAMC,YAAY,GAAG9C,iBAAiB,GACjC;QAAE+C,KAAK,EAAE,IAAIC,GAAG,CAAC,CAAChB,iBAAiB,CAAC;MAAE,CAAC,CAAyB;MAAA,EACjE7C,SAAS;MACb,MAAM8D,eAAe,GAAGA,CAAA,KAAM;QAC5B,SAAS;;QACT,MAAMlC,MAAM,GAAGF,oBAAoB,CAACqB,cAAc,CAAC;QACnDvC,WAAW,CAACkD,wBAAwB,EAAE9B,MAAM,EAAE+B,YAAY,CAAC;MAC7D,CAAC;MACD,IAAI,CAACV,YAAY,GAAGF,cAAc;MAClC,IAAI,IAAI,CAACgB,oBAAoB,EAAE;QAC7BtD,UAAU,CAAC,IAAI,CAACsD,oBAAoB,CAAC;MACvC;MACA,IAAI,CAACA,oBAAoB,GAAG,IAAI;MAChC,IAAI5E,MAAM,CAACqC,IAAI,CAACuB,cAAc,CAAC,CAACtB,MAAM,EAAE;QACtC,IAAI,CAACsC,oBAAoB,GAAGrD,WAAW,CACrCoD,eAAe,EACf3E,MAAM,CAAC6E,MAAM,CAACjB,cAAc,CAAC,CAC9B;MACH;IACF;EACF;EAEOkB,iBAAiBA,CAAA,EAAG;IACzB,IAAI,IAAI,CAACF,oBAAoB,EAAE;MAC7BtD,UAAU,CAAC,IAAI,CAACsD,oBAAoB,CAAC;IACvC;EACF;AACF"}
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","flattenArray","makeViewDescriptorsSet","adaptViewConfig","updateProps","stopMapper","startMapper","isSharedValue","shouldBeUseWeb","SHOULD_BE_USE_WEB","isInlineStyleTransform","transform","Array","isArray","some","hasInlineStyles","inlinePropsHasChanged","styles1","styles2","keys","length","getInlinePropsUpdate","inlineProps","update","styleValue","entries","map","item","extractSharedValuesMapFromProps","props","styles","style","forEach","styleKey","getInlineStyle","shouldGetInitialStyle","newStyle","InlinePropManager","constructor","attachInlineProps","animatedComponent","viewInfo","newInlineProps","hasChanged","_inlineProps","_inlinePropsViewDescriptors","viewTag","viewName","shadowNodeWrapper","viewConfig","add","tag","name","shareableViewDescriptors","maybeViewRef","items","Set","undefined","updaterFunction","_inlinePropsMapperId","values","detachInlineProps"],"sources":["InlinePropManager.ts"],"sourcesContent":["'use strict';\nimport type { StyleProps } from '../reanimated2';\nimport type {\n IAnimatedComponentInternal,\n AnimatedComponentProps,\n IInlinePropManager,\n ViewInfo,\n} from './commonTypes';\nimport { flattenArray } from './utils';\nimport { makeViewDescriptorsSet } from '../reanimated2/ViewDescriptorsSet';\nimport type {\n ViewDescriptorsSet,\n ViewRefSet,\n} from '../reanimated2/ViewDescriptorsSet';\nimport { adaptViewConfig } from '../ConfigHelper';\nimport updateProps from '../reanimated2/UpdateProps';\nimport { stopMapper, startMapper } from '../reanimated2/mappers';\nimport { isSharedValue } from '../reanimated2/isSharedValue';\nimport { shouldBeUseWeb } from '../reanimated2/PlatformChecker';\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\nfunction isInlineStyleTransform(transform: unknown): boolean {\n if (!Array.isArray(transform)) {\n return false;\n }\n\n return transform.some((t: Record<string, unknown>) => hasInlineStyles(t));\n}\n\nfunction inlinePropsHasChanged(\n styles1: StyleProps,\n styles2: StyleProps\n): boolean {\n if (Object.keys(styles1).length !== Object.keys(styles2).length) {\n return true;\n }\n\n for (const key of Object.keys(styles1)) {\n if (styles1[key] !== styles2[key]) return true;\n }\n\n return false;\n}\n\nfunction getInlinePropsUpdate(inlineProps: Record<string, unknown>) {\n 'worklet';\n const update: Record<string, unknown> = {};\n for (const [key, styleValue] of Object.entries(inlineProps)) {\n if (isSharedValue(styleValue)) {\n update[key] = styleValue.value;\n } else if (Array.isArray(styleValue)) {\n update[key] = styleValue.map((item) => {\n return getInlinePropsUpdate(item);\n });\n } else if (typeof styleValue === 'object') {\n update[key] = getInlinePropsUpdate(styleValue as Record<string, unknown>);\n } else {\n update[key] = styleValue;\n }\n }\n return update;\n}\n\nfunction extractSharedValuesMapFromProps(\n props: AnimatedComponentProps<\n Record<string, unknown> /* Initial component props */\n >\n): Record<string, unknown> {\n const inlineProps: Record<string, unknown> = {};\n\n for (const key in props) {\n const value = props[key];\n if (key === 'style') {\n const styles = flattenArray<StyleProps>(props.style ?? []);\n styles.forEach((style) => {\n if (!style) {\n return;\n }\n for (const [styleKey, styleValue] of Object.entries(style)) {\n if (isSharedValue(styleValue)) {\n inlineProps[styleKey] = styleValue;\n } else if (\n styleKey === 'transform' &&\n isInlineStyleTransform(styleValue)\n ) {\n inlineProps[styleKey] = styleValue;\n }\n }\n });\n } else if (isSharedValue(value)) {\n inlineProps[key] = value;\n }\n }\n\n return inlineProps;\n}\n\nexport function hasInlineStyles(style: StyleProps): boolean {\n if (!style) {\n return false;\n }\n return Object.keys(style).some((key) => {\n const styleValue = style[key];\n return (\n isSharedValue(styleValue) ||\n (key === 'transform' && isInlineStyleTransform(styleValue))\n );\n });\n}\n\nexport function getInlineStyle(\n style: Record<string, unknown>,\n shouldGetInitialStyle: boolean\n) {\n if (shouldGetInitialStyle) {\n return getInlinePropsUpdate(style);\n }\n const newStyle: StyleProps = {};\n for (const [key, styleValue] of Object.entries(style)) {\n if (\n !isSharedValue(styleValue) &&\n !(key === 'transform' && isInlineStyleTransform(styleValue))\n ) {\n newStyle[key] = styleValue;\n }\n }\n return newStyle;\n}\n\nexport class InlinePropManager implements IInlinePropManager {\n _inlinePropsViewDescriptors: ViewDescriptorsSet | null = null;\n _inlinePropsMapperId: number | null = null;\n _inlineProps: StyleProps = {};\n\n public attachInlineProps(\n animatedComponent: React.Component<unknown, unknown> &\n IAnimatedComponentInternal,\n viewInfo: ViewInfo\n ) {\n const newInlineProps: Record<string, unknown> =\n extractSharedValuesMapFromProps(animatedComponent.props);\n const hasChanged = inlinePropsHasChanged(newInlineProps, this._inlineProps);\n\n if (hasChanged) {\n if (!this._inlinePropsViewDescriptors) {\n this._inlinePropsViewDescriptors = makeViewDescriptorsSet();\n\n const { viewTag, viewName, shadowNodeWrapper, viewConfig } = viewInfo;\n\n if (Object.keys(newInlineProps).length && viewConfig) {\n adaptViewConfig(viewConfig);\n }\n\n this._inlinePropsViewDescriptors.add({\n tag: viewTag as number,\n name: viewName!,\n shadowNodeWrapper: shadowNodeWrapper!,\n });\n }\n const shareableViewDescriptors =\n this._inlinePropsViewDescriptors.shareableViewDescriptors;\n\n const maybeViewRef = SHOULD_BE_USE_WEB\n ? ({ items: new Set([animatedComponent]) } as ViewRefSet<unknown>) // see makeViewsRefSet\n : undefined;\n const updaterFunction = () => {\n 'worklet';\n const update = getInlinePropsUpdate(newInlineProps);\n updateProps(shareableViewDescriptors, update, maybeViewRef);\n };\n this._inlineProps = newInlineProps;\n if (this._inlinePropsMapperId) {\n stopMapper(this._inlinePropsMapperId);\n }\n this._inlinePropsMapperId = null;\n if (Object.keys(newInlineProps).length) {\n this._inlinePropsMapperId = startMapper(\n updaterFunction,\n Object.values(newInlineProps)\n );\n }\n }\n }\n\n public detachInlineProps() {\n if (this._inlinePropsMapperId) {\n stopMapper(this._inlinePropsMapperId);\n }\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EA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AAc;MAClC,IAAI,IAAI,CAACiB,oBAAoB,EAAE;QAC7BtD,UAAU,CAAC,IAAI,CAACsD,oBAAoB,CAAC;MACvC;MACA,IAAI,CAACA,oBAAoB,GAAG,IAAI;MAChC,IAAI1E,MAAM,CAACkC,IAAI,CAACuB,cAAc,CAAC,CAACtB,MAAM,EAAE;QACtC,IAAI,CAACuC,oBAAoB,GAAGrD,WAAW,CACrCoD,eAAe,EACfzE,MAAM,CAAC2E,MAAM,CAAClB,cAAc,CAC9B,CAAC;MACH;IACF;EACF;EAEOmB,iBAAiBA,CAAA,EAAG;IACzB,IAAI,IAAI,CAACF,oBAAoB,EAAE;MAC7BtD,UAAU,CAAC,IAAI,CAACsD,oBAAoB,CAAC;IACvC;EACF;AACF","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { NativeEventEmitter, Platform, findNodeHandle } from 'react-native';
|
|
7
7
|
import { shouldBeUseWeb } from '../reanimated2/PlatformChecker';
|
|
8
8
|
import { runOnJS, runOnUIImmediately } from '../reanimated2/threads';
|
|
@@ -21,7 +21,7 @@ class JSPropsUpdaterPaper {
|
|
|
21
21
|
if (JSPropsUpdaterPaper._tagToComponentMapping.size === 1) {
|
|
22
22
|
const listener = data => {
|
|
23
23
|
const component = JSPropsUpdaterPaper._tagToComponentMapping.get(data.viewTag);
|
|
24
|
-
component === null || component === void 0
|
|
24
|
+
component === null || component === void 0 || component._updateFromNative(data.props);
|
|
25
25
|
};
|
|
26
26
|
this._reanimatedEventEmitter.addListener('onReanimatedPropsChange', listener);
|
|
27
27
|
}
|
|
@@ -40,7 +40,7 @@ class JSPropsUpdaterFabric {
|
|
|
40
40
|
if (!JSPropsUpdaterFabric.isInitialized) {
|
|
41
41
|
const updater = (viewTag, props) => {
|
|
42
42
|
const component = JSPropsUpdaterFabric._tagToComponentMapping.get(viewTag);
|
|
43
|
-
component === null || component === void 0
|
|
43
|
+
component === null || component === void 0 || component._updateFromNative(props);
|
|
44
44
|
};
|
|
45
45
|
runOnUIImmediately(() => {
|
|
46
46
|
'worklet';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","NativeEventEmitter","Platform","findNodeHandle","shouldBeUseWeb","runOnJS","runOnUIImmediately","NativeReanimatedModule","SHOULD_BE_USE_WEB","JSPropsUpdaterPaper","constructor","_reanimatedEventEmitter","OS","undefined","addOnJSPropsChangeListener","animatedComponent","viewTag","_tagToComponentMapping","set","size","listener","data","component","get","_updateFromNative","props","addListener","removeOnJSPropsChangeListener","delete","removeAllListeners","Map","JSPropsUpdaterFabric","isInitialized","updater","global","updateJSProps","JSPropsUpdaterWeb","_animatedComponent","JSPropsUpdater","_IS_FABRIC"],"sources":["JSPropsUpdater.ts"],"sourcesContent":["'use strict';\nimport { NativeEventEmitter, Platform, findNodeHandle } from 'react-native';\nimport type { NativeModule } from 'react-native';\nimport { shouldBeUseWeb } from '../reanimated2/PlatformChecker';\nimport type { StyleProps } from '../reanimated2';\nimport { runOnJS, runOnUIImmediately } from '../reanimated2/threads';\nimport type {\n AnimatedComponentProps,\n IAnimatedComponentInternal,\n IJSPropsUpdater,\n InitialComponentProps,\n} from './commonTypes';\nimport NativeReanimatedModule from '../specs/NativeReanimatedModule';\n\ninterface ListenerData {\n viewTag: number;\n props: StyleProps;\n}\n\nconst SHOULD_BE_USE_WEB = shouldBeUseWeb();\n\nclass JSPropsUpdaterPaper implements IJSPropsUpdater {\n private static _tagToComponentMapping = new Map();\n private _reanimatedEventEmitter: NativeEventEmitter;\n\n constructor() {\n this._reanimatedEventEmitter = new NativeEventEmitter(\n // NativeEventEmitter only uses this parameter on iOS.\n Platform.OS === 'ios'\n ? (NativeReanimatedModule as unknown as NativeModule)\n : undefined\n );\n }\n\n public addOnJSPropsChangeListener(\n animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n const viewTag = findNodeHandle(animatedComponent);\n JSPropsUpdaterPaper._tagToComponentMapping.set(viewTag, animatedComponent);\n if (JSPropsUpdaterPaper._tagToComponentMapping.size === 1) {\n const listener = (data: ListenerData) => {\n const component = JSPropsUpdaterPaper._tagToComponentMapping.get(\n data.viewTag\n );\n component?._updateFromNative(data.props);\n };\n this._reanimatedEventEmitter.addListener(\n 'onReanimatedPropsChange',\n listener\n );\n }\n }\n\n public removeOnJSPropsChangeListener(\n animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n const viewTag = findNodeHandle(animatedComponent);\n JSPropsUpdaterPaper._tagToComponentMapping.delete(viewTag);\n if (JSPropsUpdaterPaper._tagToComponentMapping.size === 0) {\n this._reanimatedEventEmitter.removeAllListeners(\n 'onReanimatedPropsChange'\n );\n }\n }\n}\n\nclass JSPropsUpdaterFabric implements IJSPropsUpdater {\n private static _tagToComponentMapping = new Map();\n private static isInitialized = false;\n\n constructor() {\n if (!JSPropsUpdaterFabric.isInitialized) {\n const updater = (viewTag: number, props: unknown) => {\n const component =\n JSPropsUpdaterFabric._tagToComponentMapping.get(viewTag);\n component?._updateFromNative(props);\n };\n runOnUIImmediately(() => {\n 'worklet';\n global.updateJSProps = (viewTag: number, props: unknown) => {\n runOnJS(updater)(viewTag, props);\n };\n })();\n JSPropsUpdaterFabric.isInitialized = true;\n }\n }\n\n public addOnJSPropsChangeListener(\n animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n if (!JSPropsUpdaterFabric.isInitialized) {\n return;\n }\n const viewTag = findNodeHandle(animatedComponent);\n JSPropsUpdaterFabric._tagToComponentMapping.set(viewTag, animatedComponent);\n }\n\n public removeOnJSPropsChangeListener(\n animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n if (!JSPropsUpdaterFabric.isInitialized) {\n return;\n }\n const viewTag = findNodeHandle(animatedComponent);\n JSPropsUpdaterFabric._tagToComponentMapping.delete(viewTag);\n }\n}\n\nclass JSPropsUpdaterWeb implements IJSPropsUpdater {\n public addOnJSPropsChangeListener(\n _animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n // noop\n }\n\n public removeOnJSPropsChangeListener(\n _animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n // noop\n }\n}\n\ntype JSPropsUpdaterOptions =\n | typeof JSPropsUpdaterWeb\n | typeof JSPropsUpdaterFabric\n | typeof JSPropsUpdaterPaper;\n\nlet JSPropsUpdater: JSPropsUpdaterOptions;\nif (SHOULD_BE_USE_WEB) {\n JSPropsUpdater = JSPropsUpdaterWeb;\n} else if (global._IS_FABRIC) {\n JSPropsUpdater = JSPropsUpdaterFabric;\n} else {\n JSPropsUpdater = JSPropsUpdaterPaper;\n}\n\nexport default JSPropsUpdater;\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,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DpB,OAAO,CAAC4B,OAAO,CAAC,CAACjB,OAAO,EAAES,KAAK,CAAC;QAClC,CAAC;MACH,CAAC,CAAC,CAAC,CAAC;MACJM,oBAAoB,CAACC,aAAa,GAAG,IAAI;IAC3C;EACF;EAEOlB,0BAA0BA,CAC/BC,iBAG4B,EAC5B;IACA,IAAI,CAACgB,oBAAoB,CAACC,aAAa,EAAE;MACvC;IACF;IACA,MAAMhB,OAAO,GAAGb,cAAc,CAACY,iBAAiB,CAAC;IACjDgB,oBAAoB,CAACd,sBAAsB,CAACC,GAAG,CAACF,OAAO,EAAED,iBAAiB,CAAC;EAC7E;EAEOY,6BAA6BA,CAClCZ,iBAG4B,EAC5B;IACA,IAAI,CAACgB,oBAAoB,CAACC,aAAa,EAAE;MACvC;IACF;IACA,MAAMhB,OAAO,GAAGb,cAAc,CAACY,iBAAiB,CAAC;IACjDgB,oBAAoB,CAACd,sBAAsB,CAACW,MAAM,CAACZ,OAAO,CAAC;EAC7D;AACF;AAACpC,eAAA,CA9CKmD,oBAAoB,4BACgB,IAAID,GAAG,CAAC,CAAC;AAAAlD,eAAA,CAD7CmD,oBAAoB,mBAEO,KAAK;AA8CtC,MAAMK,iBAAiB,CAA4B;EAC1CtB,0BAA0BA,CAC/BuB,kBAG4B,EAC5B;IACA;EAAA;EAGKV,6BAA6BA,CAClCU,kBAG4B,EAC5B;IACA;EAAA;AAEJ;AAOA,IAAIC,cAAqC;AACzC,IAAI9B,iBAAiB,EAAE;EACrB8B,cAAc,GAAGF,iBAAiB;AACpC,CAAC,MAAM,IAAIF,MAAM,CAACK,UAAU,EAAE;EAC5BD,cAAc,GAAGP,oBAAoB;AACvC,CAAC,MAAM;EACLO,cAAc,GAAG7B,mBAAmB;AACtC;AAEA,eAAe6B,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["JSPropsUpdaterWeb","addOnJSPropsChangeListener","_animatedComponent","removeOnJSPropsChangeListener"],"sources":["JSPropsUpdater.web.ts"],"sourcesContent":["'use strict';\nimport type {\n AnimatedComponentProps,\n IAnimatedComponentInternal,\n InitialComponentProps,\n} from './commonTypes';\n\nexport default class JSPropsUpdaterWeb {\n public addOnJSPropsChangeListener(\n _animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n // noop\n }\n\n public removeOnJSPropsChangeListener(\n _animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n // noop\n }\n}\n"],"mappings":"AAAA,YAAY;;AAOZ,eAAe,MAAMA,iBAAiB,CAAC;EAC9BC,0BAA0BA,CAC/BC,kBAG4B,EAC5B;IACA;EAAA;EAGKC,6BAA6BA,CAClCD,kBAG4B,EAC5B;IACA;EAAA;AAEJ"}
|
|
1
|
+
{"version":3,"names":["JSPropsUpdaterWeb","addOnJSPropsChangeListener","_animatedComponent","removeOnJSPropsChangeListener"],"sources":["JSPropsUpdater.web.ts"],"sourcesContent":["'use strict';\nimport type {\n AnimatedComponentProps,\n IAnimatedComponentInternal,\n InitialComponentProps,\n} from './commonTypes';\n\nexport default class JSPropsUpdaterWeb {\n public addOnJSPropsChangeListener(\n _animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n // noop\n }\n\n public removeOnJSPropsChangeListener(\n _animatedComponent: React.Component<\n AnimatedComponentProps<InitialComponentProps>\n > &\n IAnimatedComponentInternal\n ) {\n // noop\n }\n}\n"],"mappings":"AAAA,YAAY;;AAOZ,eAAe,MAAMA,iBAAiB,CAAC;EAC9BC,0BAA0BA,CAC/BC,kBAG4B,EAC5B;IACA;EAAA;EAGKC,6BAA6BA,CAClCD,kBAG4B,EAC5B;IACA;EAAA;AAEJ","ignoreList":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
import { shallowEqual } from '../reanimated2/hook/utils';
|
|
7
7
|
import { isSharedValue } from '../reanimated2/isSharedValue';
|
|
8
8
|
import { isChromeDebugger } from '../reanimated2/PlatformChecker';
|
|
9
|
-
import WorkletEventHandler from '../reanimated2/WorkletEventHandler';
|
|
9
|
+
import { WorkletEventHandler } from '../reanimated2/WorkletEventHandler';
|
|
10
10
|
import { initialUpdaterRun } from '../reanimated2/animation';
|
|
11
11
|
import { hasInlineStyles, getInlineStyle } from './InlinePropManager';
|
|
12
12
|
import { flattenArray, has } from './utils';
|
|
@@ -38,7 +38,7 @@ export class PropsFilter {
|
|
|
38
38
|
var _style$viewsRef;
|
|
39
39
|
// this is how we recognize styles returned by useAnimatedStyle
|
|
40
40
|
// TODO - refactor, since `viewsRef` is only present on Web
|
|
41
|
-
(_style$viewsRef = style.viewsRef) === null || _style$viewsRef === void 0
|
|
41
|
+
(_style$viewsRef = style.viewsRef) === null || _style$viewsRef === void 0 || _style$viewsRef.add(component);
|
|
42
42
|
if (this._requiresNewInitials) {
|
|
43
43
|
this._initialStyle = {
|
|
44
44
|
...style.initial.value,
|
|
@@ -61,7 +61,7 @@ export class PropsFilter {
|
|
|
61
61
|
var _animatedProp$initial, _animatedProp$viewsRe;
|
|
62
62
|
props[initialValueKey] = (_animatedProp$initial = animatedProp.initial) === null || _animatedProp$initial === void 0 ? void 0 : _animatedProp$initial.value[initialValueKey];
|
|
63
63
|
// TODO - refacotr, since `viewsRef` is only present on Web
|
|
64
|
-
(_animatedProp$viewsRe = animatedProp.viewsRef) === null || _animatedProp$viewsRe === void 0
|
|
64
|
+
(_animatedProp$viewsRe = animatedProp.viewsRef) === null || _animatedProp$viewsRe === void 0 || _animatedProp$viewsRe.add(component);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
} else if (has('workletEventHandler', value) && value.workletEventHandler instanceof WorkletEventHandler) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","shallowEqual","isSharedValue","isChromeDebugger","WorkletEventHandler","initialUpdaterRun","hasInlineStyles","getInlineStyle","flattenArray","has","StyleSheet","dummyListener","PropsFilter","constructor","filterNonAnimatedProps","component","inputProps","props","_maybePrepareForNewInitials","styleProp","style","styles","_requiresNewInitials","_initialStyle","processedStyle","map","viewDescriptors","_style$viewsRef","viewsRef","add","initial","updater","flatten","animatedProp","animatedProps","undefined","keys","forEach","initialValueKey","_animatedProp$initial","_animatedProp$viewsRe","workletEventHandler","eventNames","length","eventName","listeners","_previousProps"],"sources":["PropsFilter.tsx"],"sourcesContent":["'use strict';\n\nimport { shallowEqual } from '../reanimated2/hook/utils';\nimport type { StyleProps } from '../reanimated2/commonTypes';\nimport { isSharedValue } from '../reanimated2/isSharedValue';\nimport { isChromeDebugger } from '../reanimated2/PlatformChecker';\nimport { WorkletEventHandler } from '../reanimated2/WorkletEventHandler';\nimport { initialUpdaterRun } from '../reanimated2/animation';\nimport { hasInlineStyles, getInlineStyle } from './InlinePropManager';\nimport type {\n AnimatedComponentProps,\n AnimatedProps,\n InitialComponentProps,\n IAnimatedComponentInternal,\n IPropsFilter,\n} from './commonTypes';\nimport { flattenArray, has } from './utils';\nimport { StyleSheet } from 'react-native';\n\nfunction dummyListener() {\n // empty listener we use to assign to listener properties for which animated\n // event is used.\n}\n\nexport class PropsFilter implements IPropsFilter {\n private _initialStyle = {};\n private _previousProps: React.Component['props'] | null = null;\n private _requiresNewInitials = true;\n\n public filterNonAnimatedProps(\n component: React.Component<unknown, unknown> & IAnimatedComponentInternal\n ): Record<string, unknown> {\n const inputProps =\n component.props as AnimatedComponentProps<InitialComponentProps>;\n\n this._maybePrepareForNewInitials(inputProps);\n\n const props: Record<string, unknown> = {};\n for (const key in inputProps) {\n const value = inputProps[key];\n if (key === 'style') {\n const styleProp = inputProps.style;\n const styles = flattenArray<StyleProps>(styleProp ?? []);\n if (this._requiresNewInitials) {\n this._initialStyle = {};\n }\n const processedStyle: StyleProps = styles.map((style) => {\n if (style && style.viewDescriptors) {\n // this is how we recognize styles returned by useAnimatedStyle\n // TODO - refactor, since `viewsRef` is only present on Web\n style.viewsRef?.add(component);\n if (this._requiresNewInitials) {\n this._initialStyle = {\n ...style.initial.value,\n ...this._initialStyle,\n ...initialUpdaterRun<StyleProps>(style.initial.updater),\n };\n }\n return this._initialStyle;\n } else if (hasInlineStyles(style)) {\n return getInlineStyle(style, this._requiresNewInitials);\n } else {\n return style;\n }\n });\n props[key] = StyleSheet.flatten(processedStyle);\n } else if (key === 'animatedProps') {\n const animatedProp = inputProps.animatedProps as Partial<\n AnimatedComponentProps<AnimatedProps>\n >;\n if (animatedProp.initial !== undefined) {\n Object.keys(animatedProp.initial.value).forEach((initialValueKey) => {\n props[initialValueKey] =\n animatedProp.initial?.value[initialValueKey];\n // TODO - refacotr, since `viewsRef` is only present on Web\n animatedProp.viewsRef?.add(component);\n });\n }\n } else if (\n has('workletEventHandler', value) &&\n value.workletEventHandler instanceof WorkletEventHandler\n ) {\n if (value.workletEventHandler.eventNames.length > 0) {\n value.workletEventHandler.eventNames.forEach((eventName) => {\n props[eventName] = has('listeners', value.workletEventHandler)\n ? (\n value.workletEventHandler.listeners as Record<string, unknown>\n )[eventName]\n : dummyListener;\n });\n } else {\n props[key] = dummyListener;\n }\n } else if (isSharedValue(value)) {\n if (this._requiresNewInitials) {\n props[key] = value.value;\n }\n } else if (key !== 'onGestureHandlerStateChange' || !isChromeDebugger()) {\n props[key] = value;\n }\n }\n this._requiresNewInitials = false;\n return props;\n }\n\n private _maybePrepareForNewInitials(\n inputProps: AnimatedComponentProps<InitialComponentProps>\n ) {\n if (this._previousProps && inputProps.style) {\n this._requiresNewInitials = !shallowEqual(\n this._previousProps,\n inputProps\n );\n }\n this._previousProps = inputProps;\n }\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAG,CAAA,2BAAAH,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAI,CAAA,GAAAJ,CAAA,CAAAK,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAH,CAAA,GAAAG,CAAA,CAAAG,IAAA,CAAAP,CAAA,EAAAG,CAAA,uCAAAF,CAAA,SAAAA,CAAA,YAAAO,SAAA,yEAAAL,CAAA,GAAAM,MAAA,GAAAC,MAAA,EAAAV,CAAA;AAEb,SAASW,YAAY,QAAQ,2BAA2B;AAExD,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,gBAAgB,QAAQ,g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,CAACL,OAAO,CAAEO,SAAS,IAAK;YAC1D3B,KAAK,CAAC2B,SAAS,CAAC,GAAGnC,GAAG,CAAC,WAAW,EAAE1B,KAAK,CAAC0D,mBAAmB,CAAC,GAExD1D,KAAK,CAAC0D,mBAAmB,CAACI,SAAS,CACnCD,SAAS,CAAC,GACZjC,aAAa;UACnB,CAAC,CAAC;QACJ,CAAC,MAAM;UACLM,KAAK,CAACnC,GAAG,CAAC,GAAG6B,aAAa;QAC5B;MACF,CAAC,MAAM,IAAIT,aAAa,CAACnB,KAAK,CAAC,EAAE;QAC/B,IAAI,IAAI,CAACuC,oBAAoB,EAAE;UAC7BL,KAAK,CAACnC,GAAG,CAAC,GAAGC,KAAK,CAACA,KAAK;QAC1B;MACF,CAAC,MAAM,IAAID,GAAG,KAAK,6BAA6B,IAAI,CAACqB,gBAAgB,CAAC,CAAC,EAAE;QACvEc,KAAK,CAACnC,GAAG,CAAC,GAAGC,KAAK;MACpB;IACF;IACA,IAAI,CAACuC,oBAAoB,GAAG,KAAK;IACjC,OAAOL,KAAK;EACd;EAEQC,2BAA2BA,CACjCF,UAAyD,EACzD;IACA,IAAI,IAAI,CAAC8B,cAAc,IAAI9B,UAAU,CAACI,KAAK,EAAE;MAC3C,IAAI,CAACE,oBAAoB,GAAG,CAACrB,YAAY,CACvC,IAAI,CAAC6C,cAAc,EACnB9B,UACF,CAAC;IACH;IACA,IAAI,CAAC8B,cAAc,GAAG9B,UAAU;EAClC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["commonTypes.ts"],"sourcesContent":["'use strict';\nimport type { Ref, Component } from 'react';\nimport type {\n StyleProps,\n BaseAnimationBuilder,\n ILayoutAnimationBuilder,\n EntryExitAnimationFunction,\n SharedTransition,\n SharedValue,\n} from '../reanimated2';\nimport type {\n ViewDescriptorsSet,\n ViewRefSet,\n} from '../reanimated2/ViewDescriptorsSet';\nimport type { SkipEnteringContext } from '../reanimated2/component/LayoutAnimationConfig';\nimport type { ShadowNodeWrapper } from '../reanimated2/commonTypes';\nimport type { ViewConfig } from '../ConfigHelper';\n\nexport interface AnimatedProps extends Record<string, unknown> {\n viewDescriptors?: ViewDescriptorsSet;\n viewsRef?: ViewRefSet<unknown>;\n initial?: SharedValue<StyleProps>;\n}\n\nexport interface ViewInfo {\n viewTag: number | HTMLElement | null;\n viewName: string | null;\n shadowNodeWrapper: ShadowNodeWrapper | null;\n viewConfig: ViewConfig;\n}\n\nexport interface IInlinePropManager {\n attachInlineProps(\n animatedComponent: React.Component<unknown, unknown>,\n viewInfo: ViewInfo\n ): void;\n detachInlineProps(): void;\n}\n\nexport interface IPropsFilter {\n filterNonAnimatedProps: (\n component: React.Component<unknown, unknown> & IAnimatedComponentInternal\n ) => Record<string, unknown>;\n}\n\nexport interface IJSPropsUpdater {\n addOnJSPropsChangeListener(\n animatedComponent: React.Component<unknown, unknown> &\n IAnimatedComponentInternal\n ): void;\n removeOnJSPropsChangeListener(\n animatedComponent: React.Component<unknown, unknown> &\n IAnimatedComponentInternal\n ): void;\n}\n\nexport type LayoutAnimationStaticContext = {\n presetName: string;\n};\n\nexport type AnimatedComponentProps<P extends Record<string, unknown>> = P & {\n forwardedRef?: Ref<Component>;\n style?: NestedArray<StyleProps>;\n animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>;\n animatedStyle?: StyleProps;\n layout?: (\n | BaseAnimationBuilder\n | ILayoutAnimationBuilder\n | typeof BaseAnimationBuilder\n ) &\n LayoutAnimationStaticContext;\n entering?: (\n | BaseAnimationBuilder\n | typeof BaseAnimationBuilder\n | EntryExitAnimationFunction\n | Keyframe\n ) &\n LayoutAnimationStaticContext;\n exiting?: (\n | BaseAnimationBuilder\n | typeof BaseAnimationBuilder\n | EntryExitAnimationFunction\n | Keyframe\n ) &\n LayoutAnimationStaticContext;\n sharedTransitionTag?: string;\n sharedTransitionStyle?: SharedTransition;\n};\n\nexport interface AnimatedComponentRef extends Component {\n setNativeProps?: (props: Record<string, unknown>) => void;\n getScrollableNode?: () => AnimatedComponentRef;\n getAnimatableRef?: () => AnimatedComponentRef;\n}\n\nexport interface IAnimatedComponentInternal {\n _styles: StyleProps[] | null;\n _animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>;\n _viewTag: number;\n _isFirstRender: boolean;\n jestAnimatedStyle: { value: StyleProps };\n _component: AnimatedComponentRef | HTMLElement | null;\n _sharedElementTransition: SharedTransition | null;\n _jsPropsUpdater: IJSPropsUpdater;\n _InlinePropManager: IInlinePropManager;\n _PropsFilter: IPropsFilter;\n _viewInfo?: ViewInfo;\n context: React.ContextType<typeof SkipEnteringContext>;\n}\n\nexport type NestedArray<T> = T | NestedArray<T>[];\n\nexport interface InitialComponentProps extends Record<string, unknown> {\n ref?: Ref<Component>;\n collapsable?: boolean;\n}\n"],"mappings":"AAAA,YAAY;;AAAC"}
|
|
1
|
+
{"version":3,"names":[],"sources":["commonTypes.ts"],"sourcesContent":["'use strict';\nimport type { Ref, Component } from 'react';\nimport type {\n StyleProps,\n BaseAnimationBuilder,\n ILayoutAnimationBuilder,\n EntryExitAnimationFunction,\n SharedTransition,\n SharedValue,\n} from '../reanimated2';\nimport type {\n ViewDescriptorsSet,\n ViewRefSet,\n} from '../reanimated2/ViewDescriptorsSet';\nimport type { SkipEnteringContext } from '../reanimated2/component/LayoutAnimationConfig';\nimport type { ShadowNodeWrapper } from '../reanimated2/commonTypes';\nimport type { ViewConfig } from '../ConfigHelper';\n\nexport interface AnimatedProps extends Record<string, unknown> {\n viewDescriptors?: ViewDescriptorsSet;\n viewsRef?: ViewRefSet<unknown>;\n initial?: SharedValue<StyleProps>;\n}\n\nexport interface ViewInfo {\n viewTag: number | HTMLElement | null;\n viewName: string | null;\n shadowNodeWrapper: ShadowNodeWrapper | null;\n viewConfig: ViewConfig;\n}\n\nexport interface IInlinePropManager {\n attachInlineProps(\n animatedComponent: React.Component<unknown, unknown>,\n viewInfo: ViewInfo\n ): void;\n detachInlineProps(): void;\n}\n\nexport interface IPropsFilter {\n filterNonAnimatedProps: (\n component: React.Component<unknown, unknown> & IAnimatedComponentInternal\n ) => Record<string, unknown>;\n}\n\nexport interface IJSPropsUpdater {\n addOnJSPropsChangeListener(\n animatedComponent: React.Component<unknown, unknown> &\n IAnimatedComponentInternal\n ): void;\n removeOnJSPropsChangeListener(\n animatedComponent: React.Component<unknown, unknown> &\n IAnimatedComponentInternal\n ): void;\n}\n\nexport type LayoutAnimationStaticContext = {\n presetName: string;\n};\n\nexport type AnimatedComponentProps<P extends Record<string, unknown>> = P & {\n forwardedRef?: Ref<Component>;\n style?: NestedArray<StyleProps>;\n animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>;\n animatedStyle?: StyleProps;\n layout?: (\n | BaseAnimationBuilder\n | ILayoutAnimationBuilder\n | typeof BaseAnimationBuilder\n ) &\n LayoutAnimationStaticContext;\n entering?: (\n | BaseAnimationBuilder\n | typeof BaseAnimationBuilder\n | EntryExitAnimationFunction\n | Keyframe\n ) &\n LayoutAnimationStaticContext;\n exiting?: (\n | BaseAnimationBuilder\n | typeof BaseAnimationBuilder\n | EntryExitAnimationFunction\n | Keyframe\n ) &\n LayoutAnimationStaticContext;\n sharedTransitionTag?: string;\n sharedTransitionStyle?: SharedTransition;\n};\n\nexport interface AnimatedComponentRef extends Component {\n setNativeProps?: (props: Record<string, unknown>) => void;\n getScrollableNode?: () => AnimatedComponentRef;\n getAnimatableRef?: () => AnimatedComponentRef;\n}\n\nexport interface IAnimatedComponentInternal {\n _styles: StyleProps[] | null;\n _animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>;\n _viewTag: number;\n _isFirstRender: boolean;\n jestAnimatedStyle: { value: StyleProps };\n _component: AnimatedComponentRef | HTMLElement | null;\n _sharedElementTransition: SharedTransition | null;\n _jsPropsUpdater: IJSPropsUpdater;\n _InlinePropManager: IInlinePropManager;\n _PropsFilter: IPropsFilter;\n _viewInfo?: ViewInfo;\n context: React.ContextType<typeof SkipEnteringContext>;\n}\n\nexport type NestedArray<T> = T | NestedArray<T>[];\n\nexport interface InitialComponentProps extends Record<string, unknown> {\n ref?: Ref<Component>;\n collapsable?: boolean;\n}\n"],"mappings":"AAAA,YAAY;;AAAC","ignoreList":[]}
|