@frybynite/image-cloud 0.8.3 → 0.9.1

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/dist/index.d.ts CHANGED
@@ -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 {
@@ -130,7 +131,6 @@ declare interface AnimationPerformanceConfig {
130
131
  declare interface AnimationQueueConfig {
131
132
  enabled: boolean;
132
133
  interval: number;
133
- maxConcurrent?: number;
134
134
  }
135
135
 
136
136
  /**
@@ -721,6 +721,52 @@ declare interface HoneycombAlgorithmConfig {
721
721
  spacing?: number;
722
722
  }
723
723
 
724
+ declare interface IdleAnimationConfig {
725
+ type: IdleAnimationType;
726
+ wiggle?: IdleWiggleConfig;
727
+ pulse?: IdlePulseConfig;
728
+ blink?: IdleBlinkConfig;
729
+ spin?: IdleSpinConfig;
730
+ custom?: IdleCustomAnimationFn;
731
+ startDelay?: number;
732
+ }
733
+
734
+ declare type IdleAnimationType = 'wiggle' | 'pulse' | 'blink' | 'spin' | 'custom' | 'none';
735
+
736
+ declare interface IdleBlinkConfig {
737
+ onRatio: number;
738
+ speed: number;
739
+ style: 'snap' | 'fade';
740
+ }
741
+
742
+ declare type IdleCustomAnimationFn = (ctx: IdleCustomContext) => Animation | (() => void);
743
+
744
+ declare interface IdleCustomContext {
745
+ element: HTMLElement;
746
+ index: number;
747
+ totalImages: number;
748
+ }
749
+
750
+ declare interface IdlePulseConfig {
751
+ minScale: number;
752
+ maxScale: number;
753
+ speed: number;
754
+ sync: IdleSyncMode;
755
+ }
756
+
757
+ declare interface IdleSpinConfig {
758
+ speed: number;
759
+ direction: 'clockwise' | 'counterclockwise';
760
+ }
761
+
762
+ declare type IdleSyncMode = 'together' | 'random';
763
+
764
+ declare interface IdleWiggleConfig {
765
+ maxAngle: number;
766
+ speed: number;
767
+ sync: IdleSyncMode;
768
+ }
769
+
724
770
  /**
725
771
  * ImageFilter interface for filtering images by extension
726
772
  * Implemented by the ImageFilter class in loaders/ImageFilter.ts
@@ -749,6 +795,7 @@ declare class ImageCloud {
749
795
  private hoverClassName;
750
796
  private animationEngine;
751
797
  private entryAnimationEngine;
798
+ private idleAnimationEngine;
752
799
  private layoutEngine;
753
800
  private zoomEngine;
754
801
  private swipeEngine;
@@ -1010,6 +1057,7 @@ declare interface InteractionConfig {
1010
1057
  focus: FocusInteractionConfig;
1011
1058
  navigation?: NavigationInteractionConfig;
1012
1059
  gestures?: GestureInteractionConfig;
1060
+ disableDragging?: boolean;
1013
1061
  }
1014
1062
 
1015
1063
  export declare type LayoutAlgorithm = 'random' | 'radial' | 'grid' | 'spiral' | 'cluster' | 'wave' | 'honeycomb';
@@ -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
  */
package/dist/react.d.ts CHANGED
@@ -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 {
@@ -130,7 +131,6 @@ declare interface AnimationPerformanceConfig {
130
131
  declare interface AnimationQueueConfig {
131
132
  enabled: boolean;
132
133
  interval: number;
133
- maxConcurrent?: number;
134
134
  }
135
135
 
136
136
  /**
@@ -721,6 +721,52 @@ declare interface HoneycombAlgorithmConfig {
721
721
  spacing?: number;
722
722
  }
723
723
 
724
+ declare interface IdleAnimationConfig {
725
+ type: IdleAnimationType;
726
+ wiggle?: IdleWiggleConfig;
727
+ pulse?: IdlePulseConfig;
728
+ blink?: IdleBlinkConfig;
729
+ spin?: IdleSpinConfig;
730
+ custom?: IdleCustomAnimationFn;
731
+ startDelay?: number;
732
+ }
733
+
734
+ declare type IdleAnimationType = 'wiggle' | 'pulse' | 'blink' | 'spin' | 'custom' | 'none';
735
+
736
+ declare interface IdleBlinkConfig {
737
+ onRatio: number;
738
+ speed: number;
739
+ style: 'snap' | 'fade';
740
+ }
741
+
742
+ declare type IdleCustomAnimationFn = (ctx: IdleCustomContext) => Animation | (() => void);
743
+
744
+ declare interface IdleCustomContext {
745
+ element: HTMLElement;
746
+ index: number;
747
+ totalImages: number;
748
+ }
749
+
750
+ declare interface IdlePulseConfig {
751
+ minScale: number;
752
+ maxScale: number;
753
+ speed: number;
754
+ sync: IdleSyncMode;
755
+ }
756
+
757
+ declare interface IdleSpinConfig {
758
+ speed: number;
759
+ direction: 'clockwise' | 'counterclockwise';
760
+ }
761
+
762
+ declare type IdleSyncMode = 'together' | 'random';
763
+
764
+ declare interface IdleWiggleConfig {
765
+ maxAngle: number;
766
+ speed: number;
767
+ sync: IdleSyncMode;
768
+ }
769
+
724
770
  /**
725
771
  * ImageFilter interface for filtering images by extension
726
772
  * Implemented by the ImageFilter class in loaders/ImageFilter.ts
@@ -749,6 +795,7 @@ declare class ImageCloud {
749
795
  private hoverClassName;
750
796
  private animationEngine;
751
797
  private entryAnimationEngine;
798
+ private idleAnimationEngine;
752
799
  private layoutEngine;
753
800
  private zoomEngine;
754
801
  private swipeEngine;
@@ -1010,6 +1057,7 @@ declare interface InteractionConfig {
1010
1057
  focus: FocusInteractionConfig;
1011
1058
  navigation?: NavigationInteractionConfig;
1012
1059
  gestures?: GestureInteractionConfig;
1060
+ disableDragging?: boolean;
1013
1061
  }
1014
1062
 
1015
1063
  export declare type LayoutAlgorithm = 'random' | 'radial' | 'grid' | 'spiral' | 'cluster' | 'wave' | 'honeycomb';
@@ -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
  */