@hilux/ngx-motion 2.6.0 → 2.7.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.
package/package.json CHANGED
@@ -52,5 +52,5 @@
52
52
  "default": "./package.json"
53
53
  }
54
54
  },
55
- "version": "2.6.0"
55
+ "version": "2.7.0"
56
56
  }
@@ -412,11 +412,12 @@ export declare class MotionOneDirective implements OnInit, OnDestroy, OnChanges,
412
412
  damping?: number;
413
413
  };
414
414
  offset: string;
415
- whileHover: VariantWithTransition;
415
+ /** A style object, or a variant name: children with that variant animate too. */
416
+ whileHover: VariantWithTransition | string;
416
417
  staggerChildren: number;
417
418
  staggerDirection: number;
418
- whileTap: VariantWithTransition;
419
- whileFocus: VariantWithTransition;
419
+ whileTap: VariantWithTransition | string;
420
+ whileFocus: VariantWithTransition | string;
420
421
  whileInView: VariantWithTransition;
421
422
  runInView?: 'never' | 'once' | 'always';
422
423
  variants: {
@@ -522,6 +523,38 @@ export declare class MotionOneDirective implements OnInit, OnDestroy, OnChanges,
522
523
  */
523
524
  private syncGestureListeners;
524
525
  private hasKeys;
526
+ /** Where this element rests when a gesture ends: its animate state, else its initial one. */
527
+ private restingState;
528
+ /** Values from before any gesture changed them, for keys the resting state doesn't set. */
529
+ private gestureBase;
530
+ /** Remember what a gesture is about to change, if nothing else says where it rests. */
531
+ private captureGestureBase;
532
+ /**
533
+ * Where to go when a gesture ends: the resting state, plus (as in Framer
534
+ * Motion) neutral transforms and the earlier values of any other style the
535
+ * gesture changed. Without this, an element with only whileHover stayed in
536
+ * its hover state.
537
+ */
538
+ private restTarget;
539
+ /** Gestures in progress on this element. */
540
+ private readonly activeGestures;
541
+ /** The gesture that shows: tap over focus over hover, as in Framer Motion. */
542
+ private topGesture;
543
+ private asVariant;
544
+ /** Start a gesture; it only shows if no stronger gesture is on. */
545
+ private beginGesture;
546
+ /** End a gesture: fall back to one still on (hover under a released tap), else to rest. */
547
+ private endGesture;
548
+ /** A pending staggered start from a parent's gesture, cancelled if the gesture ends first. */
549
+ private gestureTimer;
550
+ /**
551
+ * Pass a gesture's variant name down the tree (Framer Motion's variant
552
+ * propagation): while the parent is hovered, tapped or focused, every
553
+ * descendant with a variant of that name animates to it, then returns to
554
+ * where it rests. The parent's variant transition can stagger them
555
+ * (staggerChildren, delayChildren, staggerDirection).
556
+ */
557
+ private propagateGesture;
525
558
  /**
526
559
  * Cancel running animations before writing reset styles. Motion's stop()
527
560
  * commits the current value on the next frame, which overwrote the reset