@lookiero/checkout 3.8.0-beta.10 → 3.8.0-beta.12
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,4 +1,3 @@
|
|
|
1
|
-
import { clamp } from "@react-spring/shared";
|
|
2
1
|
import React, { useCallback, useMemo, useRef, useState } from "react";
|
|
3
2
|
import { View } from "react-native";
|
|
4
3
|
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
|
|
@@ -9,6 +8,10 @@ const SPRING_CONFIG = {
|
|
|
9
8
|
mass: 1,
|
|
10
9
|
stiffness: 300,
|
|
11
10
|
};
|
|
11
|
+
const clamp = (min, max, value) => {
|
|
12
|
+
"worklet";
|
|
13
|
+
return Math.min(max, Math.max(min, value));
|
|
14
|
+
};
|
|
12
15
|
const Carousel2 = ({ data, children, bullets, onActiveIndexChanged }) => {
|
|
13
16
|
const [carouselDimensions, setCarouselDimensions] = useState({
|
|
14
17
|
width: 0,
|
|
@@ -60,8 +63,7 @@ const Carousel2 = ({ data, children, bullets, onActiveIndexChanged }) => {
|
|
|
60
63
|
React.createElement(View, { style: style.container, onLayout: handleOnLayout },
|
|
61
64
|
React.createElement(GestureHandlerRootView, { style: { flex: 1 } },
|
|
62
65
|
React.createElement(GestureDetector, { gesture: panGesture },
|
|
63
|
-
React.createElement(View, { style: {
|
|
64
|
-
React.createElement(Animated.View, { style: [style.carousel, { width: carouselDimensions.width * data.length }, animatedStyle] }, data.map((item, index) => (React.createElement(View, { key: index, style: [style.carouselItem, { width: carouselDimensions.width }] }, children({ index, item }))))))))),
|
|
66
|
+
React.createElement(Animated.View, { style: [style.carousel, { width: carouselDimensions.width * data.length }, animatedStyle] }, data.map((item, index) => (React.createElement(View, { key: index, style: [style.carouselItem, { width: carouselDimensions.width }] }, children({ index, item })))))))),
|
|
65
67
|
bullets({ activeIndex, count: data.length, onChange: handleOnActiveIndexChanged })));
|
|
66
68
|
};
|
|
67
69
|
export { Carousel2 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "3.8.0-beta.
|
|
3
|
+
"version": "3.8.0-beta.12",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -36,10 +36,7 @@
|
|
|
36
36
|
"@sentry/react-native": "^4.13.0",
|
|
37
37
|
"inline-style-prefixer": "6.0.1",
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
|
-
"react-native-gesture-handler": "^2.12.0",
|
|
40
39
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
41
|
-
"react-native-reanimated": "^3.3.0",
|
|
42
|
-
"react-native-reanimated-carousel": "^3.4.0",
|
|
43
40
|
"react-native-safe-area-context": "^4.5.0",
|
|
44
41
|
"react-native-svg": "^13.4.0",
|
|
45
42
|
"tiny-invariant": "^1.3.1",
|
|
@@ -60,8 +57,11 @@
|
|
|
60
57
|
"react": "^18.2.0",
|
|
61
58
|
"react-dom": "^18.2.0",
|
|
62
59
|
"react-native": "^0.71.4",
|
|
60
|
+
"react-native-gesture-handler": "^2.12.0",
|
|
63
61
|
"react-native-get-random-values": "^1.8.0",
|
|
64
62
|
"react-native-web": "^0.18.11",
|
|
63
|
+
"react-native-reanimated": "^3.3.0",
|
|
64
|
+
"react-native-reanimated-carousel": "^3.4.0",
|
|
65
65
|
"react-router-dom": "^6.8.1",
|
|
66
66
|
"react-router-native": "^6.8.1"
|
|
67
67
|
},
|
|
@@ -119,8 +119,11 @@
|
|
|
119
119
|
"react-error-overlay": "^6.0.9",
|
|
120
120
|
"react-native": "^0.71.3",
|
|
121
121
|
"react-native-adjust": "^4.33.0",
|
|
122
|
+
"react-native-gesture-handler": "^2.12.0",
|
|
122
123
|
"react-native-get-random-values": "^1.8.0",
|
|
123
124
|
"react-native-web": "^0.18.11",
|
|
125
|
+
"react-native-reanimated": "^3.3.0",
|
|
126
|
+
"react-native-reanimated-carousel": "^3.4.0",
|
|
124
127
|
"react-router-dom": "^6.8.1",
|
|
125
128
|
"react-router-native": "^6.8.1",
|
|
126
129
|
"react-test-renderer": "^18.0.0",
|