react-native-reanimated 4.0.0-beta.3 → 4.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Common/NativeView/CMakeLists.txt +52 -0
- package/Common/NativeView/react/renderer/components/rnreanimated/ComponentDescriptors.h +17 -0
- package/Common/NativeView/react/renderer/components/rnreanimated/ReanimatedShadowNode.cpp +11 -0
- package/Common/NativeView/react/renderer/components/rnreanimated/ReanimatedShadowNode.h +26 -0
- package/Common/NativeView/react/renderer/components/rnreanimated/ReanimatedViewState.h +23 -0
- package/Common/cpp/reanimated/CSS/core/CSSAnimation.cpp +4 -5
- package/Common/cpp/reanimated/CSS/core/CSSAnimation.h +0 -1
- package/Common/cpp/reanimated/CSS/core/CSSTransition.cpp +4 -0
- package/Common/cpp/reanimated/CSS/core/CSSTransition.h +1 -0
- package/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.cpp +29 -4
- package/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.h +7 -21
- package/Common/cpp/reanimated/CSS/progress/RawProgressProvider.cpp +0 -2
- package/Common/cpp/reanimated/CSS/registry/CSSAnimationsRegistry.cpp +9 -8
- package/Common/cpp/reanimated/CSS/registry/CSSTransitionsRegistry.cpp +35 -4
- package/Common/cpp/reanimated/CSS/registry/CSSTransitionsRegistry.h +3 -0
- package/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp +2 -1
- package/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.cpp +4 -10
- package/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.h +2 -2
- package/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp +42 -21
- package/README.md +4 -2
- package/RNReanimated.podspec +15 -14
- package/android/CMakeLists.txt +40 -1
- package/android/build.gradle +8 -3
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/cpp/reanimated/android/NativeProxy.cpp +10 -15
- package/android/src/main/cpp/reanimated/android/NativeProxy.h +1 -1
- package/android/src/main/java/com/swmansion/reanimated/NativeProxy.java +3 -0
- package/android/src/main/java/com/swmansion/reanimated/NodesManager.java +5 -5
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedModule.java +0 -3
- package/android/src/main/java/com/swmansion/reanimated/ReanimatedPackage.java +8 -0
- package/android/src/main/java/com/swmansion/reanimated/view/ReanimatedView.java +13 -0
- package/android/src/main/java/com/swmansion/reanimated/view/ReanimatedViewManager.java +19 -0
- package/apple/reanimated/apple/ReanimatedModule.h +2 -1
- package/apple/reanimated/apple/ReanimatedModule.mm +9 -2
- package/apple/reanimated/apple/keyboardObserver/REAKeyboardEventObserver.mm +1 -1
- package/apple/reanimated/apple/native/PlatformDepMethodsHolderImpl.mm +1 -1
- package/apple/reanimated/apple/native/{NativeMethods.mm → SetGestureState.mm} +1 -1
- package/apple/reanimated/apple/view/ReanimatedView.h +11 -0
- package/apple/reanimated/apple/view/ReanimatedView.mm +30 -0
- package/lib/module/Bezier.js +1 -1
- package/lib/module/Bezier.js.map +1 -1
- package/lib/module/Colors.js +17 -53
- package/lib/module/Colors.js.map +1 -1
- package/lib/module/ConfigHelper.js +1 -3
- package/lib/module/ConfigHelper.js.map +1 -1
- package/lib/module/ReanimatedModule/NativeReanimated.js +4 -4
- package/lib/module/ReanimatedModule/NativeReanimated.js.map +1 -1
- package/lib/module/ReanimatedModule/js-reanimated/JSReanimated.js +7 -12
- package/lib/module/ReanimatedModule/js-reanimated/JSReanimated.js.map +1 -1
- package/lib/module/ReanimatedModule/js-reanimated/index.js +1 -1
- package/lib/module/ReanimatedModule/js-reanimated/index.js.map +1 -1
- package/lib/module/ReanimatedModule/reanimatedModuleInstance.js +2 -2
- package/lib/module/ReanimatedModule/reanimatedModuleInstance.js.map +1 -1
- package/lib/module/ReducedMotion.js +2 -2
- package/lib/module/ReducedMotion.js.map +1 -1
- package/lib/module/UpdateLayoutAnimations.js +2 -2
- package/lib/module/UpdateLayoutAnimations.js.map +1 -1
- package/lib/module/WorkletEventHandler.js +1 -2
- package/lib/module/WorkletEventHandler.js.map +1 -1
- package/lib/module/animation/decay/decay.js +1 -1
- package/lib/module/animation/decay/decay.js.map +1 -1
- package/lib/module/animation/decay/utils.js +1 -2
- package/lib/module/animation/decay/utils.js.map +1 -1
- package/lib/module/animation/styleAnimation.js +11 -4
- package/lib/module/animation/styleAnimation.js.map +1 -1
- package/lib/module/animation/transformationMatrix/matrixUtils.js +1 -1
- package/lib/module/animation/transformationMatrix/matrixUtils.js.map +1 -1
- package/lib/module/animation/util.js +52 -21
- package/lib/module/animation/util.js.map +1 -1
- package/lib/module/common/constants.js +18 -0
- package/lib/module/common/constants.js.map +1 -0
- package/lib/module/common/errors.js +27 -0
- package/lib/module/common/errors.js.map +1 -0
- package/lib/module/common/index.js +8 -0
- package/lib/module/common/index.js.map +1 -0
- package/lib/module/common/processors/colors.js +38 -0
- package/lib/module/common/processors/colors.js.map +1 -0
- package/lib/module/common/processors/index.js +6 -0
- package/lib/module/common/processors/index.js.map +1 -0
- package/lib/module/{css/platform/native/style → common}/processors/shadows.js +6 -5
- package/lib/module/common/processors/shadows.js.map +1 -0
- package/lib/module/common/processors/transformOrigin.js +90 -0
- package/lib/module/common/processors/transformOrigin.js.map +1 -0
- package/lib/module/common/types.js +2 -0
- package/lib/module/common/types.js.map +1 -0
- package/lib/module/common/utils/guards.js +7 -0
- package/lib/module/common/utils/guards.js.map +1 -0
- package/lib/module/common/utils/index.js +5 -0
- package/lib/module/common/utils/index.js.map +1 -0
- package/lib/module/common/utils/parsers.js +32 -0
- package/lib/module/common/utils/parsers.js.map +1 -0
- package/lib/module/component/FlatList.js +11 -20
- package/lib/module/component/FlatList.js.map +1 -1
- package/lib/module/component/LayoutAnimationConfig.js +8 -10
- package/lib/module/component/LayoutAnimationConfig.js.map +1 -1
- package/lib/module/component/PerformanceMonitor.js +10 -21
- package/lib/module/component/PerformanceMonitor.js.map +1 -1
- package/lib/module/component/ReducedMotionConfig.js +1 -1
- package/lib/module/component/ScrollView.js +8 -11
- package/lib/module/component/ScrollView.js.map +1 -1
- package/lib/module/core.js +1 -3
- package/lib/module/core.js.map +1 -1
- package/lib/module/createAnimatedComponent/AnimatedComponent.js +37 -8
- package/lib/module/createAnimatedComponent/AnimatedComponent.js.map +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js +1 -1
- package/lib/module/createAnimatedComponent/InlinePropManager.js.map +1 -1
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js +1 -2
- package/lib/module/createAnimatedComponent/JSPropsUpdater.js.map +1 -1
- package/lib/module/createAnimatedComponent/PropsFilter.js +8 -10
- package/lib/module/createAnimatedComponent/PropsFilter.js.map +1 -1
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js +8 -8
- package/lib/module/createAnimatedComponent/createAnimatedComponent.js.map +1 -1
- package/lib/module/css/component/AnimatedComponent.js +26 -27
- package/lib/module/css/component/AnimatedComponent.js.map +1 -1
- package/lib/module/css/component/createAnimatedComponent.js +8 -8
- package/lib/module/css/component/createAnimatedComponent.js.map +1 -1
- package/lib/module/css/component/utils.js +1 -1
- package/lib/module/css/component/utils.js.map +1 -1
- package/lib/module/css/constants/index.js +0 -1
- package/lib/module/css/constants/index.js.map +1 -1
- package/lib/module/css/easings/cubicBezier.js +1 -1
- package/lib/module/css/easings/cubicBezier.js.map +1 -1
- package/lib/module/css/easings/linear.js +1 -1
- package/lib/module/css/easings/linear.js.map +1 -1
- package/lib/module/css/easings/steps.js +1 -1
- package/lib/module/css/easings/steps.js.map +1 -1
- package/lib/module/css/index.js +1 -1
- package/lib/module/css/index.js.map +1 -1
- package/lib/module/css/managers/CSSManager.web.js +3 -7
- package/lib/module/css/managers/CSSManager.web.js.map +1 -1
- package/lib/module/css/managers/CSSTransitionsManager.web.js +6 -0
- package/lib/module/css/managers/CSSTransitionsManager.web.js.map +1 -1
- package/lib/module/css/platform/native/config.js +2 -15
- package/lib/module/css/platform/native/config.js.map +1 -1
- package/lib/module/css/platform/native/normalization/animation/keyframes.js +1 -1
- package/lib/module/css/platform/native/normalization/animation/keyframes.js.map +1 -1
- package/lib/module/css/platform/native/normalization/animation/settings.js +1 -1
- package/lib/module/css/platform/native/normalization/animation/settings.js.map +1 -1
- package/lib/module/css/platform/native/normalization/common/settings.js +1 -1
- package/lib/module/css/platform/native/normalization/common/settings.js.map +1 -1
- package/lib/module/css/platform/native/normalization/transition/config.js +1 -1
- package/lib/module/css/platform/native/normalization/transition/config.js.map +1 -1
- package/lib/module/css/platform/native/normalization/transition/settings.js +1 -1
- package/lib/module/css/platform/native/normalization/transition/settings.js.map +1 -1
- package/lib/module/css/platform/native/normalization/transition/shorthand.js +1 -1
- package/lib/module/css/platform/native/normalization/transition/shorthand.js.map +1 -1
- package/lib/module/css/platform/native/style/processors/colors.js +5 -11
- package/lib/module/css/platform/native/style/processors/colors.js.map +1 -1
- package/lib/module/css/platform/native/style/processors/font.js +1 -1
- package/lib/module/css/platform/native/style/processors/font.js.map +1 -1
- package/lib/module/css/platform/native/style/processors/index.js +1 -2
- package/lib/module/css/platform/native/style/processors/index.js.map +1 -1
- package/lib/module/css/platform/native/style/processors/others.js +1 -1
- package/lib/module/css/platform/native/style/processors/others.js.map +1 -1
- package/lib/module/css/platform/native/style/processors/transform.js +1 -1
- package/lib/module/css/platform/native/style/processors/transform.js.map +1 -1
- package/lib/module/css/platform/native/types/index.js +0 -1
- package/lib/module/css/platform/native/types/index.js.map +1 -1
- package/lib/module/css/platform/web/config.js +0 -13
- package/lib/module/css/platform/web/config.js.map +1 -1
- package/lib/module/css/platform/web/domUtils.js +4 -5
- package/lib/module/css/platform/web/domUtils.js.map +1 -1
- package/lib/module/css/platform/web/style/processors/shadows.js +1 -1
- package/lib/module/css/platform/web/style/processors/shadows.js.map +1 -1
- package/lib/module/css/platform/web/utils.js +1 -2
- package/lib/module/css/platform/web/utils.js.map +1 -1
- package/lib/module/css/stylesheet/index.js +9 -0
- package/lib/module/css/stylesheet/index.js.map +1 -0
- package/lib/module/css/stylesheet/keyframes.js +9 -0
- package/lib/module/css/stylesheet/keyframes.js.map +1 -0
- package/lib/module/css/stylesheet/stylesheet.js +28 -0
- package/lib/module/css/stylesheet/stylesheet.js.map +1 -0
- package/lib/module/css/utils/guards.js +0 -1
- package/lib/module/css/utils/guards.js.map +1 -1
- package/lib/module/css/utils/parsers.js +2 -29
- package/lib/module/css/utils/parsers.js.map +1 -1
- package/lib/module/fabricUtils.web.js +1 -1
- package/lib/module/fabricUtils.web.js.map +1 -1
- package/lib/module/hook/useAnimatedProps.js +2 -2
- package/lib/module/hook/useAnimatedProps.js.map +1 -1
- package/lib/module/hook/useAnimatedReaction.js +2 -2
- package/lib/module/hook/useAnimatedReaction.js.map +1 -1
- package/lib/module/hook/useAnimatedRef.js +50 -21
- package/lib/module/hook/useAnimatedRef.js.map +1 -1
- package/lib/module/hook/useAnimatedStyle.js +31 -23
- package/lib/module/hook/useAnimatedStyle.js.map +1 -1
- package/lib/module/hook/useDerivedValue.js +2 -2
- package/lib/module/hook/useDerivedValue.js.map +1 -1
- package/lib/module/hook/useHandler.js +2 -2
- package/lib/module/hook/useHandler.js.map +1 -1
- package/lib/module/hook/useScrollViewOffset.js +1 -2
- package/lib/module/hook/useScrollViewOffset.js.map +1 -1
- package/lib/module/hook/utils.js +1 -1
- package/lib/module/hook/utils.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/interpolateColor.js +2 -2
- package/lib/module/interpolateColor.js.map +1 -1
- package/lib/module/interpolation.js +1 -1
- package/lib/module/interpolation.js.map +1 -1
- package/lib/module/jestUtils.js +45 -19
- package/lib/module/jestUtils.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/BaseAnimationBuilder.js +1 -1
- package/lib/module/layoutReanimation/animationBuilder/BaseAnimationBuilder.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/Keyframe.js +1 -1
- package/lib/module/layoutReanimation/animationBuilder/Keyframe.js.map +1 -1
- package/lib/module/layoutReanimation/animationBuilder/index.js.map +1 -1
- package/lib/module/layoutReanimation/defaultAnimations/Pinwheel.js +4 -4
- package/lib/module/layoutReanimation/defaultAnimations/Pinwheel.js.map +1 -1
- package/lib/module/layoutReanimation/defaultAnimations/Zoom.js +2 -2
- package/lib/module/layoutReanimation/defaultAnimations/Zoom.js.map +1 -1
- package/lib/module/layoutReanimation/web/createAnimation.js +1 -1
- package/lib/module/layoutReanimation/web/createAnimation.js.map +1 -1
- package/lib/module/layoutReanimation/web/domUtils.js +5 -6
- package/lib/module/layoutReanimation/web/domUtils.js.map +1 -1
- package/lib/module/mappers.js +1 -2
- package/lib/module/mappers.js.map +1 -1
- package/lib/module/mock.js +3 -1
- package/lib/module/mock.js.map +1 -1
- package/lib/module/mutables.js +7 -3
- package/lib/module/mutables.js.map +1 -1
- package/lib/module/platform-specific/checkCppVersion.js +1 -1
- package/lib/module/platform-specific/checkCppVersion.js.map +1 -1
- package/lib/module/platform-specific/findHostInstance.js +1 -1
- package/lib/module/platform-specific/findHostInstance.js.map +1 -1
- package/lib/module/platform-specific/jsVersion.js +12 -1
- package/lib/module/platform-specific/jsVersion.js.map +1 -1
- package/lib/module/platform-specific/workletsVersion.js +27 -0
- package/lib/module/platform-specific/workletsVersion.js.map +1 -0
- package/lib/module/platformFunctions/dispatchCommand.js +4 -9
- package/lib/module/platformFunctions/dispatchCommand.js.map +1 -1
- package/lib/module/platformFunctions/measure.js +4 -10
- package/lib/module/platformFunctions/measure.js.map +1 -1
- package/lib/module/platformFunctions/scrollTo.js +3 -8
- package/lib/module/platformFunctions/scrollTo.js.map +1 -1
- package/lib/module/platformFunctions/setGestureState.js +4 -9
- package/lib/module/platformFunctions/setGestureState.js.map +1 -1
- package/lib/module/platformFunctions/setNativeProps.js +4 -10
- package/lib/module/platformFunctions/setNativeProps.js.map +1 -1
- package/lib/module/publicGlobals.js +1 -0
- package/lib/module/publicGlobals.js.map +1 -1
- package/lib/module/reactUtils.js +8 -6
- package/lib/module/reactUtils.js.map +1 -1
- package/lib/module/screenTransition/styleUpdater.js +1 -1
- package/lib/module/screenTransition/styleUpdater.js.map +1 -1
- package/lib/module/specs/ReanimatedNativeComponent.js +7 -0
- package/lib/module/specs/ReanimatedNativeComponent.js.map +1 -0
- package/lib/module/specs/ReanimatedViewProvider.js +5 -0
- package/lib/module/specs/ReanimatedViewProvider.js.map +1 -0
- package/lib/module/specs/ReanimatedViewProvider.native.js +7 -0
- package/lib/module/specs/ReanimatedViewProvider.native.js.map +1 -0
- package/lib/module/specs/index.js +2 -2
- package/lib/module/specs/index.js.map +1 -1
- package/lib/module/updateProps/index.js +5 -0
- package/lib/module/updateProps/index.js.map +1 -0
- package/lib/module/{UpdateProps.js → updateProps/updateProps.js} +12 -16
- package/lib/module/updateProps/updateProps.js.map +1 -0
- package/lib/typescript/Colors.d.ts +1 -8
- package/lib/typescript/Colors.d.ts.map +1 -1
- package/lib/typescript/ConfigHelper.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/NativeReanimated.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/js-reanimated/JSReanimated.d.ts.map +1 -1
- package/lib/typescript/ReanimatedModule/js-reanimated/index.d.ts.map +1 -1
- package/lib/typescript/UpdateLayoutAnimations.d.ts.map +1 -1
- package/lib/typescript/WorkletEventHandler.d.ts.map +1 -1
- package/lib/typescript/animation/decay/decay.d.ts.map +1 -1
- package/lib/typescript/animation/decay/utils.d.ts.map +1 -1
- package/lib/typescript/animation/styleAnimation.d.ts.map +1 -1
- package/lib/typescript/animation/util.d.ts +3 -1
- package/lib/typescript/animation/util.d.ts.map +1 -1
- package/lib/typescript/common/constants.d.ts +8 -0
- package/lib/typescript/common/constants.d.ts.map +1 -0
- package/lib/typescript/common/errors.d.ts +15 -0
- package/lib/typescript/common/errors.d.ts.map +1 -0
- package/lib/typescript/common/index.d.ts +6 -0
- package/lib/typescript/common/index.d.ts.map +1 -0
- package/lib/typescript/common/processors/colors.d.ts +4 -0
- package/lib/typescript/common/processors/colors.d.ts.map +1 -0
- package/lib/typescript/common/processors/index.d.ts +4 -0
- package/lib/typescript/common/processors/index.d.ts.map +1 -0
- package/lib/typescript/common/processors/shadows.d.ts.map +1 -0
- package/lib/typescript/common/processors/transformOrigin.d.ts +9 -0
- package/lib/typescript/common/processors/transformOrigin.d.ts.map +1 -0
- package/lib/typescript/{css/platform/native/types/common.d.ts → common/types.d.ts} +3 -1
- package/lib/typescript/common/types.d.ts.map +1 -0
- package/lib/typescript/common/utils/guards.d.ts +2 -0
- package/lib/typescript/common/utils/guards.d.ts.map +1 -0
- package/lib/typescript/common/utils/index.d.ts +3 -0
- package/lib/typescript/common/utils/index.d.ts.map +1 -0
- package/lib/typescript/common/utils/parsers.d.ts +3 -0
- package/lib/typescript/common/utils/parsers.d.ts.map +1 -0
- package/lib/typescript/commonTypes.d.ts +1 -1
- package/lib/typescript/commonTypes.d.ts.map +1 -1
- package/lib/typescript/component/FlatList.d.ts +1 -1
- package/lib/typescript/component/FlatList.d.ts.map +1 -1
- package/lib/typescript/component/LayoutAnimationConfig.d.ts +2 -2
- package/lib/typescript/component/LayoutAnimationConfig.d.ts.map +1 -1
- package/lib/typescript/component/ReducedMotionConfig.d.ts +1 -1
- package/lib/typescript/component/ScrollView.d.ts +3 -1
- package/lib/typescript/component/ScrollView.d.ts.map +1 -1
- package/lib/typescript/core.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/AnimatedComponent.d.ts +4 -1
- package/lib/typescript/createAnimatedComponent/AnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/InlinePropManager.d.ts +1 -1
- package/lib/typescript/createAnimatedComponent/JSPropsUpdater.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/PropsFilter.d.ts +1 -1
- package/lib/typescript/createAnimatedComponent/PropsFilter.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts +7 -3
- package/lib/typescript/createAnimatedComponent/commonTypes.d.ts.map +1 -1
- package/lib/typescript/createAnimatedComponent/createAnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/css/component/AnimatedComponent.d.ts +1 -1
- package/lib/typescript/css/component/AnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/css/component/createAnimatedComponent.d.ts.map +1 -1
- package/lib/typescript/css/component/utils.d.ts.map +1 -1
- package/lib/typescript/css/constants/index.d.ts +0 -1
- package/lib/typescript/css/constants/index.d.ts.map +1 -1
- package/lib/typescript/css/index.d.ts +1 -1
- package/lib/typescript/css/index.d.ts.map +1 -1
- package/lib/typescript/css/managers/CSSManager.web.d.ts.map +1 -1
- package/lib/typescript/css/managers/CSSTransitionsManager.web.d.ts +1 -0
- package/lib/typescript/css/managers/CSSTransitionsManager.web.d.ts.map +1 -1
- package/lib/typescript/css/platform/native/config.d.ts.map +1 -1
- package/lib/typescript/css/platform/native/normalization/common/settings.d.ts.map +1 -1
- package/lib/typescript/css/platform/native/style/processors/colors.d.ts +3 -3
- package/lib/typescript/css/platform/native/style/processors/colors.d.ts.map +1 -1
- package/lib/typescript/css/platform/native/style/processors/index.d.ts +1 -2
- package/lib/typescript/css/platform/native/style/processors/index.d.ts.map +1 -1
- package/lib/typescript/css/platform/native/style/types.d.ts +2 -1
- package/lib/typescript/css/platform/native/style/types.d.ts.map +1 -1
- package/lib/typescript/css/platform/native/types/index.d.ts +0 -1
- package/lib/typescript/css/platform/native/types/index.d.ts.map +1 -1
- package/lib/typescript/css/platform/web/config.d.ts.map +1 -1
- package/lib/typescript/css/platform/web/domUtils.d.ts.map +1 -1
- package/lib/typescript/css/platform/web/style/types.d.ts +2 -1
- package/lib/typescript/css/platform/web/style/types.d.ts.map +1 -1
- package/lib/typescript/css/platform/web/utils.d.ts.map +1 -1
- package/lib/typescript/css/stylesheet/index.d.ts +8 -0
- package/lib/typescript/css/stylesheet/index.d.ts.map +1 -0
- package/lib/typescript/css/stylesheet/keyframes.d.ts +3 -0
- package/lib/typescript/css/stylesheet/keyframes.d.ts.map +1 -0
- package/lib/typescript/css/stylesheet/stylesheet.d.ts +7 -0
- package/lib/typescript/css/stylesheet/stylesheet.d.ts.map +1 -0
- package/lib/typescript/css/types/common.d.ts +3 -1
- package/lib/typescript/css/types/common.d.ts.map +1 -1
- package/lib/typescript/css/types/helpers.d.ts +0 -1
- package/lib/typescript/css/types/helpers.d.ts.map +1 -1
- package/lib/typescript/css/utils/guards.d.ts +0 -1
- package/lib/typescript/css/utils/guards.d.ts.map +1 -1
- package/lib/typescript/css/utils/parsers.d.ts +0 -2
- package/lib/typescript/css/utils/parsers.d.ts.map +1 -1
- package/lib/typescript/helperTypes.d.ts +1 -1
- package/lib/typescript/helperTypes.d.ts.map +1 -1
- package/lib/typescript/hook/commonTypes.d.ts +7 -5
- package/lib/typescript/hook/commonTypes.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedProps.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedRef.d.ts +3 -1
- package/lib/typescript/hook/useAnimatedRef.d.ts.map +1 -1
- package/lib/typescript/hook/useAnimatedStyle.d.ts.map +1 -1
- package/lib/typescript/hook/useDerivedValue.d.ts.map +1 -1
- package/lib/typescript/hook/useScrollViewOffset.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/interpolateColor.d.ts.map +1 -1
- package/lib/typescript/jestUtils.d.ts +1 -0
- package/lib/typescript/jestUtils.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/BaseAnimationBuilder.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/Keyframe.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/index.d.ts +1 -1
- package/lib/typescript/layoutReanimation/animationBuilder/index.d.ts.map +1 -1
- package/lib/typescript/layoutReanimation/web/domUtils.d.ts.map +1 -1
- package/lib/typescript/mappers.d.ts.map +1 -1
- package/lib/typescript/mutables.d.ts.map +1 -1
- package/lib/typescript/platform-specific/findHostInstance.d.ts.map +1 -1
- package/lib/typescript/platform-specific/jsVersion.d.ts +9 -1
- package/lib/typescript/platform-specific/jsVersion.d.ts.map +1 -1
- package/lib/typescript/platform-specific/workletsVersion.d.ts +2 -0
- package/lib/typescript/platform-specific/workletsVersion.d.ts.map +1 -0
- package/lib/typescript/platformFunctions/dispatchCommand.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/findNodeHandle.web.d.ts +1 -1
- package/lib/typescript/platformFunctions/measure.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/scrollTo.d.ts.map +1 -1
- package/lib/typescript/platformFunctions/setNativeProps.d.ts.map +1 -1
- package/lib/typescript/publicGlobals.d.ts.map +1 -1
- package/lib/typescript/reactUtils.d.ts.map +1 -1
- package/lib/typescript/specs/ReanimatedNativeComponent.d.ts +7 -0
- package/lib/typescript/specs/ReanimatedNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/ReanimatedViewProvider.d.ts +4 -0
- package/lib/typescript/specs/ReanimatedViewProvider.d.ts.map +1 -0
- package/lib/typescript/specs/ReanimatedViewProvider.native.d.ts +3 -0
- package/lib/typescript/specs/ReanimatedViewProvider.native.d.ts.map +1 -0
- package/lib/typescript/specs/index.d.ts +2 -2
- package/lib/typescript/specs/index.d.ts.map +1 -1
- package/lib/typescript/updateProps/index.d.ts +3 -0
- package/lib/typescript/updateProps/index.d.ts.map +1 -0
- package/lib/typescript/updateProps/updateProps.d.ts +14 -0
- package/lib/typescript/updateProps/updateProps.d.ts.map +1 -0
- package/package.json +25 -30
- package/plugin/index.js +6 -3
- package/scripts/reanimated_utils.rb +9 -3
- package/src/Bezier.ts +1 -1
- package/src/Colors.ts +20 -63
- package/src/ConfigHelper.ts +1 -4
- package/src/ReanimatedModule/NativeReanimated.ts +8 -5
- package/src/ReanimatedModule/js-reanimated/JSReanimated.ts +12 -19
- package/src/ReanimatedModule/js-reanimated/index.ts +1 -1
- package/src/ReanimatedModule/reanimatedModuleInstance.ts +2 -2
- package/src/ReducedMotion.ts +3 -3
- package/src/UpdateLayoutAnimations.ts +2 -2
- package/src/WorkletEventHandler.ts +1 -3
- package/src/animation/decay/decay.ts +1 -1
- package/src/animation/decay/utils.ts +1 -2
- package/src/animation/styleAnimation.ts +20 -8
- package/src/animation/transformationMatrix/matrixUtils.tsx +1 -1
- package/src/animation/util.ts +59 -20
- package/src/common/constants.ts +20 -0
- package/src/common/errors.ts +33 -0
- package/src/common/index.ts +6 -0
- package/src/common/processors/colors.ts +40 -0
- package/src/common/processors/index.ts +4 -0
- package/src/{css/platform/native/style → common}/processors/shadows.ts +7 -5
- package/src/common/processors/transformOrigin.ts +149 -0
- package/src/{css/platform/native/types/common.ts → common/types.ts} +4 -0
- package/src/common/utils/guards.ts +6 -0
- package/src/common/utils/index.ts +3 -0
- package/src/common/utils/parsers.ts +45 -0
- package/src/commonTypes.ts +1 -1
- package/src/component/FlatList.tsx +5 -5
- package/src/component/LayoutAnimationConfig.tsx +3 -3
- package/src/component/ReducedMotionConfig.tsx +1 -1
- package/src/component/ScrollView.tsx +29 -27
- package/src/core.ts +1 -3
- package/src/createAnimatedComponent/AnimatedComponent.tsx +43 -8
- package/src/createAnimatedComponent/InlinePropManager.ts +1 -1
- package/src/createAnimatedComponent/JSPropsUpdater.ts +1 -3
- package/src/createAnimatedComponent/PropsFilter.tsx +13 -10
- package/src/createAnimatedComponent/commonTypes.ts +7 -3
- package/src/createAnimatedComponent/createAnimatedComponent.tsx +9 -11
- package/src/css/component/AnimatedComponent.tsx +25 -25
- package/src/css/component/createAnimatedComponent.tsx +9 -11
- package/src/css/component/utils.ts +5 -11
- package/src/css/constants/index.ts +0 -1
- package/src/css/easings/cubicBezier.ts +1 -1
- package/src/css/easings/linear.ts +1 -1
- package/src/css/easings/steps.ts +1 -1
- package/src/css/index.ts +1 -1
- package/src/css/managers/CSSManager.web.ts +3 -8
- package/src/css/managers/CSSTransitionsManager.web.ts +8 -0
- package/src/css/platform/native/config.ts +5 -9
- package/src/css/platform/native/normalization/animation/keyframes.ts +1 -1
- package/src/css/platform/native/normalization/animation/settings.ts +1 -1
- package/src/css/platform/native/normalization/common/settings.ts +1 -1
- package/src/css/platform/native/normalization/transition/config.ts +1 -1
- package/src/css/platform/native/normalization/transition/settings.ts +1 -1
- package/src/css/platform/native/normalization/transition/shorthand.ts +1 -1
- package/src/css/platform/native/style/processors/colors.ts +14 -18
- package/src/css/platform/native/style/processors/font.ts +1 -1
- package/src/css/platform/native/style/processors/index.ts +4 -2
- package/src/css/platform/native/style/processors/others.ts +1 -1
- package/src/css/platform/native/style/processors/transform.ts +1 -1
- package/src/css/platform/native/style/types.ts +2 -1
- package/src/css/platform/native/types/index.ts +0 -1
- package/src/css/platform/web/config.ts +0 -6
- package/src/css/platform/web/domUtils.ts +4 -5
- package/src/css/platform/web/style/processors/shadows.ts +1 -1
- package/src/css/platform/web/style/types.ts +2 -1
- package/src/css/platform/web/utils.ts +1 -2
- package/src/css/stylesheet/index.ts +8 -0
- package/src/css/stylesheet/keyframes.ts +15 -0
- package/src/css/stylesheet/stylesheet.ts +46 -0
- package/src/css/types/common.ts +12 -1
- package/src/css/types/helpers.ts +0 -2
- package/src/css/utils/guards.ts +0 -3
- package/src/css/utils/parsers.ts +2 -43
- package/src/fabricUtils.web.ts +1 -1
- package/src/helperTypes.ts +1 -1
- package/src/hook/commonTypes.ts +9 -5
- package/src/hook/useAnimatedProps.ts +2 -2
- package/src/hook/useAnimatedReaction.ts +2 -2
- package/src/hook/useAnimatedRef.ts +68 -25
- package/src/hook/useAnimatedStyle.ts +61 -27
- package/src/hook/useDerivedValue.ts +2 -2
- package/src/hook/useHandler.ts +2 -2
- package/src/hook/useScrollViewOffset.ts +1 -3
- package/src/hook/utils.ts +1 -1
- package/src/index.ts +5 -1
- package/src/interpolateColor.ts +1 -2
- package/src/interpolation.ts +1 -1
- package/src/jestUtils.ts +84 -24
- package/src/layoutReanimation/animationBuilder/BaseAnimationBuilder.ts +1 -1
- package/src/layoutReanimation/animationBuilder/Keyframe.ts +1 -1
- package/src/layoutReanimation/animationBuilder/index.ts +1 -1
- package/src/layoutReanimation/defaultAnimations/Pinwheel.ts +4 -4
- package/src/layoutReanimation/defaultAnimations/Zoom.ts +2 -2
- package/src/layoutReanimation/web/createAnimation.ts +1 -1
- package/src/layoutReanimation/web/domUtils.ts +5 -6
- package/src/mappers.ts +1 -3
- package/src/mock.ts +1 -1
- package/src/mutables.ts +17 -4
- package/src/platform-specific/checkCppVersion.ts +1 -1
- package/src/platform-specific/findHostInstance.ts +1 -1
- package/src/platform-specific/jsVersion.ts +14 -1
- package/src/platform-specific/workletsVersion.ts +35 -0
- package/src/platformFunctions/dispatchCommand.ts +4 -10
- package/src/platformFunctions/measure.ts +4 -11
- package/src/platformFunctions/scrollTo.ts +3 -9
- package/src/platformFunctions/setGestureState.ts +4 -10
- package/src/platformFunctions/setNativeProps.ts +4 -11
- package/src/privateGlobals.d.ts +2 -0
- package/src/publicGlobals.ts +1 -0
- package/src/reactUtils.ts +8 -4
- package/src/screenTransition/styleUpdater.ts +1 -1
- package/src/specs/ReanimatedNativeComponent.ts +9 -0
- package/src/specs/ReanimatedViewProvider.native.ts +5 -0
- package/src/specs/ReanimatedViewProvider.ts +6 -0
- package/src/specs/index.ts +2 -2
- package/src/updateProps/index.ts +4 -0
- package/src/{UpdateProps.ts → updateProps/updateProps.ts} +31 -33
- package/android/src/main/cpp/reanimated/CMakeLists.txt +0 -42
- package/android/src/main/java/com/swmansion/reanimated/BorderRadiiDrawableUtils.java +0 -32
- package/android/src/main/java/com/swmansion/reanimated/ReactNativeUtils.java +0 -61
- package/lib/module/PlatformChecker.js +0 -35
- package/lib/module/PlatformChecker.js.map +0 -1
- package/lib/module/UpdateProps.js.map +0 -1
- package/lib/module/createAnimatedComponent/setAndForwardRef.js +0 -54
- package/lib/module/createAnimatedComponent/setAndForwardRef.js.map +0 -1
- package/lib/module/css/constants/platform.js +0 -5
- package/lib/module/css/constants/platform.js.map +0 -1
- package/lib/module/css/errors.js +0 -15
- package/lib/module/css/errors.js.map +0 -1
- package/lib/module/css/platform/native/style/processors/shadows.js.map +0 -1
- package/lib/module/css/platform/native/style/processors/transformOrigin.js +0 -64
- package/lib/module/css/platform/native/style/processors/transformOrigin.js.map +0 -1
- package/lib/module/css/platform/native/types/common.js +0 -2
- package/lib/module/css/platform/native/types/common.js.map +0 -1
- package/lib/module/css/stylesheet.js +0 -25
- package/lib/module/css/stylesheet.js.map +0 -1
- package/lib/module/errors.js +0 -11
- package/lib/module/errors.js.map +0 -1
- package/lib/module/processBoxShadow.js +0 -150
- package/lib/module/processBoxShadow.js.map +0 -1
- package/lib/module/specs/NativeReaWorkletsModule.js +0 -9
- package/lib/module/specs/NativeReaWorkletsModule.js.map +0 -1
- package/lib/typescript/PlatformChecker.d.ts +0 -7
- package/lib/typescript/PlatformChecker.d.ts.map +0 -1
- package/lib/typescript/UpdateProps.d.ts +0 -18
- package/lib/typescript/UpdateProps.d.ts.map +0 -1
- package/lib/typescript/createAnimatedComponent/setAndForwardRef.d.ts +0 -38
- package/lib/typescript/createAnimatedComponent/setAndForwardRef.d.ts.map +0 -1
- package/lib/typescript/css/constants/platform.d.ts +0 -2
- package/lib/typescript/css/constants/platform.d.ts.map +0 -1
- package/lib/typescript/css/errors.d.ts +0 -9
- package/lib/typescript/css/errors.d.ts.map +0 -1
- package/lib/typescript/css/platform/native/style/processors/shadows.d.ts.map +0 -1
- package/lib/typescript/css/platform/native/style/processors/transformOrigin.d.ts +0 -9
- package/lib/typescript/css/platform/native/style/processors/transformOrigin.d.ts.map +0 -1
- package/lib/typescript/css/platform/native/types/common.d.ts.map +0 -1
- package/lib/typescript/css/stylesheet.d.ts +0 -11
- package/lib/typescript/css/stylesheet.d.ts.map +0 -1
- package/lib/typescript/errors.d.ts +0 -3
- package/lib/typescript/errors.d.ts.map +0 -1
- package/lib/typescript/processBoxShadow.d.ts +0 -13
- package/lib/typescript/processBoxShadow.d.ts.map +0 -1
- package/lib/typescript/specs/NativeReaWorkletsModule.d.ts +0 -7
- package/lib/typescript/specs/NativeReaWorkletsModule.d.ts.map +0 -1
- package/src/PlatformChecker.ts +0 -43
- package/src/createAnimatedComponent/setAndForwardRef.ts +0 -63
- package/src/css/constants/platform.ts +0 -4
- package/src/css/errors.ts +0 -20
- package/src/css/platform/native/style/processors/transformOrigin.ts +0 -117
- package/src/css/stylesheet.ts +0 -37
- package/src/errors.ts +0 -12
- package/src/processBoxShadow.ts +0 -195
- package/src/specs/NativeReaWorkletsModule.ts +0 -12
- /package/apple/reanimated/apple/{REAUIKit.h → REAUIView.h} +0 -0
- /package/apple/reanimated/apple/native/{NativeMethods.h → SetGestureState.h} +0 -0
- /package/lib/typescript/{css/platform/native/style → common}/processors/shadows.d.ts +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.13)
|
|
2
|
+
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
3
|
+
|
|
4
|
+
set(ANDROID_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../android)
|
|
5
|
+
set(CODEGEN_JNI_DIR ${ANDROID_DIR}/build/generated/source/codegen/jni)
|
|
6
|
+
set(CODEGEN_COMPONENTS_DIR ${CODEGEN_JNI_DIR}/react/renderer/components/rnreanimated)
|
|
7
|
+
file(
|
|
8
|
+
GLOB CODEGEN_ORIGINAL_SRCS CONFIGURE_DEPENDS
|
|
9
|
+
${CODEGEN_JNI_DIR}/*.cpp
|
|
10
|
+
${CODEGEN_COMPONENTS_DIR}/*.cpp
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
set(CODEGEN_OVERWRITTEN_JNI_DIR .)
|
|
14
|
+
set(CODEGEN_OVERWRITTEN_COMPONENTS_DIR ${CODEGEN_OVERWRITTEN_JNI_DIR}/react/renderer/components/rnreanimated)
|
|
15
|
+
file(
|
|
16
|
+
GLOB CODEGEN_OVERWRITTEN_SRCS CONFIGURE_DEPENDS
|
|
17
|
+
${CODEGEN_OVERWRITTEN_JNI_DIR}/*.cpp
|
|
18
|
+
${CODEGEN_OVERWRITTEN_COMPONENTS_DIR}/*.cpp
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
add_library(
|
|
22
|
+
react_codegen_rnreanimated
|
|
23
|
+
OBJECT
|
|
24
|
+
${CODEGEN_OVERWRITTEN_SRCS}
|
|
25
|
+
${CODEGEN_ORIGINAL_SRCS}
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
target_include_directories(
|
|
29
|
+
react_codegen_rnreanimated
|
|
30
|
+
PUBLIC
|
|
31
|
+
${CODEGEN_OVERWRITTEN_JNI_DIR}
|
|
32
|
+
${CODEGEN_OVERWRITTEN_COMPONENTS_DIR}
|
|
33
|
+
${CODEGEN_JNI_DIR}
|
|
34
|
+
${CODEGEN_COMPONENTS_DIR}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
target_link_libraries(
|
|
38
|
+
react_codegen_rnreanimated
|
|
39
|
+
fbjni
|
|
40
|
+
jsi
|
|
41
|
+
reactnative
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
target_compile_options(
|
|
45
|
+
react_codegen_rnreanimated
|
|
46
|
+
PRIVATE
|
|
47
|
+
-DLOG_TAG=\"ReactNative\"
|
|
48
|
+
-fexceptions
|
|
49
|
+
-frtti
|
|
50
|
+
-std=c++20
|
|
51
|
+
-Wall
|
|
52
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
4
|
+
#include <react/renderer/components/rnreanimated/ReanimatedShadowNode.h>
|
|
5
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
6
|
+
|
|
7
|
+
#include <memory>
|
|
8
|
+
|
|
9
|
+
namespace facebook::react {
|
|
10
|
+
|
|
11
|
+
using ReanimatedViewComponentDescriptor =
|
|
12
|
+
ConcreteComponentDescriptor<ReanimatedShadowNode>;
|
|
13
|
+
|
|
14
|
+
void rnreanimated_registerComponentDescriptorsFromCodegen(
|
|
15
|
+
const std::shared_ptr<const ComponentDescriptorProviderRegistry> ®istry);
|
|
16
|
+
|
|
17
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#include <react/renderer/components/rnreanimated/ReanimatedShadowNode.h>
|
|
2
|
+
|
|
3
|
+
namespace facebook::react {
|
|
4
|
+
|
|
5
|
+
extern const char ReanimatedViewComponentName[] = "ReanimatedView";
|
|
6
|
+
|
|
7
|
+
void ReanimatedShadowNode::layout(LayoutContext layoutContext) {
|
|
8
|
+
YogaLayoutableShadowNode::layout(layoutContext);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <jsi/jsi.h>
|
|
4
|
+
#include <react/renderer/components/rnreanimated/EventEmitters.h>
|
|
5
|
+
#include <react/renderer/components/rnreanimated/Props.h>
|
|
6
|
+
#include <react/renderer/components/rnreanimated/ReanimatedViewState.h>
|
|
7
|
+
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
8
|
+
#include <react/renderer/core/LayoutContext.h>
|
|
9
|
+
|
|
10
|
+
namespace facebook::react {
|
|
11
|
+
|
|
12
|
+
JSI_EXPORT extern const char ReanimatedViewComponentName[];
|
|
13
|
+
|
|
14
|
+
using ReanimatedViewShadowNodeBase = ConcreteViewShadowNode<
|
|
15
|
+
ReanimatedViewComponentName,
|
|
16
|
+
ReanimatedViewProps,
|
|
17
|
+
ReanimatedViewEventEmitter,
|
|
18
|
+
ReanimatedViewState>;
|
|
19
|
+
|
|
20
|
+
class ReanimatedShadowNode final : public ReanimatedViewShadowNodeBase {
|
|
21
|
+
public:
|
|
22
|
+
using ConcreteViewShadowNode::ConcreteViewShadowNode;
|
|
23
|
+
void layout(LayoutContext layoutContext) override;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
} // namespace facebook::react
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#ifdef ANDROID
|
|
4
|
+
#include <folly/dynamic.h>
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
namespace facebook::react {
|
|
8
|
+
|
|
9
|
+
class ReanimatedViewState {
|
|
10
|
+
public:
|
|
11
|
+
ReanimatedViewState() = default;
|
|
12
|
+
|
|
13
|
+
#ifdef ANDROID
|
|
14
|
+
ReanimatedViewState(
|
|
15
|
+
ReanimatedViewState const &previousState,
|
|
16
|
+
folly::dynamic data) {}
|
|
17
|
+
folly::dynamic getDynamic() const {
|
|
18
|
+
return {};
|
|
19
|
+
}
|
|
20
|
+
#endif
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
} // namespace facebook::react
|
|
@@ -69,11 +69,6 @@ folly::dynamic CSSAnimation::getBackwardsFillStyle() const {
|
|
|
69
69
|
: styleInterpolator_->getFirstKeyframeValue();
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
folly::dynamic CSSAnimation::getForwardsFillStyle() const {
|
|
73
|
-
return isReversed() ? styleInterpolator_->getFirstKeyframeValue()
|
|
74
|
-
: styleInterpolator_->getLastKeyframeValue();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
72
|
folly::dynamic CSSAnimation::getResetStyle() const {
|
|
78
73
|
return styleInterpolator_->getResetStyle(shadowNode_);
|
|
79
74
|
}
|
|
@@ -104,6 +99,8 @@ folly::dynamic CSSAnimation::update(const double timestamp) {
|
|
|
104
99
|
void CSSAnimation::updateSettings(
|
|
105
100
|
const PartialCSSAnimationSettings &updatedSettings,
|
|
106
101
|
const double timestamp) {
|
|
102
|
+
progressProvider_->resetProgress();
|
|
103
|
+
|
|
107
104
|
if (updatedSettings.duration.has_value()) {
|
|
108
105
|
progressProvider_->setDuration(updatedSettings.duration.value());
|
|
109
106
|
}
|
|
@@ -131,6 +128,8 @@ void CSSAnimation::updateSettings(
|
|
|
131
128
|
progressProvider_->play(timestamp);
|
|
132
129
|
}
|
|
133
130
|
}
|
|
131
|
+
|
|
132
|
+
progressProvider_->update(timestamp);
|
|
134
133
|
}
|
|
135
134
|
|
|
136
135
|
} // namespace reanimated::css
|
|
@@ -33,6 +33,10 @@ folly::dynamic CSSTransition::getCurrentInterpolationStyle() const {
|
|
|
33
33
|
return styleInterpolator_.interpolate(shadowNode_, progressProvider_);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
TransitionProperties CSSTransition::getProperties() const {
|
|
37
|
+
return properties_;
|
|
38
|
+
}
|
|
39
|
+
|
|
36
40
|
PropertyNames CSSTransition::getAllowedProperties(
|
|
37
41
|
const folly::dynamic &oldProps,
|
|
38
42
|
const folly::dynamic &newProps) {
|
|
@@ -24,6 +24,7 @@ class CSSTransition {
|
|
|
24
24
|
double getMinDelay(double timestamp) const;
|
|
25
25
|
TransitionProgressState getState() const;
|
|
26
26
|
folly::dynamic getCurrentInterpolationStyle() const;
|
|
27
|
+
TransitionProperties getProperties() const;
|
|
27
28
|
PropertyNames getAllowedProperties(
|
|
28
29
|
const folly::dynamic &oldProps,
|
|
29
30
|
const folly::dynamic &newProps);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#include <reanimated/CSS/progress/AnimationProgressProvider.h>
|
|
2
2
|
|
|
3
|
-
#include <utility>
|
|
4
|
-
|
|
5
3
|
namespace reanimated::css {
|
|
6
4
|
|
|
7
5
|
AnimationProgressProvider::AnimationProgressProvider(
|
|
@@ -18,6 +16,27 @@ AnimationProgressProvider::AnimationProgressProvider(
|
|
|
18
16
|
easingFunction_(std::move(easingFunction)),
|
|
19
17
|
keyframeEasingFunctions_(keyframeEasingFunctions) {}
|
|
20
18
|
|
|
19
|
+
void AnimationProgressProvider::setIterationCount(double iterationCount) {
|
|
20
|
+
iterationCount_ = iterationCount;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
void AnimationProgressProvider::setDirection(AnimationDirection direction) {
|
|
24
|
+
direction_ = direction;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
void AnimationProgressProvider::setEasingFunction(
|
|
28
|
+
const EasingFunction &easingFunction) {
|
|
29
|
+
easingFunction_ = easingFunction;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
AnimationDirection AnimationProgressProvider::getDirection() const {
|
|
33
|
+
return direction_;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
double AnimationProgressProvider::getGlobalProgress() const {
|
|
37
|
+
return applyAnimationDirection(rawProgress_.value_or(0));
|
|
38
|
+
}
|
|
39
|
+
|
|
21
40
|
AnimationProgressState AnimationProgressProvider::getState(
|
|
22
41
|
const double timestamp) const {
|
|
23
42
|
if (shouldFinish(timestamp)) {
|
|
@@ -26,7 +45,7 @@ AnimationProgressState AnimationProgressProvider::getState(
|
|
|
26
45
|
if (pauseTimestamp_ > 0) {
|
|
27
46
|
return AnimationProgressState::Paused;
|
|
28
47
|
}
|
|
29
|
-
if (!rawProgress_.has_value()) {
|
|
48
|
+
if (timestamp < getStartTimestamp(timestamp) || !rawProgress_.has_value()) {
|
|
30
49
|
return AnimationProgressState::Pending;
|
|
31
50
|
}
|
|
32
51
|
const auto rawProgress = rawProgress_.value();
|
|
@@ -36,6 +55,10 @@ AnimationProgressState AnimationProgressProvider::getState(
|
|
|
36
55
|
return AnimationProgressState::Running;
|
|
37
56
|
}
|
|
38
57
|
|
|
58
|
+
double AnimationProgressProvider::getPauseTimestamp() const {
|
|
59
|
+
return pauseTimestamp_;
|
|
60
|
+
}
|
|
61
|
+
|
|
39
62
|
double AnimationProgressProvider::getTotalPausedTime(
|
|
40
63
|
const double timestamp) const {
|
|
41
64
|
return pauseTimestamp_ > 0
|
|
@@ -137,7 +160,9 @@ double AnimationProgressProvider::updateIterationProgress(
|
|
|
137
160
|
|
|
138
161
|
if (deltaIterations > 0) {
|
|
139
162
|
// Return 1 if the current iteration is the last one
|
|
140
|
-
if (
|
|
163
|
+
if (iterationCount_ != -1 &&
|
|
164
|
+
currentIteration_ + deltaIterations > iterationCount_) {
|
|
165
|
+
currentIteration_ = iterationCount_;
|
|
141
166
|
return 1;
|
|
142
167
|
}
|
|
143
168
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
#include <reanimated/CSS/progress/RawProgressProvider.h>
|
|
8
8
|
|
|
9
9
|
#include <memory>
|
|
10
|
+
#include <utility>
|
|
10
11
|
|
|
11
12
|
namespace reanimated::css {
|
|
12
13
|
|
|
@@ -29,30 +30,15 @@ class AnimationProgressProvider final : public KeyframeProgressProvider,
|
|
|
29
30
|
EasingFunction easingFunction,
|
|
30
31
|
const std::shared_ptr<KeyframeEasingFunctions> &keyframeEasingFunctions);
|
|
31
32
|
|
|
32
|
-
void setIterationCount(double iterationCount)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
void setDirection(AnimationDirection direction) {
|
|
37
|
-
resetProgress();
|
|
38
|
-
direction_ = direction;
|
|
39
|
-
}
|
|
40
|
-
void setEasingFunction(const EasingFunction &easingFunction) {
|
|
41
|
-
resetProgress();
|
|
42
|
-
easingFunction_ = easingFunction;
|
|
43
|
-
}
|
|
33
|
+
void setIterationCount(double iterationCount);
|
|
34
|
+
void setDirection(AnimationDirection direction);
|
|
35
|
+
void setEasingFunction(const EasingFunction &easingFunction);
|
|
44
36
|
|
|
45
|
-
AnimationDirection getDirection() const
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
double getGlobalProgress() const override {
|
|
49
|
-
return applyAnimationDirection(rawProgress_.value_or(0));
|
|
50
|
-
}
|
|
37
|
+
AnimationDirection getDirection() const;
|
|
38
|
+
double getGlobalProgress() const override;
|
|
51
39
|
double getKeyframeProgress(double fromOffset, double toOffset) const override;
|
|
52
40
|
AnimationProgressState getState(double timestamp) const;
|
|
53
|
-
double getPauseTimestamp() const
|
|
54
|
-
return pauseTimestamp_;
|
|
55
|
-
}
|
|
41
|
+
double getPauseTimestamp() const;
|
|
56
42
|
double getTotalPausedTime(double timestamp) const;
|
|
57
43
|
double getStartTimestamp(double timestamp) const;
|
|
58
44
|
|
|
@@ -9,12 +9,10 @@ RawProgressProvider::RawProgressProvider(
|
|
|
9
9
|
: duration_(duration), delay_(delay), creationTimestamp_(timestamp) {}
|
|
10
10
|
|
|
11
11
|
void RawProgressProvider::setDuration(double duration) {
|
|
12
|
-
resetProgress();
|
|
13
12
|
duration_ = duration;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
void RawProgressProvider::setDelay(double delay) {
|
|
17
|
-
resetProgress();
|
|
18
16
|
delay_ = delay;
|
|
19
17
|
}
|
|
20
18
|
|
|
@@ -274,15 +274,16 @@ void CSSAnimationsRegistry::applyViewAnimationsStyle(
|
|
|
274
274
|
|
|
275
275
|
folly::dynamic style;
|
|
276
276
|
const auto ¤tState = animation->getState(timestamp);
|
|
277
|
-
if (
|
|
278
|
-
if (animation->hasForwardsFillMode()) {
|
|
279
|
-
style = animation->getForwardsFillStyle();
|
|
280
|
-
}
|
|
281
|
-
} else if (
|
|
282
|
-
startTimestamp == timestamp ||
|
|
283
|
-
(startTimestamp > timestamp && animation->hasBackwardsFillMode())) {
|
|
277
|
+
if (startTimestamp > timestamp && animation->hasBackwardsFillMode()) {
|
|
284
278
|
style = animation->getBackwardsFillStyle();
|
|
285
|
-
} else if (
|
|
279
|
+
} else if (
|
|
280
|
+
currentState == AnimationProgressState::Running ||
|
|
281
|
+
// Animation is paused after start (was running before)
|
|
282
|
+
(currentState == AnimationProgressState::Paused &&
|
|
283
|
+
timestamp >= animation->getStartTimestamp(timestamp)) ||
|
|
284
|
+
// Animation is finished and has fill forwards fill mode
|
|
285
|
+
(currentState == AnimationProgressState::Finished &&
|
|
286
|
+
animation->hasForwardsFillMode())) {
|
|
286
287
|
style = animation->getCurrentInterpolationStyle();
|
|
287
288
|
}
|
|
288
289
|
|
|
@@ -45,8 +45,8 @@ void CSSTransitionsRegistry::updateSettings(
|
|
|
45
45
|
// Replace style overrides with the new ones if transition properties were
|
|
46
46
|
// updated (we want to keep overrides only for transitioned properties)
|
|
47
47
|
if (config.properties.has_value()) {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
updateInUpdatesRegistry(
|
|
49
|
+
transition, transition->getCurrentInterpolationStyle());
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -138,11 +138,42 @@ PropsObserver CSSTransitionsRegistry::createPropsObserver(const Tag viewTag) {
|
|
|
138
138
|
strongThis->getUpdatesFromRegistry(shadowNode->getTag());
|
|
139
139
|
const auto &transitionStartStyle = transition->run(
|
|
140
140
|
changedProps, lastUpdates, strongThis->getCurrentTimestamp_());
|
|
141
|
-
|
|
142
|
-
strongThis->setInUpdatesRegistry(shadowNode, transitionStartStyle);
|
|
141
|
+
strongThis->updateInUpdatesRegistry(transition, transitionStartStyle);
|
|
143
142
|
strongThis->scheduleOrActivateTransition(transition);
|
|
144
143
|
}
|
|
145
144
|
};
|
|
146
145
|
}
|
|
147
146
|
|
|
147
|
+
void CSSTransitionsRegistry::updateInUpdatesRegistry(
|
|
148
|
+
const std::shared_ptr<CSSTransition> &transition,
|
|
149
|
+
const folly::dynamic &updates) {
|
|
150
|
+
const auto &shadowNode = transition->getShadowNode();
|
|
151
|
+
const auto &lastUpdates = getUpdatesFromRegistry(shadowNode->getTag());
|
|
152
|
+
const auto &transitionProperties = transition->getProperties();
|
|
153
|
+
|
|
154
|
+
folly::dynamic filteredUpdates = folly::dynamic::object;
|
|
155
|
+
|
|
156
|
+
if (!transitionProperties.has_value()) {
|
|
157
|
+
// If transitionProperty is set to 'all' (optional has no value), we have
|
|
158
|
+
// to keep the result of the previous transition updated with the new
|
|
159
|
+
// transition starting values
|
|
160
|
+
if (!lastUpdates.empty()) {
|
|
161
|
+
filteredUpdates = lastUpdates;
|
|
162
|
+
}
|
|
163
|
+
} else if (!lastUpdates.empty()) {
|
|
164
|
+
// Otherwise, we keep only allowed properties from the last updates
|
|
165
|
+
// and update the object with the new transition starting values
|
|
166
|
+
for (const auto &prop : transitionProperties.value()) {
|
|
167
|
+
if (lastUpdates.count(prop)) {
|
|
168
|
+
filteredUpdates[prop] = lastUpdates[prop];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// updates object contains only allowed properties so we don't need
|
|
174
|
+
// to do additional filtering here
|
|
175
|
+
filteredUpdates.update(updates);
|
|
176
|
+
setInUpdatesRegistry(shadowNode, filteredUpdates);
|
|
177
|
+
}
|
|
178
|
+
|
|
148
179
|
} // namespace reanimated::css
|
|
@@ -48,6 +48,9 @@ class CSSTransitionsRegistry
|
|
|
48
48
|
void scheduleOrActivateTransition(
|
|
49
49
|
const std::shared_ptr<CSSTransition> &transition);
|
|
50
50
|
PropsObserver createPropsObserver(Tag viewTag);
|
|
51
|
+
void updateInUpdatesRegistry(
|
|
52
|
+
const std::shared_ptr<CSSTransition> &transition,
|
|
53
|
+
const folly::dynamic &updates);
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
} // namespace reanimated::css
|
|
@@ -61,7 +61,8 @@ ShadowNode::Unshared cloneShadowTreeWithNewPropsRecursive(
|
|
|
61
61
|
return shadowNode.clone(
|
|
62
62
|
{mergeProps(shadowNode, propsMap, *family),
|
|
63
63
|
std::make_shared<ShadowNode::ListOfShared>(children),
|
|
64
|
-
shadowNode.getState()
|
|
64
|
+
shadowNode.getState(),
|
|
65
|
+
false});
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
RootShadowNode::Unshared cloneShadowTreeWithNewProps(
|
|
@@ -20,16 +20,12 @@ folly::dynamic UpdatesRegistry::get(const Tag tag) const {
|
|
|
20
20
|
return it->second.second;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
void UpdatesRegistry::flushUpdates(
|
|
24
|
-
UpdatesBatch &updatesBatch,
|
|
25
|
-
const bool merge) {
|
|
26
|
-
std::lock_guard<std::mutex> lock{mutex_};
|
|
27
|
-
|
|
23
|
+
void UpdatesRegistry::flushUpdates(UpdatesBatch &updatesBatch) {
|
|
28
24
|
auto copiedUpdatesBatch = std::move(updatesBatch_);
|
|
29
25
|
updatesBatch_.clear();
|
|
30
26
|
|
|
31
27
|
// Store all updates in the registry for later use in the commit hook
|
|
32
|
-
flushUpdatesToRegistry(copiedUpdatesBatch
|
|
28
|
+
flushUpdatesToRegistry(copiedUpdatesBatch);
|
|
33
29
|
// Flush the updates to the updatesBatch used to apply current changes
|
|
34
30
|
for (auto &[shadowNode, props] : copiedUpdatesBatch) {
|
|
35
31
|
updatesBatch.emplace_back(shadowNode, std::move(props));
|
|
@@ -86,14 +82,12 @@ void UpdatesRegistry::removeFromUpdatesRegistry(const Tag tag) {
|
|
|
86
82
|
updatesRegistry_.erase(tag);
|
|
87
83
|
}
|
|
88
84
|
|
|
89
|
-
void UpdatesRegistry::flushUpdatesToRegistry(
|
|
90
|
-
const UpdatesBatch &updatesBatch,
|
|
91
|
-
const bool merge) {
|
|
85
|
+
void UpdatesRegistry::flushUpdatesToRegistry(const UpdatesBatch &updatesBatch) {
|
|
92
86
|
for (auto &[shadowNode, props] : updatesBatch) {
|
|
93
87
|
const auto tag = shadowNode->getTag();
|
|
94
88
|
auto it = updatesRegistry_.find(tag);
|
|
95
89
|
|
|
96
|
-
if (it == updatesRegistry_.cend()
|
|
90
|
+
if (it == updatesRegistry_.cend()) {
|
|
97
91
|
updatesRegistry_[tag] = std::make_pair(shadowNode, props);
|
|
98
92
|
} else {
|
|
99
93
|
it->second.second.update(props);
|
|
@@ -45,7 +45,7 @@ class UpdatesRegistry {
|
|
|
45
45
|
void collectPropsToRevert(PropsToRevertMap &propsToRevertMap);
|
|
46
46
|
#endif
|
|
47
47
|
|
|
48
|
-
void flushUpdates(UpdatesBatch &updatesBatch
|
|
48
|
+
void flushUpdates(UpdatesBatch &updatesBatch);
|
|
49
49
|
void collectProps(PropsMap &propsMap);
|
|
50
50
|
|
|
51
51
|
protected:
|
|
@@ -64,7 +64,7 @@ class UpdatesRegistry {
|
|
|
64
64
|
private:
|
|
65
65
|
UpdatesBatch updatesBatch_;
|
|
66
66
|
|
|
67
|
-
void flushUpdatesToRegistry(const UpdatesBatch &updatesBatch
|
|
67
|
+
void flushUpdatesToRegistry(const UpdatesBatch &updatesBatch);
|
|
68
68
|
|
|
69
69
|
#ifdef ANDROID
|
|
70
70
|
PropsToRevertMap propsToRevertMap_;
|
|
@@ -475,7 +475,6 @@ void ReanimatedModuleProxy::applyCSSAnimations(
|
|
|
475
475
|
jsi::Runtime &rt,
|
|
476
476
|
const jsi::Value &shadowNodeWrapper,
|
|
477
477
|
const jsi::Value &animationUpdates) {
|
|
478
|
-
cssAnimationsRegistry_->lock();
|
|
479
478
|
auto shadowNode = shadowNodeFromValue(rt, shadowNodeWrapper);
|
|
480
479
|
const auto timestamp = getCssTimestamp();
|
|
481
480
|
const auto updates = parseCSSAnimationUpdates(rt, animationUpdates);
|
|
@@ -506,19 +505,22 @@ void ReanimatedModuleProxy::applyCSSAnimations(
|
|
|
506
505
|
}
|
|
507
506
|
}
|
|
508
507
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
508
|
+
{
|
|
509
|
+
auto lock = cssAnimationsRegistry_->lock();
|
|
510
|
+
cssAnimationsRegistry_->apply(
|
|
511
|
+
rt,
|
|
512
|
+
shadowNode,
|
|
513
|
+
updates.animationNames,
|
|
514
|
+
std::move(newAnimations),
|
|
515
|
+
updates.settingsUpdates,
|
|
516
|
+
timestamp);
|
|
517
|
+
}
|
|
516
518
|
|
|
517
519
|
maybeRunCSSLoop();
|
|
518
520
|
}
|
|
519
521
|
|
|
520
522
|
void ReanimatedModuleProxy::unregisterCSSAnimations(const jsi::Value &viewTag) {
|
|
521
|
-
cssAnimationsRegistry_->lock();
|
|
523
|
+
auto lock = cssAnimationsRegistry_->lock();
|
|
522
524
|
cssAnimationsRegistry_->remove(viewTag.asNumber());
|
|
523
525
|
}
|
|
524
526
|
|
|
@@ -526,7 +528,6 @@ void ReanimatedModuleProxy::registerCSSTransition(
|
|
|
526
528
|
jsi::Runtime &rt,
|
|
527
529
|
const jsi::Value &shadowNodeWrapper,
|
|
528
530
|
const jsi::Value &transitionConfig) {
|
|
529
|
-
cssTransitionsRegistry_->lock();
|
|
530
531
|
auto shadowNode = shadowNodeFromValue(rt, shadowNodeWrapper);
|
|
531
532
|
|
|
532
533
|
auto transition = std::make_shared<CSSTransition>(
|
|
@@ -534,7 +535,10 @@ void ReanimatedModuleProxy::registerCSSTransition(
|
|
|
534
535
|
parseCSSTransitionConfig(rt, transitionConfig),
|
|
535
536
|
viewStylesRepository_);
|
|
536
537
|
|
|
537
|
-
|
|
538
|
+
{
|
|
539
|
+
auto lock = cssTransitionsRegistry_->lock();
|
|
540
|
+
cssTransitionsRegistry_->add(transition);
|
|
541
|
+
}
|
|
538
542
|
maybeRunCSSLoop();
|
|
539
543
|
}
|
|
540
544
|
|
|
@@ -542,7 +546,7 @@ void ReanimatedModuleProxy::updateCSSTransition(
|
|
|
542
546
|
jsi::Runtime &rt,
|
|
543
547
|
const jsi::Value &viewTag,
|
|
544
548
|
const jsi::Value &configUpdates) {
|
|
545
|
-
cssTransitionsRegistry_->lock();
|
|
549
|
+
auto lock = cssTransitionsRegistry_->lock();
|
|
546
550
|
cssTransitionsRegistry_->updateSettings(
|
|
547
551
|
viewTag.asNumber(), parsePartialCSSTransitionConfig(rt, configUpdates));
|
|
548
552
|
maybeRunCSSLoop();
|
|
@@ -551,7 +555,7 @@ void ReanimatedModuleProxy::updateCSSTransition(
|
|
|
551
555
|
void ReanimatedModuleProxy::unregisterCSSTransition(
|
|
552
556
|
jsi::Runtime &rt,
|
|
553
557
|
const jsi::Value &viewTag) {
|
|
554
|
-
cssTransitionsRegistry_->lock();
|
|
558
|
+
auto lock = cssTransitionsRegistry_->lock();
|
|
555
559
|
cssTransitionsRegistry_->remove(viewTag.asNumber());
|
|
556
560
|
}
|
|
557
561
|
|
|
@@ -697,20 +701,23 @@ void ReanimatedModuleProxy::performOperations() {
|
|
|
697
701
|
|
|
698
702
|
if (shouldUpdateCssAnimations_) {
|
|
699
703
|
currentCssTimestamp_ = getAnimationTimestamp_();
|
|
700
|
-
|
|
704
|
+
auto lock = cssTransitionsRegistry_->lock();
|
|
701
705
|
// Update CSS transitions and flush updates
|
|
702
706
|
cssTransitionsRegistry_->update(currentCssTimestamp_);
|
|
703
|
-
cssTransitionsRegistry_->flushUpdates(updatesBatch
|
|
707
|
+
cssTransitionsRegistry_->flushUpdates(updatesBatch);
|
|
704
708
|
}
|
|
705
709
|
|
|
706
|
-
|
|
707
|
-
|
|
710
|
+
{
|
|
711
|
+
auto lock = animatedPropsRegistry_->lock();
|
|
712
|
+
// Flush all animated props updates
|
|
713
|
+
animatedPropsRegistry_->flushUpdates(updatesBatch);
|
|
714
|
+
}
|
|
708
715
|
|
|
709
716
|
if (shouldUpdateCssAnimations_) {
|
|
710
|
-
|
|
717
|
+
auto lock = cssAnimationsRegistry_->lock();
|
|
711
718
|
// Update CSS animations and flush updates
|
|
712
719
|
cssAnimationsRegistry_->update(currentCssTimestamp_);
|
|
713
|
-
cssAnimationsRegistry_->flushUpdates(updatesBatch
|
|
720
|
+
cssAnimationsRegistry_->flushUpdates(updatesBatch);
|
|
714
721
|
}
|
|
715
722
|
|
|
716
723
|
shouldUpdateCssAnimations_ = false;
|
|
@@ -780,7 +787,9 @@ void ReanimatedModuleProxy::commitUpdates(
|
|
|
780
787
|
for (auto const &[family, props] : propsMap) {
|
|
781
788
|
const auto surfaceId = family->getSurfaceId();
|
|
782
789
|
auto &propsVector = propsMapBySurface[surfaceId][family];
|
|
783
|
-
|
|
790
|
+
for (const auto &prop : props) {
|
|
791
|
+
propsVector.emplace_back(prop);
|
|
792
|
+
}
|
|
784
793
|
}
|
|
785
794
|
} else {
|
|
786
795
|
for (auto const &[shadowNode, props] : updatesBatch) {
|
|
@@ -834,7 +843,19 @@ void ReanimatedModuleProxy::dispatchCommand(
|
|
|
834
843
|
ShadowNode::Shared shadowNode = shadowNodeFromValue(rt, shadowNodeValue);
|
|
835
844
|
std::string commandName = stringFromValue(rt, commandNameValue);
|
|
836
845
|
folly::dynamic args = commandArgsFromValue(rt, argsValue);
|
|
837
|
-
uiManager_->
|
|
846
|
+
const auto &scheduler = static_cast<Scheduler *>(uiManager_->getDelegate());
|
|
847
|
+
|
|
848
|
+
if (!scheduler) {
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
const auto &schedulerDelegate = scheduler->getDelegate();
|
|
853
|
+
|
|
854
|
+
if (schedulerDelegate) {
|
|
855
|
+
const auto shadowView = ShadowView(*shadowNode);
|
|
856
|
+
schedulerDelegate->schedulerDidDispatchCommand(
|
|
857
|
+
shadowView, commandName, args);
|
|
858
|
+
}
|
|
838
859
|
}
|
|
839
860
|
|
|
840
861
|
jsi::String ReanimatedModuleProxy::obtainProp(
|
package/README.md
CHANGED
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
[![NPM Worklets publish [Nightly]](https://github.com/software-mansion/react-native-reanimated/actions/workflows/npm-worklets-publish-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/npm-worklets-publish-nightly.yml)
|
|
11
11
|
[![Lint clang-tidy [Nightly]](https://github.com/software-mansion/react-native-reanimated/actions/workflows/lint-clang-tidy-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/lint-clang-tidy-nightly.yml)
|
|
12
12
|
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml)
|
|
13
|
-
[![
|
|
13
|
+
[![Use frameworks Reanimated build check [Nightly]](https://github.com/software-mansion/react-native-reanimated/actions/workflows/use-frameworks-reanimated-build-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/use-frameworks-reanimated-build-check-nightly.yml)
|
|
14
14
|
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/react-native-nightly-reanimated-build-check-nightly.yml)
|
|
15
15
|
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/expo-devclient-build-check-nightly.yml)
|
|
16
16
|
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-typescript-compatibility-test-nightly.yml)
|
|
17
|
-
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/V8-reanimated-build-check-nightly.yml)
|
|
18
17
|
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/windows-hosted-app-reanimated-build-check-nightly.yml)
|
|
19
18
|
[](https://github.com/software-mansion/react-native-reanimated/actions/workflows/url-validation-nightly.yml)
|
|
20
19
|
|
|
20
|
+
<!-- TODO: Restore badge once V8 is supported. -->
|
|
21
|
+
<!-- [](https://github.com/software-mansion/react-native-reanimated/actions/workflows/V8-reanimated-build-check-nightly.yml) -->
|
|
22
|
+
|
|
21
23
|
## Installation
|
|
22
24
|
|
|
23
25
|
Check out the [installation](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started/#installation) section of our docs for the detailed installation instructions.
|