import { Direction } from '../enums'; import { MotionProperty } from '../observables'; import { ObservableWithMotionOperators, ScaleStyleStreams, TranslateStyleStreams } from '../types'; import { NumericSpring } from './NumericSpring'; import { Tossable } from './Tossable'; export declare enum SwipeState { NONE = "none", LEFT = "left", RIGHT = "right", } export declare type SwipeableArgs = { tossable: Tossable; width$: ObservableWithMotionOperators; }; export declare class Swipeable { static VISUAL_THRESHOLD: number; readonly iconSpring: NumericSpring; readonly backgroundSpring: NumericSpring; readonly swipeState$: MotionProperty; readonly direction$: ObservableWithMotionOperators; readonly isThresholdMet$: ObservableWithMotionOperators; readonly whenThresholdCrossed$: ObservableWithMotionOperators; readonly whenThresholdFirstCrossed$: ObservableWithMotionOperators; /** * If an item is swiped past the threshold, it will animate by its own width * + destinationMargin, in the direction of the swipe. * * This ensures that decoration that might overflow an item's bounds (like a * shadow) isn't visible when it's been swiped away. */ readonly destinationMargin$: MotionProperty; destinationMargin: number; readonly state$: ObservableWithMotionOperators; readonly tossable: Tossable; readonly width$: ObservableWithMotionOperators; readonly styleStreamsByTargetName: { item: TranslateStyleStreams; icon: ScaleStyleStreams; background: ScaleStyleStreams; }; constructor({tossable, width$}: SwipeableArgs); } export default Swipeable;