@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.js
CHANGED
|
@@ -3278,7 +3278,7 @@ function renderMap(containerId, props = {}) {
|
|
|
3278
3278
|
}
|
|
3279
3279
|
|
|
3280
3280
|
// package.json
|
|
3281
|
-
var version = "0.5.
|
|
3281
|
+
var version = "0.5.3";
|
|
3282
3282
|
|
|
3283
3283
|
// src/sdk.ts
|
|
3284
3284
|
function deepFreeze(obj) {
|
|
@@ -4388,6 +4388,13 @@ var SwipeCarousel = ({
|
|
|
4388
4388
|
)
|
|
4389
4389
|
);
|
|
4390
4390
|
const prevActiveIdRef = useRef10(activeId);
|
|
4391
|
+
const [timingWaiting, setTimingWaiting] = useState11(true);
|
|
4392
|
+
useEffect10(() => {
|
|
4393
|
+
const timer = setTimeout(() => {
|
|
4394
|
+
setTimingWaiting(false);
|
|
4395
|
+
}, 1e3);
|
|
4396
|
+
return () => clearTimeout(timer);
|
|
4397
|
+
}, []);
|
|
4391
4398
|
useEffect10(() => {
|
|
4392
4399
|
if (activeId !== prevActiveIdRef.current) {
|
|
4393
4400
|
const idx = items.findIndex((item) => item.id === activeId);
|
|
@@ -4532,7 +4539,7 @@ var SwipeCarousel = ({
|
|
|
4532
4539
|
className: "relative h-full",
|
|
4533
4540
|
style: {
|
|
4534
4541
|
transform: `translateX(${translateX}px)`,
|
|
4535
|
-
transition: isDraggingX ? "none" : SNAP_TRANSITION,
|
|
4542
|
+
transition: isDraggingX || timingWaiting ? "none" : SNAP_TRANSITION,
|
|
4536
4543
|
willChange: "transform"
|
|
4537
4544
|
},
|
|
4538
4545
|
children: items.map((item, index) => {
|
|
@@ -4549,7 +4556,7 @@ var SwipeCarousel = ({
|
|
|
4549
4556
|
opacity: isVisible ? 1 : 0,
|
|
4550
4557
|
pointerEvents: isVisible ? void 0 : "none",
|
|
4551
4558
|
transform: `translateX(${index * step}px) translateY(${verticalOffset}px)`,
|
|
4552
|
-
transition: isActive && isDraggingY ? "none" : SNAP_TRANSITION,
|
|
4559
|
+
transition: isActive && isDraggingY || timingWaiting ? "none" : SNAP_TRANSITION,
|
|
4553
4560
|
width: `${slideWidth}px`,
|
|
4554
4561
|
// Layer by distance from the active slide (not DOM/index
|
|
4555
4562
|
// order) so it always paints above its neighbors on BOTH
|