laymur-animations 0.1.3 → 0.1.4

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.
@@ -18,6 +18,7 @@ export declare class Animator {
18
18
  ease?: string;
19
19
  duration?: number;
20
20
  delay?: number;
21
+ opacity?: number;
21
22
  }): Promise<void>;
22
23
  static toggleSelect(targets: AnimatedElement | AnimatedElement[], options: {
23
24
  selected: boolean;
package/dist/index.js CHANGED
@@ -6077,7 +6077,7 @@ gsapWithCSS.core.Tween;
6077
6077
 
6078
6078
  class Animator {
6079
6079
  static appear(targets, options = {}) {
6080
- const { ease = "back.out(1.7)", duration = 0.5, delay = 0, scale = 0.8, } = options;
6080
+ const { ease = "back.out(1.7)", duration = 0.5, delay = 0, scale = 0.8, opacity = 1, } = options;
6081
6081
  const elements = Array.isArray(targets) ? targets : [targets];
6082
6082
  const targetMicro = Object.assign(Object.assign(Object.assign({ ease,
6083
6083
  duration }, (options.x && { x: 0 })), (options.y && { y: 0 })), (options.scale && { scaleX: 1, scaleY: 1 }));
@@ -6098,7 +6098,7 @@ class Animator {
6098
6098
  const timeline = gsapWithCSS.timeline({ onComplete: resolve, delay });
6099
6099
  for (const element of elements) {
6100
6100
  timeline
6101
- .to(element, { opacity: 1, ease: "power1.inOut", duration }, 0)
6101
+ .to(element, { opacity, ease: "power1.inOut", duration }, 0)
6102
6102
  .to(element.micro, targetMicro, 0);
6103
6103
  }
6104
6104
  });