Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yamada-ui/use-animation

Package Overview
Dependencies
Maintainers
0
Versions
937
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/use-animation - npm Package Compare versions

Comparing version 1.0.44 to 1.0.45-dev-20241202101535

6

dist/index.d.ts

@@ -20,5 +20,9 @@ import { AnimationStyle, Theme } from '@yamada-ui/core';

ref: React.RefObject<HTMLElement>;
/**
* @deprecated Use `open` instead
*/
isOpen: boolean;
open?: boolean;
}
declare const useAnimationObserver: ({ ref, isOpen, }: UseAnimationObserverProps) => {
declare const useAnimationObserver: ({ ref, isOpen, open, }: UseAnimationObserverProps) => {
present: boolean;

@@ -25,0 +29,0 @@ onAnimationComplete(): void;

14

dist/index.js

@@ -92,17 +92,19 @@ "use client"

ref,
isOpen
isOpen,
open
}) => {
const [mounted, setMounted] = (0, import_react.useState)(isOpen);
open != null ? open : open = isOpen;
const [mounted, setMounted] = (0, import_react.useState)(open);
const [flg, { on }] = (0, import_use_boolean.useBoolean)();
(0, import_react.useEffect)(() => {
if (flg) return;
setMounted(isOpen);
setMounted(open);
on();
}, [isOpen, flg, on]);
}, [open, flg, on]);
(0, import_use_event_listener.useEventListener)(
() => ref.current,
"animationend",
() => setMounted(isOpen)
() => setMounted(open)
);
const hidden = isOpen ? false : !mounted;
const hidden = open ? false : !mounted;
return {

@@ -109,0 +111,0 @@ present: !hidden,

{
"name": "@yamada-ui/use-animation",
"version": "1.0.44",
"version": "1.0.45-dev-20241202101535",
"description": "Yamada UI useAnimation custom hook",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc