react-spring-carousel 3.0.0-beta090.44 → 3.0.0-beta090.50
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.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +13 -13
- package/dist/index.es.js.map +1 -1
- package/dist/types/types/index.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -218,8 +218,8 @@ function Pr() {
|
|
|
218
218
|
}
|
|
219
219
|
var ge = !1, Pe;
|
|
220
220
|
{
|
|
221
|
-
var
|
|
222
|
-
Pe = new
|
|
221
|
+
var Ge = typeof WeakMap == "function" ? WeakMap : Map;
|
|
222
|
+
Pe = new Ge();
|
|
223
223
|
}
|
|
224
224
|
function Ve(e, t) {
|
|
225
225
|
if (!e || ge)
|
|
@@ -379,12 +379,12 @@ function Pr() {
|
|
|
379
379
|
if (_e(e))
|
|
380
380
|
return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ee(e)), se(e);
|
|
381
381
|
}
|
|
382
|
-
var Ce = F.ReactCurrentOwner,
|
|
382
|
+
var Ce = F.ReactCurrentOwner, Ze = {
|
|
383
383
|
key: !0,
|
|
384
384
|
ref: !0,
|
|
385
385
|
__self: !0,
|
|
386
386
|
__source: !0
|
|
387
|
-
}, er,
|
|
387
|
+
}, er, Qe, Se;
|
|
388
388
|
Se = {};
|
|
389
389
|
function Oe(e) {
|
|
390
390
|
if (k.call(e, "ref")) {
|
|
@@ -422,7 +422,7 @@ function Pr() {
|
|
|
422
422
|
function Ue(e, t) {
|
|
423
423
|
{
|
|
424
424
|
var i = function() {
|
|
425
|
-
|
|
425
|
+
Qe || (Qe = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
426
426
|
};
|
|
427
427
|
i.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
428
428
|
get: i,
|
|
@@ -464,7 +464,7 @@ function Pr() {
|
|
|
464
464
|
var _, g = {}, h = null, J = null;
|
|
465
465
|
i !== void 0 && (le(i), h = "" + i), rr(t) && (le(t.key), h = "" + t.key), Oe(t) && (J = t.ref, xe(t, E));
|
|
466
466
|
for (_ in t)
|
|
467
|
-
k.call(t, _) && !
|
|
467
|
+
k.call(t, _) && !Ze.hasOwnProperty(_) && (g[_] = t[_]);
|
|
468
468
|
if (e && e.defaultProps) {
|
|
469
469
|
var V = e.defaultProps;
|
|
470
470
|
for (_ in V)
|
|
@@ -825,7 +825,7 @@ function Nr({
|
|
|
825
825
|
}
|
|
826
826
|
}),
|
|
827
827
|
[u]
|
|
828
|
-
), { emitEvent: ue, useListenToCustomEvent: ge } = mr(), { thumbsFragment: Pe, handleScroll:
|
|
828
|
+
), { emitEvent: ue, useListenToCustomEvent: ge } = mr(), { thumbsFragment: Pe, handleScroll: Ge } = pr({
|
|
829
829
|
withThumbs: !!p,
|
|
830
830
|
thumbsSlideAxis: $,
|
|
831
831
|
prepareThumbsData: ae,
|
|
@@ -908,7 +908,7 @@ function Nr({
|
|
|
908
908
|
}
|
|
909
909
|
});
|
|
910
910
|
}
|
|
911
|
-
}), p && !P &&
|
|
911
|
+
}), p && !P && Ge(D.current);
|
|
912
912
|
}
|
|
913
913
|
const W = Me(() => {
|
|
914
914
|
var r;
|
|
@@ -1086,10 +1086,10 @@ function Nr({
|
|
|
1086
1086
|
function Ce() {
|
|
1087
1087
|
A ? oe.current = A : oe.current = Math.floor(k() / 2 / 2);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Ze() {
|
|
1090
1090
|
M.current && (me.current = W(), T.current = l, I.current = v, X.current = u, pe.current = window.innerWidth, c.current = 0, Ye({ id: D.current, immediate: !0, shouldReset: !0 }), Ce(), ye());
|
|
1091
1091
|
}
|
|
1092
|
-
const
|
|
1092
|
+
const Qe = hr(
|
|
1093
1093
|
(r) => {
|
|
1094
1094
|
const o = r.dragging, a = r.offset[d === "x" ? 0 : 1], P = r.movement[d === "x" ? 0 : 1], K = r.direction[d === "x" ? 0 : 1], fe = P > oe.current, de = P < -oe.current, tr = W(), re = r.velocity;
|
|
1095
1095
|
if (o) {
|
|
@@ -1299,7 +1299,7 @@ function Nr({
|
|
|
1299
1299
|
getIsActiveItem: qe
|
|
1300
1300
|
};
|
|
1301
1301
|
Rr(() => {
|
|
1302
|
-
M.current && m && (ie.current = !0,
|
|
1302
|
+
M.current && m && (ie.current = !0, Ze());
|
|
1303
1303
|
}, [m]), he(() => {
|
|
1304
1304
|
D.current !== F && (ie.current = !0, Ye({
|
|
1305
1305
|
id: F,
|
|
@@ -1331,7 +1331,7 @@ function Nr({
|
|
|
1331
1331
|
throw new Error("`slideGroupOfItems` and `freeScroll` can't be used together.");
|
|
1332
1332
|
if (typeof ne == "number" && ne > 0 && v === "fixed")
|
|
1333
1333
|
throw new Error("`slideAmount` must be used with `slideType: fluid`");
|
|
1334
|
-
ie.current = !0;
|
|
1334
|
+
ie.current = !0, Ze();
|
|
1335
1335
|
}
|
|
1336
1336
|
}, [
|
|
1337
1337
|
y,
|
|
@@ -1388,7 +1388,7 @@ function Nr({
|
|
|
1388
1388
|
{
|
|
1389
1389
|
className: "use-spring-carousel-track-wrapper",
|
|
1390
1390
|
ref: M,
|
|
1391
|
-
...
|
|
1391
|
+
...Qe(),
|
|
1392
1392
|
style: {
|
|
1393
1393
|
position: "relative",
|
|
1394
1394
|
display: "flex",
|