@frybynite/image-cloud 0.8.2 → 0.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.
@@ -13,6 +13,7 @@ export declare interface AnimationConfig {
13
13
  queue: AnimationQueueConfig;
14
14
  performance?: AnimationPerformanceConfig;
15
15
  entry?: EntryAnimationConfig;
16
+ idle?: IdleAnimationConfig;
16
17
  }
17
18
 
18
19
  declare interface AnimationEasingConfig {
@@ -721,6 +722,52 @@ declare interface HoneycombAlgorithmConfig {
721
722
  spacing?: number;
722
723
  }
723
724
 
725
+ declare interface IdleAnimationConfig {
726
+ type: IdleAnimationType;
727
+ wiggle?: IdleWiggleConfig;
728
+ pulse?: IdlePulseConfig;
729
+ blink?: IdleBlinkConfig;
730
+ spin?: IdleSpinConfig;
731
+ custom?: IdleCustomAnimationFn;
732
+ startDelay?: number;
733
+ }
734
+
735
+ declare type IdleAnimationType = 'wiggle' | 'pulse' | 'blink' | 'spin' | 'custom' | 'none';
736
+
737
+ declare interface IdleBlinkConfig {
738
+ onRatio: number;
739
+ speed: number;
740
+ style: 'snap' | 'fade';
741
+ }
742
+
743
+ declare type IdleCustomAnimationFn = (ctx: IdleCustomContext) => Animation | (() => void);
744
+
745
+ declare interface IdleCustomContext {
746
+ element: HTMLElement;
747
+ index: number;
748
+ totalImages: number;
749
+ }
750
+
751
+ declare interface IdlePulseConfig {
752
+ minScale: number;
753
+ maxScale: number;
754
+ speed: number;
755
+ sync: IdleSyncMode;
756
+ }
757
+
758
+ declare interface IdleSpinConfig {
759
+ speed: number;
760
+ direction: 'clockwise' | 'counterclockwise';
761
+ }
762
+
763
+ declare type IdleSyncMode = 'together' | 'random';
764
+
765
+ declare interface IdleWiggleConfig {
766
+ maxAngle: number;
767
+ speed: number;
768
+ sync: IdleSyncMode;
769
+ }
770
+
724
771
  /**
725
772
  * ImageFilter interface for filtering images by extension
726
773
  * Implemented by the ImageFilter class in loaders/ImageFilter.ts
@@ -749,6 +796,7 @@ declare class ImageCloud {
749
796
  private hoverClassName;
750
797
  private animationEngine;
751
798
  private entryAnimationEngine;
799
+ private idleAnimationEngine;
752
800
  private layoutEngine;
753
801
  private zoomEngine;
754
802
  private swipeEngine;
@@ -1528,7 +1576,12 @@ export declare class ZoomEngine {
1528
1576
  private focusGeneration;
1529
1577
  private styling?;
1530
1578
  private focusedClassName;
1579
+ private onUnfocusComplete;
1531
1580
  constructor(config: FocusInteractionConfig, animationEngine: AnimationEngine, styling?: ImageStylingConfig);
1581
+ /**
1582
+ * Set callback to be fired when an unfocus animation fully completes.
1583
+ */
1584
+ setOnUnfocusCompleteCallback(callback: ((element: HTMLElement) => void) | null): void;
1532
1585
  /**
1533
1586
  * Get current state machine state
1534
1587
  */