flemo 1.1.0 → 1.1.2
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.mjs +23 -20
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -464,25 +464,28 @@ const It = K({
|
|
|
464
464
|
},
|
|
465
465
|
onSwipeEnd: async (n, e, { currentScreen: t, prevScreen: a, onStart: r }) => {
|
|
466
466
|
const { offset: s, velocity: o } = e, c = s.x > 50 || o.x > 20;
|
|
467
|
-
return r?.(c),
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
467
|
+
return r?.(c), await Promise.all([
|
|
468
|
+
M(
|
|
469
|
+
t,
|
|
470
|
+
{
|
|
471
|
+
x: c ? "100%" : 0
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
duration: 0.3,
|
|
475
|
+
ease: [0.32, 0.72, 0, 1]
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
M(
|
|
479
|
+
a,
|
|
480
|
+
{
|
|
481
|
+
x: c ? 0 : -100
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
duration: 0.3,
|
|
485
|
+
ease: [0.32, 0.72, 0, 1]
|
|
486
|
+
}
|
|
487
|
+
)
|
|
488
|
+
]), c;
|
|
486
489
|
}
|
|
487
490
|
}
|
|
488
491
|
}), Mt = K({
|
|
@@ -1044,7 +1047,7 @@ function Ht({
|
|
|
1044
1047
|
T.current = !1, G.current = !0, p.start(f);
|
|
1045
1048
|
else if (T.current && !y) {
|
|
1046
1049
|
const g = f.clientX - V.current, k = f.clientY - W.current, ht = N.current.element && N.current.element.scrollTop <= 0 && N.current.hasMarker, mt = D.current.element && D.current.element.scrollLeft <= 0 && D.current.hasMarker;
|
|
1047
|
-
(S === "y" && (ht || D.current.element) && k > 0 && g <
|
|
1050
|
+
(S === "y" && (ht || D.current.element) && k > 0 && Math.abs(g) < 4 || S === "x" && (mt || N.current.element) && g > 0 && Math.abs(k) < 4) && (T.current = !1, G.current = !0, p.start(f));
|
|
1048
1051
|
}
|
|
1049
1052
|
}, ft = () => {
|
|
1050
1053
|
T.current = !1, G.current = !1;
|