Blame view

天文台pc/tianwentai-ui/node_modules/framer-motion/dist/es/animation/hooks/use-animate-style.mjs 661 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  "use client";
  import { useConstant } from '../../utils/use-constant.mjs';
  import { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';
  import { createScopedWaapiAnimate } from '../animators/waapi/animate-style.mjs';
  
  function useAnimateMini() {
      const scope = useConstant(() => ({
          current: null, // Will be hydrated by React
          animations: [],
      }));
      const animate = useConstant(() => createScopedWaapiAnimate(scope));
      useUnmountEffect(() => {
          scope.animations.forEach((animation) => animation.stop());
      });
      return [scope, animate];
  }
  
  export { useAnimateMini };
  //# sourceMappingURL=use-animate-style.mjs.map