@cloudparse/up-miniapps-sdk 0.5.2 → 0.5.3
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/index.browser.min.js +36 -36
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3499,7 +3499,7 @@ var RoutingService = {
|
|
|
3499
3499
|
};
|
|
3500
3500
|
|
|
3501
3501
|
// package.json
|
|
3502
|
-
var version = "0.5.
|
|
3502
|
+
var version = "0.5.3";
|
|
3503
3503
|
|
|
3504
3504
|
// src/sdk.ts
|
|
3505
3505
|
function deepFreeze(obj) {
|
|
@@ -4604,6 +4604,13 @@ var SwipeCarousel = ({
|
|
|
4604
4604
|
)
|
|
4605
4605
|
);
|
|
4606
4606
|
const prevActiveIdRef = (0, import_react17.useRef)(activeId);
|
|
4607
|
+
const [timingWaiting, setTimingWaiting] = (0, import_react17.useState)(true);
|
|
4608
|
+
(0, import_react17.useEffect)(() => {
|
|
4609
|
+
const timer = setTimeout(() => {
|
|
4610
|
+
setTimingWaiting(false);
|
|
4611
|
+
}, 1e3);
|
|
4612
|
+
return () => clearTimeout(timer);
|
|
4613
|
+
}, []);
|
|
4607
4614
|
(0, import_react17.useEffect)(() => {
|
|
4608
4615
|
if (activeId !== prevActiveIdRef.current) {
|
|
4609
4616
|
const idx = items.findIndex((item) => item.id === activeId);
|
|
@@ -4748,7 +4755,7 @@ var SwipeCarousel = ({
|
|
|
4748
4755
|
className: "relative h-full",
|
|
4749
4756
|
style: {
|
|
4750
4757
|
transform: `translateX(${translateX}px)`,
|
|
4751
|
-
transition: isDraggingX ? "none" : SNAP_TRANSITION,
|
|
4758
|
+
transition: isDraggingX || timingWaiting ? "none" : SNAP_TRANSITION,
|
|
4752
4759
|
willChange: "transform"
|
|
4753
4760
|
},
|
|
4754
4761
|
children: items.map((item, index) => {
|
|
@@ -4765,7 +4772,7 @@ var SwipeCarousel = ({
|
|
|
4765
4772
|
opacity: isVisible ? 1 : 0,
|
|
4766
4773
|
pointerEvents: isVisible ? void 0 : "none",
|
|
4767
4774
|
transform: `translateX(${index * step}px) translateY(${verticalOffset}px)`,
|
|
4768
|
-
transition: isActive && isDraggingY ? "none" : SNAP_TRANSITION,
|
|
4775
|
+
transition: isActive && isDraggingY || timingWaiting ? "none" : SNAP_TRANSITION,
|
|
4769
4776
|
width: `${slideWidth}px`,
|
|
4770
4777
|
// Layer by distance from the active slide (not DOM/index
|
|
4771
4778
|
// order) so it always paints above its neighbors on BOTH
|