react-spring-carousel 1.9.29-beta10 → 1.9.29-beta100
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/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/{modules → types/modules}/index.d.ts +0 -0
- package/dist/types/modules/useCustomEventsModule.d.ts +5 -0
- package/dist/{modules → types/modules}/useFullscreenModule.d.ts +0 -0
- package/dist/{modules → types/modules}/useThumbsModule.d.ts +6 -5
- package/dist/types/types/index.d.ts +50 -0
- package/dist/types/types/useSpringCarousel.d.ts +124 -0
- package/dist/types/types/useTransitionCarousel.d.ts +39 -0
- package/dist/types/useSpringCarousel/index.d.ts +26 -0
- package/dist/{useTransitionCarousel.d.ts → types/useTransitionCarousel/index.d.ts} +6 -5
- package/dist/types/utils.d.ts +5 -0
- package/package.json +60 -49
- package/dist/index.d.ts +0 -5
- package/dist/index.es.js +0 -2
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -2
- package/dist/index.umd.js.map +0 -1
- package/dist/modules/useCustomEventsModule.d.ts +0 -5
- package/dist/types.d.ts +0 -170
- package/dist/useSpringCarousel.d.ts +0 -9
- package/dist/utils.d.ts +0 -4
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { FullGestureState } from '@use-gesture/react';
|
|
2
|
+
import { ReactSpringCarouselItemWithThumbs } from './useSpringCarousel';
|
|
3
|
+
export declare type PrepareThumbsData = (items: Omit<ReactSpringCarouselItemWithThumbs, 'renderItem'>[]) => Omit<ReactSpringCarouselItemWithThumbs, 'renderItem'>[];
|
|
4
|
+
export declare type SlideToItemFnProps = {
|
|
5
|
+
from?: number;
|
|
6
|
+
to?: number;
|
|
7
|
+
newIndex?: number;
|
|
8
|
+
immediate?: boolean;
|
|
9
|
+
customTo?: number;
|
|
10
|
+
onRest?(): void;
|
|
11
|
+
};
|
|
12
|
+
export declare type SlideActionType = 'initial' | 'prev' | 'next';
|
|
13
|
+
declare type OnSlideStartChange = {
|
|
14
|
+
eventName: 'onSlideStartChange';
|
|
15
|
+
slideActionType: SlideActionType;
|
|
16
|
+
nextItem: {
|
|
17
|
+
index: number;
|
|
18
|
+
id: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
declare type OnSlideChange = {
|
|
22
|
+
eventName: 'onSlideChange';
|
|
23
|
+
slideActionType: SlideActionType;
|
|
24
|
+
currentItem: {
|
|
25
|
+
index: number;
|
|
26
|
+
id: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
declare type OnDrag = Omit<FullGestureState<'drag'>, 'event'> & {
|
|
30
|
+
eventName: 'onDrag';
|
|
31
|
+
slideActionType: SlideActionType;
|
|
32
|
+
};
|
|
33
|
+
declare type OnFullscreenChange = {
|
|
34
|
+
eventName: 'onFullscreenChange';
|
|
35
|
+
isFullscreen: boolean;
|
|
36
|
+
};
|
|
37
|
+
declare type OnLeftSwipe = {
|
|
38
|
+
eventName: 'onLeftSwipe';
|
|
39
|
+
};
|
|
40
|
+
declare type OnRightSwipe = {
|
|
41
|
+
eventName: 'onRightSwipe';
|
|
42
|
+
};
|
|
43
|
+
export declare type UseSpringCarouselEventsObservableProps = OnSlideStartChange | OnSlideChange | OnDrag | OnFullscreenChange;
|
|
44
|
+
export declare type UseTransitionCarouselEventsObservableProps = OnSlideStartChange | OnSlideChange | OnFullscreenChange | OnLeftSwipe | OnRightSwipe;
|
|
45
|
+
declare type CombinedProps<T> = T extends 'use-spring' ? UseSpringCarouselEventsObservableProps : UseTransitionCarouselEventsObservableProps;
|
|
46
|
+
export declare type EmitObservableFn<T> = (data: CombinedProps<T>) => void;
|
|
47
|
+
export declare type ObservableCallbackFn<T> = (data: CombinedProps<T>) => void;
|
|
48
|
+
export declare type UseListenToCustomEvent<T> = (fn: ObservableCallbackFn<T>) => void;
|
|
49
|
+
export * from './useSpringCarousel';
|
|
50
|
+
export * from './useTransitionCarousel';
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
import { SpringConfig } from 'react-spring';
|
|
3
|
+
import { PrepareThumbsData, UseListenToCustomEvent } from './index';
|
|
4
|
+
export declare type UseSpringCarouselBaseProps = {
|
|
5
|
+
disableGestures?: boolean;
|
|
6
|
+
draggingSlideTreshold?: number;
|
|
7
|
+
springConfig?: SpringConfig;
|
|
8
|
+
carouselSlideAxis?: 'x' | 'y';
|
|
9
|
+
gutter?: number;
|
|
10
|
+
shouldResizeOnWindowResize?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Types based on withThums prop
|
|
14
|
+
*/
|
|
15
|
+
export declare type ReactSpringCarouselItem = {
|
|
16
|
+
id: string;
|
|
17
|
+
renderItem: ReactNode;
|
|
18
|
+
renderThumb?: never;
|
|
19
|
+
};
|
|
20
|
+
export declare type ReactSpringCarouselItemWithThumbs = {
|
|
21
|
+
id: string;
|
|
22
|
+
renderItem: ReactNode;
|
|
23
|
+
renderThumb: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
declare type UseSpringCarouselWithThumbs = {
|
|
26
|
+
withThumbs: true;
|
|
27
|
+
thumbsSlideAxis?: 'x' | 'y';
|
|
28
|
+
items: ReactSpringCarouselItemWithThumbs[];
|
|
29
|
+
enableThumbsWrapperScroll?: boolean;
|
|
30
|
+
CustomThumbsWrapperComponent?: React.FC<HTMLAttributes<HTMLElement>>;
|
|
31
|
+
prepareThumbsData?: PrepareThumbsData;
|
|
32
|
+
};
|
|
33
|
+
declare type UseSpringCarouselWithNoThumbs = {
|
|
34
|
+
withThumbs?: false;
|
|
35
|
+
thumbsSlideAxis?: never;
|
|
36
|
+
items: ReactSpringCarouselItem[];
|
|
37
|
+
enableThumbsWrapperScroll?: never;
|
|
38
|
+
CustomThumbsWrapperComponent?: never;
|
|
39
|
+
prepareThumbsData?: never;
|
|
40
|
+
};
|
|
41
|
+
export declare type ThumbsProps = UseSpringCarouselWithThumbs | UseSpringCarouselWithNoThumbs;
|
|
42
|
+
/**
|
|
43
|
+
* Types based on slideType
|
|
44
|
+
*/
|
|
45
|
+
declare type UseSpringCarouselFluidType = {
|
|
46
|
+
slideType: 'fluid';
|
|
47
|
+
slideAmount?: number;
|
|
48
|
+
itemsPerSlide?: never;
|
|
49
|
+
initialActiveItem?: never;
|
|
50
|
+
initialStartingPosition?: never;
|
|
51
|
+
freeScroll?: boolean;
|
|
52
|
+
enableFreeScrollDrag?: boolean | (() => boolean);
|
|
53
|
+
};
|
|
54
|
+
declare type UseSpringCarouselNumericSlideType = {
|
|
55
|
+
slideType?: 'fixed';
|
|
56
|
+
itemsPerSlide?: number;
|
|
57
|
+
initialActiveItem?: number;
|
|
58
|
+
slideAmount?: never;
|
|
59
|
+
initialStartingPosition?: 'start' | 'center' | 'end';
|
|
60
|
+
freeScroll?: never;
|
|
61
|
+
enableFreeScrollDrag?: never;
|
|
62
|
+
};
|
|
63
|
+
declare type SlideTypes = UseSpringCarouselFluidType | UseSpringCarouselNumericSlideType;
|
|
64
|
+
/**
|
|
65
|
+
* Types based on gestures activation
|
|
66
|
+
*/
|
|
67
|
+
declare type DisableGesturesProps = {
|
|
68
|
+
disableGestures?: true;
|
|
69
|
+
touchAction?: never;
|
|
70
|
+
};
|
|
71
|
+
declare type EnableGesturesProps = {
|
|
72
|
+
disableGestures?: false;
|
|
73
|
+
touchAction?: string;
|
|
74
|
+
};
|
|
75
|
+
declare type Gestures = DisableGesturesProps | EnableGesturesProps;
|
|
76
|
+
/**
|
|
77
|
+
* Types based on loop functionality
|
|
78
|
+
*/
|
|
79
|
+
declare type WithLoopProps = {
|
|
80
|
+
withLoop: true;
|
|
81
|
+
initialStartingPosition?: 'start' | 'center' | 'end';
|
|
82
|
+
startEndGutter?: number;
|
|
83
|
+
};
|
|
84
|
+
declare type WithNoLoop = {
|
|
85
|
+
withLoop?: false;
|
|
86
|
+
initialStartingPosition?: never;
|
|
87
|
+
startEndGutter?: never;
|
|
88
|
+
};
|
|
89
|
+
declare type LoopProps = WithLoopProps | WithNoLoop;
|
|
90
|
+
export declare type UseSpringCarouselProps = UseSpringCarouselBaseProps & ThumbsProps & SlideTypes & Gestures & LoopProps;
|
|
91
|
+
export declare type UseSpringCarouselWithThumbsReturnProps = {
|
|
92
|
+
carouselFragment: ReactNode;
|
|
93
|
+
thumbsFragment: ReactNode;
|
|
94
|
+
useListenToCustomEvent: UseListenToCustomEvent<'use-spring'>;
|
|
95
|
+
getIsFullscreen(): boolean;
|
|
96
|
+
getIsPrevItem(id: string): boolean;
|
|
97
|
+
getIsNextItem(id: string): boolean;
|
|
98
|
+
enterFullscreen(elementRef?: HTMLElement): void;
|
|
99
|
+
exitFullscreen(): void;
|
|
100
|
+
slideToNextItem(): void;
|
|
101
|
+
slideToPrevItem(): void;
|
|
102
|
+
getIsAnimating(): boolean;
|
|
103
|
+
getIsDragging(): boolean;
|
|
104
|
+
};
|
|
105
|
+
export declare type UseSpringDafaultTypeReturnProps = {
|
|
106
|
+
carouselFragment: ReactNode;
|
|
107
|
+
useListenToCustomEvent: UseListenToCustomEvent<'use-spring'>;
|
|
108
|
+
getIsFullscreen(): boolean;
|
|
109
|
+
getIsPrevItem(id: string): boolean;
|
|
110
|
+
getIsNextItem(id: string): boolean;
|
|
111
|
+
enterFullscreen(elementRef?: HTMLElement): void;
|
|
112
|
+
exitFullscreen(): void;
|
|
113
|
+
slideToNextItem(): void;
|
|
114
|
+
slideToPrevItem(): void;
|
|
115
|
+
getIsAnimating(): boolean;
|
|
116
|
+
slideToItem(item: string | number): void;
|
|
117
|
+
getIsActiveItem(id: string): boolean;
|
|
118
|
+
getIsDragging(): boolean;
|
|
119
|
+
getCurrentActiveItem(): {
|
|
120
|
+
id: string;
|
|
121
|
+
index: number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TransitionFrom, TransitionTo } from 'react-spring';
|
|
2
|
+
import { UseListenToCustomEvent } from './index';
|
|
3
|
+
import { UseSpringCarouselBaseProps, ThumbsProps } from './useSpringCarousel';
|
|
4
|
+
declare type ReactSpringCarouselItem = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type SpringAnimationProps = {
|
|
8
|
+
initial: TransitionFrom<ReactSpringCarouselItem>;
|
|
9
|
+
from: TransitionFrom<ReactSpringCarouselItem>;
|
|
10
|
+
enter: TransitionTo<ReactSpringCarouselItem>;
|
|
11
|
+
leave: TransitionTo<ReactSpringCarouselItem>;
|
|
12
|
+
};
|
|
13
|
+
export declare type UseTransitionCarouselProps = UseSpringCarouselBaseProps & ThumbsProps & {
|
|
14
|
+
toPrevItemSpringProps?: SpringAnimationProps;
|
|
15
|
+
toNextItemSpringProps?: SpringAnimationProps;
|
|
16
|
+
springAnimationProps?: SpringAnimationProps;
|
|
17
|
+
withLoop?: boolean;
|
|
18
|
+
exitBeforeEnter?: boolean;
|
|
19
|
+
trail?: number;
|
|
20
|
+
};
|
|
21
|
+
export declare type UseTransitionCarouselContextProps = {
|
|
22
|
+
useListenToCustomEvent: UseListenToCustomEvent<'use-transition'>;
|
|
23
|
+
activeItem: number;
|
|
24
|
+
getIsFullscreen(): boolean;
|
|
25
|
+
getIsPrevItem(id: string): boolean;
|
|
26
|
+
getIsNextItem(id: string): boolean;
|
|
27
|
+
enterFullscreen(elementRef?: HTMLElement): void;
|
|
28
|
+
exitFullscreen(): void;
|
|
29
|
+
slideToNextItem(): void;
|
|
30
|
+
slideToPrevItem(): void;
|
|
31
|
+
getIsAnimating(): boolean;
|
|
32
|
+
slideToItem(item: string | number): void;
|
|
33
|
+
getIsActiveItem(id: string): boolean;
|
|
34
|
+
getCurrentActiveItem(): {
|
|
35
|
+
id: string;
|
|
36
|
+
index: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UseSpringDafaultTypeReturnProps } from '../types';
|
|
3
|
+
import { UseSpringCarouselProps } from '../types/useSpringCarousel';
|
|
4
|
+
import { UseSpringFluidTypeReturnProps } from 'react-spring-carousel';
|
|
5
|
+
declare function useSpringCarousel({ items, withLoop, draggingSlideTreshold, springConfig, shouldResizeOnWindowResize, withThumbs, enableThumbsWrapperScroll, carouselSlideAxis, thumbsSlideAxis, prepareThumbsData, initialActiveItem, initialStartingPosition, disableGestures, gutter, startEndGutter, touchAction, slideAmount, freeScroll, CustomThumbsWrapperComponent, enableFreeScrollDrag, itemsPerSlide, slideType, }: UseSpringCarouselProps): {
|
|
6
|
+
carouselFragment: JSX.Element;
|
|
7
|
+
thumbsFragment: JSX.Element;
|
|
8
|
+
slideToItem?: ((item: string | number) => void) | undefined;
|
|
9
|
+
getIsActiveItem?: ((id: string) => boolean) | undefined;
|
|
10
|
+
getCurrentActiveItem?: (() => {
|
|
11
|
+
id: string;
|
|
12
|
+
index: number;
|
|
13
|
+
}) | undefined;
|
|
14
|
+
useListenToCustomEvent: (fn: import("../types").ObservableCallbackFn<"use-spring">) => void;
|
|
15
|
+
getIsFullscreen: () => boolean;
|
|
16
|
+
enterFullscreen: (elementRef?: HTMLElement | undefined) => void;
|
|
17
|
+
exitFullscreen: () => void;
|
|
18
|
+
getIsAnimating: () => boolean;
|
|
19
|
+
getIsDragging: () => boolean;
|
|
20
|
+
getIsNextItem: (id: string) => boolean;
|
|
21
|
+
getIsPrevItem: (id: string) => boolean;
|
|
22
|
+
slideToPrevItem: () => void;
|
|
23
|
+
slideToNextItem: () => void;
|
|
24
|
+
};
|
|
25
|
+
declare function useSpringCarouselContext(): UseSpringFluidTypeReturnProps | UseSpringDafaultTypeReturnProps;
|
|
26
|
+
export { useSpringCarousel, useSpringCarouselContext };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { UseTransitionCarouselContextProps, UseTransitionCarouselProps } from '
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
useListenToCustomEvent: import("
|
|
2
|
+
import { UseTransitionCarouselContextProps, UseTransitionCarouselProps } from '../types/useTransitionCarousel';
|
|
3
|
+
declare function useTransitionCarouselContext(): UseTransitionCarouselContextProps;
|
|
4
|
+
declare function useTransitionCarousel({ items, withLoop, withThumbs, springConfig, thumbsSlideAxis, enableThumbsWrapperScroll, draggingSlideTreshold, prepareThumbsData, toPrevItemSpringProps, toNextItemSpringProps, disableGestures, CustomThumbsWrapperComponent, trail, exitBeforeEnter, springAnimationProps, }: UseTransitionCarouselProps): {
|
|
5
|
+
useListenToCustomEvent: import("../types").UseListenToCustomEvent<"use-transition">;
|
|
6
|
+
activeItem: number;
|
|
6
7
|
getIsFullscreen(): boolean;
|
|
7
8
|
getIsPrevItem(id: string): boolean;
|
|
8
9
|
getIsNextItem(id: string): boolean;
|
|
@@ -17,7 +18,7 @@ export default function useTransitionCarousel({ items, withLoop, withThumbs, spr
|
|
|
17
18
|
id: string;
|
|
18
19
|
index: number;
|
|
19
20
|
};
|
|
20
|
-
activeItem: number;
|
|
21
21
|
carouselFragment: JSX.Element;
|
|
22
22
|
thumbsFragment: JSX.Element;
|
|
23
23
|
};
|
|
24
|
+
export { useTransitionCarouselContext, useTransitionCarousel };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
|
+
declare type Callback = () => void | (() => void);
|
|
3
|
+
declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
4
|
+
declare function useIsomorphicMount(callback: Callback): void;
|
|
5
|
+
export { useIsomorphicLayoutEffect, useIsomorphicMount };
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-spring-carousel",
|
|
3
|
-
"version": "1.9.29-
|
|
3
|
+
"version": "1.9.29-beta100",
|
|
4
4
|
"description": "A new Carousel experience for the web",
|
|
5
5
|
"homepage": "https://react-spring-carousel-js.emilianobucci.com",
|
|
6
|
-
"repository": "https://github.com/Emiliano-Bucci/react-spring-carousel
|
|
6
|
+
"repository": "https://github.com/Emiliano-Bucci/react-spring-carousel",
|
|
7
7
|
"author": "Emiliano Bucci",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"keywords": [
|
|
@@ -17,10 +17,23 @@
|
|
|
17
17
|
"react-spring-slider",
|
|
18
18
|
"animated"
|
|
19
19
|
],
|
|
20
|
+
"main": "./dist/cjs/index.js",
|
|
21
|
+
"module": "./dist/esm/index.js",
|
|
22
|
+
"types": "./dist/types/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"require": "./dist/cjs/index.js",
|
|
29
|
+
"default": "./dist/esm/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
20
32
|
"scripts": {
|
|
21
33
|
"start": "start-storybook -p 6006",
|
|
34
|
+
"clean": "rimraf dist",
|
|
22
35
|
"build-storybook": "build-storybook",
|
|
23
|
-
"build:lib": "rollup -c",
|
|
36
|
+
"build:lib": "npm run clean && rollup -c",
|
|
24
37
|
"lint": "eslint --fix --config .eslintrc.js 'src/**/*.{ts,tsx,js}'",
|
|
25
38
|
"prepare": "husky install",
|
|
26
39
|
"lint-staged": "lint-staged",
|
|
@@ -29,68 +42,66 @@
|
|
|
29
42
|
"release:test": "jest",
|
|
30
43
|
"push:tags": "git push --follow-tags",
|
|
31
44
|
"release:lib": "npm run lint && npm run release:test && npm run check:tag:branch && npm run build:lib && npm run push:tags && npm publish",
|
|
32
|
-
"storybook": "start-storybook -p 6006"
|
|
45
|
+
"storybook": "start-storybook -p 6006",
|
|
46
|
+
"release:beta": "npm run build:lib && npm publish --tag beta"
|
|
33
47
|
},
|
|
34
|
-
"main": "dist/index.umd.js",
|
|
35
|
-
"module": "dist/index.es.js",
|
|
36
|
-
"types": "dist/index.d.ts",
|
|
37
|
-
"files": [
|
|
38
|
-
"dist"
|
|
39
|
-
],
|
|
40
48
|
"dependencies": {
|
|
41
|
-
"@use-gesture/react": "^10.
|
|
42
|
-
"
|
|
43
|
-
"
|
|
49
|
+
"@use-gesture/react": "^10.2.7",
|
|
50
|
+
"movement": "^0.0.13",
|
|
51
|
+
"react-spring-carousel": "^1.9.29-beta26",
|
|
52
|
+
"rxjs": "^7.5.4",
|
|
53
|
+
"screenfull": "^5.2.0"
|
|
44
54
|
},
|
|
45
55
|
"devDependencies": {
|
|
46
|
-
"@babel/core": "^7.
|
|
47
|
-
"@babel/preset-env": "^7.16.
|
|
48
|
-
"@babel/preset-react": "^7.16.
|
|
49
|
-
"@emotion/babel-plugin": "^11.
|
|
56
|
+
"@babel/core": "^7.17.5",
|
|
57
|
+
"@babel/preset-env": "^7.16.11",
|
|
58
|
+
"@babel/preset-react": "^7.16.7",
|
|
59
|
+
"@emotion/babel-plugin": "^11.7.2",
|
|
50
60
|
"@emotion/babel-preset-css-prop": "^11.2.0",
|
|
51
|
-
"@emotion/jest": "^11.
|
|
52
|
-
"@emotion/react": "^11.
|
|
53
|
-
"@rollup/plugin-commonjs": "^21.0.
|
|
54
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
55
|
-
"@storybook/addon-actions": "^6.
|
|
56
|
-
"@storybook/addon-essentials": "^6.
|
|
57
|
-
"@storybook/addon-links": "^6.
|
|
58
|
-
"@storybook/react": "^6.
|
|
59
|
-
"@testing-library/jest-dom": "^5.
|
|
60
|
-
"@testing-library/react": "^12.1.
|
|
61
|
-
"@types/jest": "^27.
|
|
62
|
-
"@types/react": "^17.0.
|
|
63
|
-
"@types/react-dom": "^17.0.
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
65
|
-
"@typescript-eslint/parser": "^5.
|
|
61
|
+
"@emotion/jest": "^11.8.0",
|
|
62
|
+
"@emotion/react": "^11.8.1",
|
|
63
|
+
"@rollup/plugin-commonjs": "^21.0.2",
|
|
64
|
+
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
65
|
+
"@storybook/addon-actions": "^6.4.19",
|
|
66
|
+
"@storybook/addon-essentials": "^6.4.19",
|
|
67
|
+
"@storybook/addon-links": "^6.4.19",
|
|
68
|
+
"@storybook/react": "^6.4.19",
|
|
69
|
+
"@testing-library/jest-dom": "^5.16.2",
|
|
70
|
+
"@testing-library/react": "^12.1.3",
|
|
71
|
+
"@types/jest": "^27.4.1",
|
|
72
|
+
"@types/react": "^17.0.39",
|
|
73
|
+
"@types/react-dom": "^17.0.13",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
75
|
+
"@typescript-eslint/parser": "^5.13.0",
|
|
66
76
|
"babel-loader": "^8.2.3",
|
|
67
|
-
"chalk": "^
|
|
68
|
-
"eslint": "^8.
|
|
69
|
-
"eslint-config-prettier": "^8.
|
|
77
|
+
"chalk": "^5.0.0",
|
|
78
|
+
"eslint": "^8.10.0",
|
|
79
|
+
"eslint-config-prettier": "^8.5.0",
|
|
70
80
|
"eslint-plugin-prettier": "^4.0.0",
|
|
71
|
-
"eslint-plugin-react": "^7.
|
|
72
|
-
"eslint-plugin-react-hooks": "^4.
|
|
73
|
-
"eslint-plugin-testing-library": "^5.0.
|
|
81
|
+
"eslint-plugin-react": "^7.29.3",
|
|
82
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
83
|
+
"eslint-plugin-testing-library": "^5.0.6",
|
|
74
84
|
"git-repo-info": "^2.1.1",
|
|
75
85
|
"husky": "^7.0.4",
|
|
76
|
-
"jest": "^27.
|
|
77
|
-
"lint-staged": "^
|
|
78
|
-
"prettier": "^2.
|
|
79
|
-
"
|
|
86
|
+
"jest": "^27.5.1",
|
|
87
|
+
"lint-staged": "^12.3.4",
|
|
88
|
+
"prettier": "^2.5.1",
|
|
89
|
+
"rimraf": "^3.0.2",
|
|
90
|
+
"rollup": "^2.69.0",
|
|
80
91
|
"rollup-plugin-babel": "^4.4.0",
|
|
81
|
-
"rollup-plugin-exclude-dependencies-from-bundle": "^1.1.
|
|
82
|
-
"rollup-plugin-filesize": "^9.1.
|
|
92
|
+
"rollup-plugin-exclude-dependencies-from-bundle": "^1.1.22",
|
|
93
|
+
"rollup-plugin-filesize": "^9.1.2",
|
|
83
94
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
84
95
|
"rollup-plugin-terser": "^7.0.2",
|
|
85
|
-
"rollup-plugin-typescript2": "^0.
|
|
86
|
-
"rollup-plugin-visualizer": "^5.
|
|
87
|
-
"ts-jest": "^27.
|
|
88
|
-
"typescript": "^4.
|
|
96
|
+
"rollup-plugin-typescript2": "^0.31.2",
|
|
97
|
+
"rollup-plugin-visualizer": "^5.6.0",
|
|
98
|
+
"ts-jest": "^27.1.3",
|
|
99
|
+
"typescript": "^4.6.2"
|
|
89
100
|
},
|
|
90
101
|
"peerDependencies": {
|
|
91
102
|
"react": "^17.0.2",
|
|
92
103
|
"react-dom": "^17.0.2",
|
|
93
|
-
"react-spring": "^9.
|
|
104
|
+
"react-spring": "^9.4.2"
|
|
94
105
|
},
|
|
95
106
|
"lint-staged": {
|
|
96
107
|
"*.{ts,tsx}": [
|
package/dist/index.d.ts
DELETED
package/dist/index.es.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t,useEffect as n,forwardRef as r,createContext as i,useCallback as o,useContext as s,useState as u}from"react";import{animated as l,useSpring as c,config as a,useTransition as d}from"react-spring";import{useDrag as m}from"@use-gesture/react";import{Subject as f}from"rxjs";import h from"screenfull";function p(){const e=t(new f);return{useListenToCustomEvent:function(t){n((()=>{const n=e.current.subscribe(t);return()=>n.unsubscribe()}),[t])},emitObservable:t=>{e.current.next(t)}}}function g({mainCarouselWrapperRef:e,emitObservable:r,handleResize:i}){const o=t(!1);function s(e){o.current=e}return n((()=>{function e(){document.fullscreenElement&&(s(!0),r({eventName:"onFullscreenChange",isFullscreen:!0}),i&&i()),document.fullscreenElement||(s(!1),r({eventName:"onFullscreenChange",isFullscreen:!1}),i&&i())}if(h.isEnabled)return h.on("change",e),()=>{h.isEnabled&&h.off("change",e)}})),{enterFullscreen:function(t){h.isEnabled&&h.request(t||e.current)},exitFullscreen:function(){h.isEnabled&&h.exit()},getIsFullscreen:function(){return o.current}}}function b(e){const r=t(!1);n((()=>{if(!r.current){const t=e();return r.current=!0,()=>{t&&t()}}}),[])}const x=r((({children:t,...n},r)=>e(l.div,Object.assign({},n,{ref:r},{children:t}),void 0)));function v({items:n,withThumbs:r,thumbsSlideAxis:i="x",springConfig:o,prepareThumbsData:s,itemsPerSlide:u,getFluidWrapperScrollValue:a=(()=>0),getSlideValue:d=(()=>0),CustomThumbsWrapperComponent:m}){const f=t(null),[h,p]=c((()=>({x:0,y:0,config:o,onChange:({value:e})=>{f.current&&(f.current["x"===i?"scrollLeft":"scrollTop"]=Math.abs(e[i]))}})));function g(){return f.current["x"===i?"scrollLeft":"scrollTop"]}function v(){return Math.round(Number(f.current?.["x"===i?"scrollWidth":"scrollHeight"])-f.current.getBoundingClientRect()["x"===i?"width":"height"])}function w(){const e=Math.round(a()/d());return v()/e}b((()=>{if(r&&!f.current)throw new Error("The thumbs wrapper is not defined. If you've passed a Functional component, be sure to wrap your component in forwardRef.")}));const T=m?l(m):x;return{thumbsFragment:r?e(T,Object.assign({ref:f,className:"use-spring-carousel-thumbs-wrapper",onWheel:()=>{h[i].stop()},style:{display:"flex",flex:1,position:"relative",flexDirection:"x"===i?"row":"column",..."x"===i?{overflowX:"auto"}:{overflowY:"auto",maxHeight:"100%"}}},{children:function(){function e(e){return e.map((e=>({id:e.id,renderThumb:e.renderThumb})))}return s?s(e(n)):e(n)}().map((({id:t,renderThumb:n})=>{const r=`thumb-${t}`;return e("div",Object.assign({id:r},{children:n}),r)}))}),void 0):null,handleThumbsScroll:function(e,t){if("fluid"===u){const e=v();if("next"===t){const t=g()+w();p.start({from:{[i]:g()},to:{[i]:t>e?e:t}})}if("prev"===t){const e=g()-w();p.start({from:{[i]:g()},to:{[i]:e<0?0:e}})}}else{const t=f.current.querySelector(`#thumb-${n[e].id}`);if(t){const r=f.current,o="x"===i?"offsetWidth":"offsetHeight",s="x"===i?"scrollLeft":"scrollTop",u=function({thumbNode:e,offsetDirection:t,offsetDimension:n}){return e[t]+e[n]/2}({thumbNode:t,offsetDimension:o,offsetDirection:"x"===i?"offsetLeft":"offsetTop"}),l=function({thumbWrapper:e,offsetDimension:t}){return e[t]/2}({thumbWrapper:r,offsetDimension:o});p.start({from:{[i]:function({thumbWrapper:e,scrollDirection:t}){return e[t]}({thumbWrapper:r,scrollDirection:s})},to:{[i]:function({thumbWrapper:t,thumbOffsetPosition:r,thumbScrollDimension:o,offsetDimension:s}){const u="x"===i?"scrollWidth":"scrollHeight";return e===n.length-1||r-o>t[u]-t[s]?t[u]-t[s]:0===e?0:r-o}({thumbWrapper:r,thumbOffsetPosition:u,thumbScrollDimension:l,offsetDimension:o})},onChange:e=>{"x"===i?f.current.scrollLeft=e.x:f.current.scrollTop=e.y}})}}}}}const w=i(void 0);function T({itemsPerSlide:r=1,items:i,withLoop:s=!1,draggingSlideTreshold:u=140,springConfig:d=a.default,shouldResizeOnWindowResize:f=!0,withThumbs:h=!1,enableThumbsWrapperScroll:x=!0,carouselSlideAxis:T="x",thumbsSlideAxis:y="x",prepareThumbsData:C,initialActiveItem:S=0,initialStartingPosition:I="start",disableGestures:E=!1,gutter:W=0,startEndGutter:A=0,touchAction:N,slideAmount:F,freeScroll:R=!1,CustomThumbsWrapperComponent:L}){const O=t("initial"),D=s?[...i,...i,...i]:i,P=t(S),j=t(null),M=t(null),$=t(!1),z=t(!1),B=t(!1),H=t(0),k=t(0),V=t(!1),q=t(0),[G,Y]=c((()=>({y:0,x:0,config:d,onChange:({value:e})=>{j.current&&R&&(j.current["x"===T?"scrollLeft":"scrollTop"]=Math.abs(e[T]))}})));const X=o((()=>{if(!j.current)throw new Error("mainCarouselWrapperRef is not available");return j.current.getBoundingClientRect()["x"===T?"width":"height"]}),[T]),Z=o((()=>{const e=M.current?.querySelector(".use-spring-carousel-item");if(!e)throw Error("No carousel items available!");return e.getBoundingClientRect()["x"===T?"width":"height"]+W}),[T,W]),J=o((()=>G[T].get()),[T,G]),K=o((()=>Z()*i.length<X()),[Z,X,i.length]),Q=o((()=>Math.round(Number(M.current?.["x"===T?"scrollWidth":"scrollHeight"])-M.current.getBoundingClientRect()["x"===T?"width":"height"])),[T]),U=o((()=>0===he()),[]),_=o((()=>{if(!M.current)return 0;const e=Z();if("fluid"===r&&"number"==typeof F){if(F<e)throw new Error("slideAmount must be greater than the width of a single item.");return F}return e}),[Z,r,F]),ee=o((e=>{const t="x"===T?"left":"top";function n(){return Z()*i.length}function o(n){e.style.top="0px",e.style.left="0px",s&&(e.style[t]=`-${n-A}px`)}function u(){o(n())}if("fluid"!==r&&"number"==typeof r){if(r>1)switch(I){default:case"start":u();break;case"center":o(n()-_()*Math.round((r-1)/2));break;case"end":o(n()-_()*Math.round(r-1))}else u()}else u()}),[T,r,Z,i.length,A,_,I,s]),te=o((()=>{if(console.log("RESIZE"),window.innerWidth===H.current||R)console.log("HERE?");else{if(H.current=window.innerWidth,"fluid"===r){if(K())return void Y.start({immediate:!0,[T]:0});k.current=Q();const e=H.current-q.current;if(V.current){const e=-k.current;Y.start({immediate:!0,[T]:e})}else{const t=J()+e;Y.start({immediate:!0,[T]:t})}q.current=window.innerWidth}else Y.start({immediate:!0,x:0,y:0}),Y.start({immediate:!0,[T]:-_()*he()});ee(M.current)}}),[r,K,Q,R,Y,T,J,_,ee]),{useListenToCustomEvent:ne,emitObservable:re}=p(),{enterFullscreen:ie,exitFullscreen:oe,getIsFullscreen:se}=g({mainCarouselWrapperRef:j,emitObservable:re,handleResize:te}),{thumbsFragment:ue,handleThumbsScroll:le}=v({withThumbs:h,items:i,thumbsSlideAxis:y,springConfig:d,prepareThumbsData:C,itemsPerSlide:r,getFluidWrapperScrollValue:Q,getSlideValue:_,CustomThumbsWrapperComponent:L});function ce(){if(!j.current)throw new Error("Missing mainCarouselWrapperRef.current");return j.current["x"===T?"scrollLeft":"scrollTop"]}const ae=m((e=>{const t=e.dragging,n=e.movement["x"===T?0:1];function o(){"fluid"===r?K()?Y.start({[T]:0}):U()?ye():V.current?Y.start({[T]:-k.current}):Y.start({[T]:J()}):Y.start({[T]:-he()*_()})}if(t){if(ge(!0),re({eventName:"onDrag",...e}),R){const t=e.direction["x"===T?0:1];0===ce()&&t>0?e.cancel():Y.start({from:{[T]:ce()},to:{[T]:t>0?ce()-Math.abs(n):ce()+Math.abs(n)}})}else Y.start({[T]:J()+n});const t=n>u,r=n<-u;if(j.current.getBoundingClientRect().width>=i.length*_()&&(V.current=!0),(t||r)&&K())return e.cancel(),void o();V.current&&n<0?r&&(e.cancel(),Y.start({[T]:-k.current})):r?(e.cancel(),!s&&Te()?o():Ce()):t&&(e.cancel(),!s&&U()?o():ye())}!e.last||e.pressed||R||o()}),{enabled:!E});function de(e){O.current=e}function me(){return O.current}function fe(e){P.current=e}function he(){return P.current}function pe(e){z.current=e}function ge(e){$.current=e}function be(){const e=he();return 0===e?i.length-1:e-1}function xe(){const e=he();return e===i.length-1?0:e+1}function ve(e){return i.findIndex((t=>t.id===e))}function we({from:e,to:t=-1,customTo:n,immediate:r=!1,onRest:o=(()=>{})}){r||(fe(t),pe(!0),re({eventName:"onSlideStartChange",slideActionType:me(),nextItem:{index:t,id:i[t].id}})),Y.start({..."number"==typeof e?{from:{[T]:e}}:{},to:"number"==typeof n?{[T]:n}:{[T]:-_()*t},immediate:r,onRest:e=>{e.finished&&(ge(!1),pe(!1),o(),r||re({eventName:"onSlideChange",slideActionType:me(),currentItem:{index:he(),id:i[he()].id}}))}}),x&&h&&!r&&le(t,me())}function Te(){return he()===i.length-1}function ye(){if(de("prev"),"fluid"===r){if(K())return;const e=J()+_()+200;if(R){const e=j.current.scrollLeft-_();we({customTo:e<0?0:e,from:j.current.scrollLeft})}else we(e>=0?s?{from:J()-Z()*i.length,customTo:J()-Z()*i.length+_()}:{customTo:0}:{customTo:J()+_()});V.current&&(V.current=!1)}else{if(!s&&0===he()||B.current)return;U()?we({from:J()-_()*i.length,to:i.length-1}):we({to:be()})}}function Ce(){if(de("next"),"fluid"===r){if(K())return;const e=Math.abs(J()-_())+100>=k.current;if(R)we({customTo:j.current.scrollLeft+_(),from:j.current.scrollLeft});else if(s&&Math.abs(J()-_())>=i.length*Z()){const e=Z()*i.length;we({from:J()+e,customTo:J()+e-_()})}else{if(V.current)return;e?(V.current=!0,we({customTo:-k.current})):we({customTo:J()-_()})}}else{if(!s&&he()===D.length-1||B.current)return;Te()?we({from:J()+_()*i.length,to:0}):we({to:xe()})}}b((()=>{if("fluid"!==r&&!Number.isInteger(r))throw new Error("itemsPerSlide should be an integer.");if(r>i.length)throw new Error("The itemsPerSlide prop can't be greater than the total length of the items you provide.");if(r<1)throw new Error("The itemsPerSlide prop can't be less than 1.");f||console.warn("You set shouldResizeOnWindowResize={false}; be aware that the carousel could behave in a strange way if you also use the fullscreen functionality or if you change the mobile orientation."),S<0&&console.warn("The initialActiveItem cannot be less than 0."),S>i.length&&console.warn("The initialActiveItem cannot be greater than the total length of the items you provide.")})),b((()=>{function e(){document.hidden?B.current=!0:B.current=!1}if(k.current=Q(),"undefined"!=typeof window)return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}})),b((()=>{q.current=window.innerWidth,S>0&&S<=i.length&&(we({to:S,immediate:!0}),fe(S))})),n((()=>{if(f)return window.addEventListener("resize",te),()=>{window.removeEventListener("resize",te)}}),[te,f]),n((()=>{M.current&&("x"===T&&(M.current.style.top="0px"),"y"===T&&(M.current.style.left="0px"))}),[T]);const Se={useListenToCustomEvent:ne,getIsFullscreen:se,enterFullscreen:ie,exitFullscreen:oe,getIsAnimating:function(){return z.current},getIsDragging:function(){return $.current},getIsNextItem:function(e){const t=ve(e),n=he();return s&&n===i.length-1?0===t:t===n+1},getIsPrevItem:function(e){const t=ve(e),n=he();return s&&0===n?t===i.length-1:t===n-1},slideToPrevItem:ye,slideToNextItem:Ce,..."number"==typeof r?{slideToItem:function(e){let t=0;if(t="string"==typeof e?i.findIndex((t=>t.id===e)):e,t>=i.length)throw Error("The item you want to slide to doesn't exist. This could be due to the fact that \n you provide a wrong id or a higher numeric index.");if(t===he())return;const n=ve(i[he()].id);de(ve(i[t].id)>n?"next":"prev"),we({to:t})},getIsActiveItem:e=>ve(e)===he(),getCurrentActiveItem:()=>({id:i[he()].id,index:he()})}:{}};const Ie=e(w.Provider,Object.assign({value:Se},{children:e("div",Object.assign({ref:j,className:"use-spring-carousel-main-wrapper","data-testid":"use-spring-carousel-wrapper"},R?{onWheel(){G[T].stop()}}:{},{style:{display:"flex",position:"relative",width:"100%",height:"100%",...R?"x"===T?{overflowX:"auto"}:{overflowY:"auto"}:{}}},{children:e(l.div,Object.assign({},ae(),{className:"use-spring-carousel-track-wrapper","data-testid":"use-spring-carousel-animated-wrapper",ref:function(e){e&&(M.current=e,ee(e))},style:{display:"flex",position:"relative",touchAction:N||("x"===T?"pan-y":"pan-x"),flexDirection:"x"===T?"row":"column",...function(){const e=`calc(100% - ${2*A}px)`;return{width:"x"===T?e:"100%",height:"y"===T?e:"100%"}}(),...R?{}:G}},{children:D.map((({id:t,renderItem:n},i)=>e("div",Object.assign({className:"use-spring-carousel-item","data-testid":"use-spring-carousel-item-wrapper",style:{display:"flex",position:"relative",..."number"==typeof r?{..."x"===T?{marginRight:`${W}px`}:{marginBottom:`${W}px`},flex:`1 0 calc(100% / ${r} - ${W*(r-1)/r}px)`}:{..."x"===T?{marginRight:`${W}px`}:{marginBottom:`${W}px`}}}},{children:n}),`${t}-${i}`)))}),void 0)}),void 0)}),void 0),Ee=e(w.Provider,Object.assign({value:Se},{children:ue}),void 0);return{...Se,carouselFragment:Ie,thumbsFragment:Ee}}function y(){const e=s(w);if(!e)throw new Error("useSpringCarouselContext must be used only inside a component that is rendered inside the Carousel.");return e}const C=i(void 0);function S(){const e=s(C);if(!e)throw new Error("useTransitionCarouselContext isn't being used within the useTransitionCarousel context; \n use the context only inside a component that is rendered within the Carousel.");return e}function I({items:n,withLoop:r=!1,withThumbs:i=!1,springConfig:o=a.default,thumbsSlideAxis:s="x",enableThumbsWrapperScroll:c=!0,draggingSlideTreshold:f=50,prepareThumbsData:h,toPrevItemSpringProps:b,toNextItemSpringProps:x,disableGestures:w=!1,CustomThumbsWrapperComponent:T,springAnimationProps:y={initial:{opacity:1,position:"relative"},from:{opacity:0,position:"absolute"},enter:{opacity:1,position:"relative"},leave:{opacity:0,position:"absolute"}}}){const S=t("next"),I=t(null),E=t(!1),[W,A]=u(0),{emitObservable:N,useListenToCustomEvent:F}=p(),{enterFullscreen:R,exitFullscreen:L,getIsFullscreen:O}=g({emitObservable:N,mainCarouselWrapperRef:I}),{thumbsFragment:D,handleThumbsScroll:P}=v({items:n,withThumbs:i,thumbsSlideAxis:s,springConfig:o,prepareThumbsData:h,CustomThumbsWrapperComponent:T}),j=m((({last:e,movement:[t]})=>{if(!$()&&e){const e=t>f,i=t<-f,o=0===W,s=W===n.length-1;if(i){if(!r&&s)return;k(),N({eventName:"onLeftSwipe"})}else if(e){if(!r&&o)return;V(),N({eventName:"onRightSwipe"})}}}),{enabled:!w});const M=d(W,{config:o,...function(){const e=H();return"prev"===e&&b?{initial:{...y.initial},from:{...b.from},enter:{...b.enter},leave:{...b.leave}}:"next"===e&&x?{initial:{...y.initial},from:{...x.from},enter:{...x.enter},leave:{...x.leave}}:{initial:{...y.initial},from:{...y.from},enter:{...y.enter},leave:{...y.leave}}}(),onStart:()=>z(!0),keys:null,onRest:e=>{e.finished&&(z(!1),N({eventName:"onSlideChange",slideActionType:H(),currentItem:{index:W,id:n[W].id}}))}})(((t,r)=>e(l.div,Object.assign({style:{...t,flex:"1 0 100%",width:"100%",height:"100%"}},{children:n[r].renderItem}),void 0)));function $(){return E.current}function z(e){E.current=e}function B(e){S.current=e}function H(){return S.current}function k(){const e=W===n.length-1;r?(B("next"),e?(N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:0,id:n[0].id}}),A(0)):(N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:W+1,id:n[W+1].id}}),A(W+1))):e||(N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:W+1,id:n[W+1].id}}),B("next"),A(W+1))}function V(){const e=0===W;r?(B("prev"),e?(N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:W-1,id:n[W-1].id}}),A(n.length-1)):(N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:W-1,id:n[W-1].id}}),A(W-1))):e||(B("prev"),N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:W-1,id:n[W-1].id}}),A(W-1))}function q(e){return n.findIndex((t=>t.id===e))}const G={activeItem:W,slideToItem:function(e){let t=0;if(t="string"==typeof e?n.findIndex((t=>t.id===e)):e,t>=n.length)throw Error("The item you want to slide to doesn't exist. This could be due to the fact that \n you provide a wrong id or a higher numeric index.");if(t===W)return;const r=q(n[W].id),o=q(n[t].id);N({eventName:"onSlideStartChange",slideActionType:H(),nextItem:{index:o,id:n[t].id}}),B(o>r?"next":"prev"),A(t),c&&i&&P(t)},slideToNextItem:k,slideToPrevItem:V,enterFullscreen:R,exitFullscreen:L,useListenToCustomEvent:F,getIsNextItem:function(e){const t=q(e);return r&&W===n.length-1?0===t:t===W+1},getIsPrevItem:function(e){const t=q(e);return r&&0===W?t===n.length-1:t===W-1},getIsAnimating:$,getIsFullscreen:O,getIsActiveItem:e=>q(e)===W,getCurrentActiveItem:()=>({id:n[W].id,index:W})};return{carouselFragment:e(C.Provider,Object.assign({value:G},{children:e("div",Object.assign({ref:I},j(),{style:{display:"flex",position:"relative",width:"100%",height:"100%",overflow:"hidden"}},{children:M}),void 0)}),void 0),thumbsFragment:e(C.Provider,Object.assign({value:G},{children:D}),void 0),...G}}export{T as useSpringCarousel,y as useSpringCarouselContext,I as useTransitionCarousel,S as useTransitionCarouselContext};
|
|
2
|
-
//# sourceMappingURL=index.es.js.map
|