@frybynite/image-cloud 0.7.3 → 0.7.5

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
@@ -166,6 +166,15 @@ export declare interface BouncePathConfig {
166
166
 
167
167
  export declare type BouncePreset = 'energetic' | 'playful' | 'subtle';
168
168
 
169
+ declare interface ClipPathConfig {
170
+ shape: ClipPathShape;
171
+ mode?: ClipPathMode;
172
+ }
173
+
174
+ declare type ClipPathMode = 'percent' | 'height-relative';
175
+
176
+ declare type ClipPathShape = 'circle' | 'square' | 'triangle' | 'pentagon' | 'hexagon' | 'octagon' | 'diamond';
177
+
169
178
  export declare interface ClusterAlgorithmConfig {
170
179
  clusterCount: number | 'auto';
171
180
  clusterSpread: number;
@@ -732,7 +741,6 @@ declare class ImageCloud {
732
741
  private queueInterval;
733
742
  private loadGeneration;
734
743
  private defaultStyles;
735
- private hoverStyles;
736
744
  private defaultClassName;
737
745
  private hoverClassName;
738
746
  private animationEngine;
@@ -970,6 +978,7 @@ declare interface ImageStyleState {
970
978
  outline?: OutlineConfig;
971
979
  objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
972
980
  aspectRatio?: string;
981
+ clipPath?: ClipPathShape | string | ClipPathConfig;
973
982
  }
974
983
 
975
984
  declare interface ImageStylingConfig {
@@ -1508,9 +1517,7 @@ export declare class ZoomEngine {
1508
1517
  private outgoing;
1509
1518
  private incoming;
1510
1519
  private focusGeneration;
1511
- private defaultStyles;
1512
- private focusedStyles;
1513
- private defaultClassName;
1520
+ private styling?;
1514
1521
  private focusedClassName;
1515
1522
  constructor(config: FocusInteractionConfig, animationEngine: AnimationEngine, styling?: ImageStylingConfig);
1516
1523
  /**
@@ -1546,12 +1553,19 @@ export declare class ZoomEngine {
1546
1553
  private animateWithDimensions;
1547
1554
  /**
1548
1555
  * Apply focused styling to an element
1556
+ * Applies non-clip-path styles immediately, clip-path will be updated during animation via startClipPathAnimation
1549
1557
  */
1550
1558
  private applyFocusedStyling;
1551
1559
  /**
1552
1560
  * Remove focused styling from an element
1561
+ * Removes classes and z-index, clip-path will be updated during animation via startClipPathAnimation
1553
1562
  */
1554
1563
  private removeFocusedStyling;
1564
+ /**
1565
+ * Continuously update clip-path during animation based on current element dimensions
1566
+ * This ensures clip-path changes smoothly as width/height animate
1567
+ */
1568
+ private startClipPathAnimation;
1555
1569
  /**
1556
1570
  * Start focus animation for an image using dimension-based zoom
1557
1571
  * Animates actual width/height for sharper rendering instead of transform scale
package/dist/react.d.ts CHANGED
@@ -166,6 +166,15 @@ export declare interface BouncePathConfig {
166
166
 
167
167
  export declare type BouncePreset = 'energetic' | 'playful' | 'subtle';
168
168
 
169
+ declare interface ClipPathConfig {
170
+ shape: ClipPathShape;
171
+ mode?: ClipPathMode;
172
+ }
173
+
174
+ declare type ClipPathMode = 'percent' | 'height-relative';
175
+
176
+ declare type ClipPathShape = 'circle' | 'square' | 'triangle' | 'pentagon' | 'hexagon' | 'octagon' | 'diamond';
177
+
169
178
  export declare interface ClusterAlgorithmConfig {
170
179
  clusterCount: number | 'auto';
171
180
  clusterSpread: number;
@@ -732,7 +741,6 @@ declare class ImageCloud {
732
741
  private queueInterval;
733
742
  private loadGeneration;
734
743
  private defaultStyles;
735
- private hoverStyles;
736
744
  private defaultClassName;
737
745
  private hoverClassName;
738
746
  private animationEngine;
@@ -970,6 +978,7 @@ declare interface ImageStyleState {
970
978
  outline?: OutlineConfig;
971
979
  objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
972
980
  aspectRatio?: string;
981
+ clipPath?: ClipPathShape | string | ClipPathConfig;
973
982
  }
974
983
 
975
984
  declare interface ImageStylingConfig {
@@ -1508,9 +1517,7 @@ export declare class ZoomEngine {
1508
1517
  private outgoing;
1509
1518
  private incoming;
1510
1519
  private focusGeneration;
1511
- private defaultStyles;
1512
- private focusedStyles;
1513
- private defaultClassName;
1520
+ private styling?;
1514
1521
  private focusedClassName;
1515
1522
  constructor(config: FocusInteractionConfig, animationEngine: AnimationEngine, styling?: ImageStylingConfig);
1516
1523
  /**
@@ -1546,12 +1553,19 @@ export declare class ZoomEngine {
1546
1553
  private animateWithDimensions;
1547
1554
  /**
1548
1555
  * Apply focused styling to an element
1556
+ * Applies non-clip-path styles immediately, clip-path will be updated during animation via startClipPathAnimation
1549
1557
  */
1550
1558
  private applyFocusedStyling;
1551
1559
  /**
1552
1560
  * Remove focused styling from an element
1561
+ * Removes classes and z-index, clip-path will be updated during animation via startClipPathAnimation
1553
1562
  */
1554
1563
  private removeFocusedStyling;
1564
+ /**
1565
+ * Continuously update clip-path during animation based on current element dimensions
1566
+ * This ensures clip-path changes smoothly as width/height animate
1567
+ */
1568
+ private startClipPathAnimation;
1555
1569
  /**
1556
1570
  * Start focus animation for an image using dimension-based zoom
1557
1571
  * Animates actual width/height for sharper rendering instead of transform scale