import { VNode } from 'vue'; import { LazyLoadType, PlayingType, SlideNavigation, SwipeDirection, WidthDetection } from '.'; import { Combine, MarkRequiredAndPartialKeysWithPartialBase, MarkRequiredWithPartialBase } from './helpers'; import { default as VSlickCarousel } from '../components/VSlickCarousel.vue'; export type Props = { accessibility: boolean; adaptiveHeight: boolean; arrows: boolean; asNavFor?: object; autoplay: boolean; autoplaySpeed: number; centerMode: boolean; centerPadding: string; cssEase: string; dots: boolean; draggable: boolean; edgeFriction: number; fade: boolean; focusOnSelect: boolean; ignorePrefersReducedMotion: boolean; infinite: boolean; infiniteLoopOnEdge: boolean; initialGroupIndex: number; lazyLoad?: LazyLoadType | keyof typeof LazyLoadType; nextArrowLabel?: string; pauseOnDotsHover: boolean; pauseOnFocus: boolean; pauseOnHover: boolean; prevArrowLabel?: string; responsiveBehavior: 'mobile-first' | 'desktop-first'; responsive: Responsive[]; rtl: boolean; slidesPerGroup: number; groupsToScroll: number; groupsToShow: number; speed: number; swipe: boolean; swipeToSlide: boolean; touchMove: boolean; touchThreshold: number; unslick: boolean; useCSSTransitions: boolean; useCSSTransform: boolean; variableWidth: boolean; vertical: boolean; verticalSwiping: boolean; waitForAnimate: boolean; widthDetection: WidthDetection | keyof typeof WidthDetection; }; export type Responsive = { breakpoint: number; settings: Partial>; }; export type TouchObject = { startX: number; startY: number; curX: number; curY: number; swipeLength: number; }; export type SliderState = { animating: boolean; autoplaying: null | PlayingType | keyof typeof PlayingType; autoplayTimer: null | NodeJS.Timeout; currentDirection: number; currentLeft: null | number; currentSlideGroupIndex: number; detectingWidth: boolean; direction: number; dragging: boolean; edgeDragged: boolean; initialized: boolean; lazyLoadedList: number[]; listHeight?: number; listWidth?: number; scrolling: boolean; slideGroupHeight?: number | string; slideGroupWidth?: number | string; swipeLeft?: number; swiped: boolean; swiping: boolean; touchObject: TouchObject; trackStyle: object; trackWidth: number; }; export type SliderSpec = Props & SliderState & { slideGroupCount: number; trackEl: HTMLElement; listEl: HTMLElement; }; export type TrackProps = Pick & Pick & { slideGroupCount: number; rawSlideGroups: VNode[][]; }; export type ArrowProps = Pick & Pick & { slideGroupCount: number; type: SlideNavigation; } & { disabled: boolean; }; export type DotsProps = Pick & Pick & { slideGroupCount: number; pageCount: number; }; export type ArrowSlotProps = { currentSlideGroupIndex: number; slideGroupCount: number; disabled: boolean; onClick: () => void; }; export type DotClickPayload = { index: number; groupsToScroll: number; }; export type ChildClickPayload = { index: number; }; export type IndexPayload = { index: number; }; export type CloneSlideOptions = { key: string; class: string[]; attrs: Record; style: Record; groupIndex: number; }; export type SwipeEvent = TouchEvent | MouseEvent; export type SwipeEndSpec = Combine, TrackInfoSpec> & { swipeToSlide: boolean; onSwipe?: (swipeDirection: string) => void; }; export type SwipeEndState = { dragging: boolean; edgeDragged: boolean; scrolling: boolean; swiping: boolean; swiped: boolean; swipeLeft: number | null; touchObject: TouchObject | object; triggerSlideGroupHandler?: number; currentDirection?: number; trackStyle?: object; }; export type Settings = Partial; export type SlideGroupChangeOptions = { message: SlideNavigation | 'dots' | 'children' | 'index'; index?: number; }; export type SlideGroupChangeSpec = MarkRequiredWithPartialBase & { pivotSlideGroupIndices: number[]; currentPage: number; }; export type TrackInfoSpec = MarkRequiredWithPartialBase; export type OnSlideSpec = Combine> & { index: number; canGoNext: boolean; }; export type VSlickCarouselInstance = InstanceType; export type SlideGroupCountSpec = MarkRequiredWithPartialBase; export type NavigableSpec = MarkRequiredWithPartialBase; export type SwipeMoveSpec = Combine, TrackInfoSpec> & { swipeEvent?: (swipeDirection: SwipeDirection | keyof typeof SwipeDirection) => void; onEdge?: (swipeDirection: SwipeDirection | keyof typeof SwipeDirection) => void; canGoNext: boolean; }; export type LazyInfoSpec = MarkRequiredWithPartialBase; export type CloneInfoSpec = MarkRequiredWithPartialBase; export type SwipeMoveState = { scrolling?: boolean; touchObject?: TouchObject; swipeLeft?: number; trackStyle?: object; edgeDragged?: boolean; swiped?: boolean; swiping?: boolean; swipeDirection?: SwipeDirection | keyof typeof SwipeDirection; }; export type SliderStateInfoSpec = MarkRequiredAndPartialKeysWithPartialBase & { slides: VNode[]; }; export type SlideGroup = { slides: VNode[]; key: string; class?: string[]; style?: Record; attrs?: Record; onClick?: () => void; };