react-spring-carousel 3.0.0-beta003 → 3.0.0-beta005

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.
@@ -1,7 +1,7 @@
1
- import { FullGestureState } from "@use-gesture/react";
2
- import { SlideActionType, SlideMode } from "../types/common";
1
+ import { FullGestureState } from '@use-gesture/react';
2
+ import { SlideActionType, SlideMode } from '../types/common';
3
3
  declare type OnSlideStartChange = {
4
- eventName: "onSlideStartChange";
4
+ eventName: 'onSlideStartChange';
5
5
  slideActionType: SlideActionType;
6
6
  slideMode: SlideMode;
7
7
  nextItem: {
@@ -12,7 +12,7 @@ declare type OnSlideStartChange = {
12
12
  };
13
13
  };
14
14
  declare type OnSlideChange = {
15
- eventName: "onSlideChange";
15
+ eventName: 'onSlideChange';
16
16
  slideActionType: SlideActionType;
17
17
  slideMode: SlideMode;
18
18
  currentItem: {
@@ -23,11 +23,11 @@ declare type OnSlideChange = {
23
23
  };
24
24
  };
25
25
  declare type OnFullscreenChange = {
26
- eventName: "onFullscreenChange";
26
+ eventName: 'onFullscreenChange';
27
27
  isFullscreen: boolean;
28
28
  };
29
- declare type OnDrag = Omit<FullGestureState<"drag">, "event"> & {
30
- eventName: "onDrag";
29
+ declare type OnDrag = Omit<FullGestureState<'drag'>, 'event'> & {
30
+ eventName: 'onDrag';
31
31
  slideActionType: SlideActionType;
32
32
  };
33
33
  declare type Events = OnSlideStartChange | OnSlideChange | OnDrag | OnFullscreenChange;
@@ -1,5 +1,5 @@
1
- import { MutableRefObject } from "react";
2
- import { EmitEvent } from "./useEventsModule";
1
+ import { MutableRefObject } from 'react';
2
+ import { EmitEvent } from './useEventsModule';
3
3
  declare type FullscreenModule = {
4
4
  mainCarouselWrapperRef: MutableRefObject<HTMLDivElement | null>;
5
5
  emitEvent: EmitEvent;
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { SpringCarouselWithThumbs, PrepareThumbsData } from "src/types/internals";
2
+ import { SpringCarouselWithThumbs, PrepareThumbsData } from 'src/types/internals';
3
3
  declare type Props = {
4
4
  withThumbs?: boolean;
5
- thumbsSlideAxis: SpringCarouselWithThumbs["thumbsSlideAxis"];
5
+ thumbsSlideAxis: SpringCarouselWithThumbs['thumbsSlideAxis'];
6
6
  prepareThumbsData?: PrepareThumbsData;
7
- items: SpringCarouselWithThumbs["items"];
7
+ items: SpringCarouselWithThumbs['items'];
8
8
  };
9
9
  export declare function useThumbsModule({ thumbsSlideAxis, withThumbs, prepareThumbsData, items, }: Props): {
10
10
  thumbsFragment: JSX.Element | null;
@@ -1,2 +1,2 @@
1
- export declare type SlideActionType = "prev" | "next" | "initial";
2
- export declare type SlideMode = "drag" | "click" | "initial";
1
+ export declare type SlideActionType = 'prev' | 'next' | 'initial';
2
+ export declare type SlideMode = 'drag' | 'click' | 'initial';
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import { ReactNode } from 'react';
2
2
  export declare type ItemWithThumb = {
3
3
  id: string;
4
4
  renderItem: ReactNode;
@@ -1,10 +1,10 @@
1
- import { ReactNode } from "react";
2
- import { ItemWithThumb, ItemWithNoThumb } from "./";
3
- import { UseListenToCustomEvent } from "../modules/useEventsModule";
1
+ import { ReactNode } from 'react';
2
+ import { ItemWithThumb, ItemWithNoThumb } from './';
3
+ import { UseListenToCustomEvent } from '../modules/useEventsModule';
4
4
  export declare type UseSpringReturnType = {
5
5
  carouselFragment: ReactNode;
6
6
  thumbsFragment: ReactNode;
7
- useListenToCustomEvent: UseListenToCustomEvent["useListenToCustomEvent"];
7
+ useListenToCustomEvent: UseListenToCustomEvent['useListenToCustomEvent'];
8
8
  getIsFullscreen(): boolean;
9
9
  getIsPrevItem(id: string): boolean;
10
10
  getIsNextItem(id: string): boolean;
@@ -15,10 +15,10 @@ export declare type UseSpringReturnType = {
15
15
  slideToItem(item: string | number): void;
16
16
  getIsActiveItem(id: string): boolean;
17
17
  };
18
- export declare type PrepareThumbsData = (items: Omit<ItemWithThumb, "renderItem">[]) => Omit<ItemWithThumb, "renderItem">[];
18
+ export declare type PrepareThumbsData = (items: Omit<ItemWithThumb, 'renderItem'>[]) => Omit<ItemWithThumb, 'renderItem'>[];
19
19
  export declare type SpringCarouselWithThumbs = {
20
20
  withThumbs: true;
21
- thumbsSlideAxis?: "x" | "y";
21
+ thumbsSlideAxis?: 'x' | 'y';
22
22
  items: ItemWithThumb[];
23
23
  prepareThumbsData?: PrepareThumbsData;
24
24
  };
@@ -29,14 +29,14 @@ export declare type SpringCarouselWithNoThumbs = {
29
29
  prepareThumbsData?: never;
30
30
  };
31
31
  export declare type SpringCarouselWithFixedItems = {
32
- slideType?: "fixed";
32
+ slideType?: 'fixed';
33
33
  itemsPerSlide?: number;
34
34
  startEndGutter?: number;
35
- initialStartingPosition?: "start" | "center" | "end";
35
+ initialStartingPosition?: 'start' | 'center' | 'end';
36
36
  initialActiveItem?: number;
37
37
  };
38
38
  export declare type SpringCarouselWithNoFixedItems = {
39
- slideType?: "fluid";
39
+ slideType?: 'fluid';
40
40
  startEndGutter?: never;
41
41
  initialStartingPosition?: never;
42
42
  initialActiveItem?: never;
@@ -57,13 +57,13 @@ export declare type SpringCarouselFreeScroll = {
57
57
  export declare type SpringCarouselNoFreeScroll = {
58
58
  freeScroll?: never;
59
59
  withLoop?: boolean;
60
- slideType?: "fixed" | "fluid";
60
+ slideType?: 'fixed' | 'fluid';
61
61
  enableFreeScrollDrag?: never;
62
62
  };
63
63
  export declare type BaseProps = {
64
64
  init?: boolean;
65
65
  gutter?: number;
66
- carouselSlideAxis?: "x" | "y";
66
+ carouselSlideAxis?: 'x' | 'y';
67
67
  draggingSlideTreshold?: number;
68
68
  slideWhenThresholdIsReached?: boolean;
69
69
  disableGestures?: boolean;
@@ -73,10 +73,10 @@ export declare type UseSpringCarouselWithNoThumbs = BaseProps & SpringCarouselWi
73
73
  export declare type UseSpringCarouselWithFixedItems = BaseProps & (SpringCarouselWithThumbs | SpringCarouselWithNoThumbs) & SpringCarouselWithFixedItems & (SpringCarouselWithLoop | SpringCarouselWithNoLoop) & (SpringCarouselFreeScroll | SpringCarouselNoFreeScroll);
74
74
  export declare type UseSpringCarouselWithNoFixedItems = BaseProps & (SpringCarouselWithThumbs | SpringCarouselWithNoThumbs) & SpringCarouselWithNoFixedItems & (SpringCarouselWithLoop | SpringCarouselWithNoLoop) & (SpringCarouselFreeScroll | SpringCarouselNoFreeScroll);
75
75
  export declare type UseSpringCarouselComplete = BaseProps & {
76
- thumbsSlideAxis?: "x" | "y";
76
+ thumbsSlideAxis?: 'x' | 'y';
77
77
  itemsPerSlide?: number;
78
78
  startEndGutter?: number;
79
- initialStartingPosition?: "start" | "center" | "end";
79
+ initialStartingPosition?: 'start' | 'center' | 'end';
80
80
  prepareThumbsData?: PrepareThumbsData;
81
81
  initialActiveItem?: number;
82
82
  } & (SpringCarouselWithThumbs | SpringCarouselWithNoThumbs) & (SpringCarouselWithFixedItems | SpringCarouselWithNoFixedItems) & (SpringCarouselWithLoop | SpringCarouselWithNoLoop) & (SpringCarouselFreeScroll | SpringCarouselNoFreeScroll);
@@ -1,4 +1,4 @@
1
- import { UseSpringReturnType, UseSpringCarouselWithThumbs, UseSpringCarouselWithNoThumbs, UseSpringCarouselWithFixedItems, UseSpringCarouselWithNoFixedItems } from "./types/internals";
1
+ import { UseSpringReturnType, UseSpringCarouselWithThumbs, UseSpringCarouselWithNoThumbs, UseSpringCarouselWithFixedItems, UseSpringCarouselWithNoFixedItems } from './types/internals';
2
2
  declare function useSpringCarousel(props: UseSpringCarouselWithThumbs): UseSpringReturnType;
3
3
  declare function useSpringCarousel(props: UseSpringCarouselWithNoThumbs): UseSpringReturnType;
4
4
  declare function useSpringCarousel(props: UseSpringCarouselWithFixedItems): UseSpringReturnType;