Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wethegit/react-gallery

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wethegit/react-gallery - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

491

dist/react-gallery.js

@@ -1,3 +0,3 @@

import cr, { createContext as Ir, useState as Ce, useRef as $r, useCallback as ye, useContext as Dr } from "react";
function kr(r) {
import cr, { createContext as Ir, useState as Ce, useRef as $r, useCallback as ye, useEffect as Dr, useContext as kr } from "react";
function Mr(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;

@@ -16,3 +16,3 @@ }

Ze = 1;
var r = Object.getOwnPropertySymbols, _ = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
var r = Object.getOwnPropertySymbols, E = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
function s(v) {

@@ -49,3 +49,3 @@ if (v == null)

for (var g in c)
_.call(c, g) && (u[g] = c[g]);
E.call(c, g) && (u[g] = c[g]);
if (r) {

@@ -69,10 +69,10 @@ l = r(c);

var Qe;
function Mr() {
function Yr() {
if (Qe)
return pe;
Qe = 1, We();
var r = cr, _ = 60103;
var r = cr, E = 60103;
if (pe.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
var y = Symbol.for;
_ = y("react.element"), pe.Fragment = y("react.fragment");
E = y("react.element"), pe.Fragment = y("react.fragment");
}

@@ -88,3 +88,3 @@ var s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = Object.prototype.hasOwnProperty, v = { key: !0, ref: !0, __self: !0, __source: !0 };

g[d] === void 0 && (g[d] = u[d]);
return { $$typeof: _, type: c, key: T, ref: M, props: g, _owner: s.current };
return { $$typeof: E, type: c, key: T, ref: M, props: g, _owner: s.current };
}

@@ -103,6 +103,6 @@ return pe.jsx = p, pe.jsxs = p, pe;

var er;
function Yr() {
function qr() {
return er || (er = 1, function(r) {
process.env.NODE_ENV !== "production" && function() {
var _ = cr, y = We(), s = 60103, b = 60106;
var E = cr, y = We(), s = 60103, b = 60106;
r.Fragment = 60107;

@@ -114,10 +114,10 @@ var v = 60108, p = 60114, c = 60109, u = 60110, l = 60112, d = 60113, g = 60120, T = 60115, M = 60116, k = 60121, C = 60122, U = 60117, F = 60129, Z = 60131;

}
var A = typeof Symbol == "function" && Symbol.iterator, a = "@@iterator";
function te(e) {
var j = typeof Symbol == "function" && Symbol.iterator, a = "@@iterator";
function Q(e) {
if (e === null || typeof e != "object")
return null;
var t = A && e[A] || e[a];
var t = j && e[j] || e[a];
return typeof t == "function" ? t : null;
}
var Q = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var ee = E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function B(e) {

@@ -132,3 +132,3 @@ {

{
var h = Q.ReactDebugCurrentFrame, W = h.getStackAddendum();
var h = ee.ReactDebugCurrentFrame, W = h.getStackAddendum();
W !== "" && (t += "%s", o = o.concat([W]));

@@ -145,3 +145,3 @@ var L = o.map(function(D) {

}
function _e(e, t, o) {
function Ee(e, t, o) {
var h = t.displayName || t.name || "";

@@ -183,3 +183,3 @@ return e.displayName || (h !== "" ? o + "(" + h + ")" : o);

case l:
return _e(e, e.render, "ForwardRef");
return Ee(e, e.render, "ForwardRef");
case T:

@@ -200,14 +200,14 @@ return z(e.type);

}
var ne = 0, K, ee, oe, fe, n, f, x;
function O() {
var ne = 0, K, re, oe, fe, n, f, O;
function x() {
}
O.__reactDisabledLog = !0;
function E() {
x.__reactDisabledLog = !0;
function _() {
{
if (ne === 0) {
K = console.log, ee = console.info, oe = console.warn, fe = console.error, n = console.group, f = console.groupCollapsed, x = console.groupEnd;
K = console.log, re = console.info, oe = console.warn, fe = console.error, n = console.group, f = console.groupCollapsed, O = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: O,
value: x,
writable: !0

@@ -241,3 +241,3 @@ };

info: y({}, e, {
value: ee
value: re
}),

@@ -257,3 +257,3 @@ warn: y({}, e, {

groupEnd: y({}, e, {
value: x
value: O
})

@@ -265,3 +265,3 @@ });

}
var m = Q.ReactCurrentDispatcher, P;
var m = ee.ReactCurrentDispatcher, P;
function S(e, t, o) {

@@ -298,3 +298,3 @@ {

var L;
L = m.current, m.current = null, E();
L = m.current, m.current = null, _();
try {

@@ -334,13 +334,13 @@ if (t) {

if (ie && h && typeof ie.stack == "string") {
for (var j = ie.stack.split(`
for (var A = ie.stack.split(`
`), H = h.stack.split(`
`), V = j.length - 1, G = H.length - 1; V >= 1 && G >= 0 && j[V] !== H[G]; )
`), V = A.length - 1, G = H.length - 1; V >= 1 && G >= 0 && A[V] !== H[G]; )
G--;
for (; V >= 1 && G >= 0; V--, G--)
if (j[V] !== H[G]) {
if (A[V] !== H[G]) {
if (V !== 1 || G !== 1)
do
if (V--, G--, G < 0 || j[V] !== H[G]) {
if (V--, G--, G < 0 || A[V] !== H[G]) {
var ae = `
` + j[V].replace(" at new ", " at ");
` + A[V].replace(" at new ", " at ");
return typeof e == "function" && w.set(e, ae), ae;

@@ -396,3 +396,3 @@ }

}
var Ne = {}, Ue = Q.ReactDebugCurrentFrame;
var Ne = {}, Ue = ee.ReactDebugCurrentFrame;
function Te(e) {

@@ -410,3 +410,3 @@ if (e) {

if (L(e, D)) {
var j = void 0;
var A = void 0;
try {

@@ -417,11 +417,11 @@ if (typeof e[D] != "function") {

}
j = e[D](t, D, h, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
A = e[D](t, D, h, o, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (V) {
j = V;
A = V;
}
j && !(j instanceof Error) && (Te(W), B("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", o, D, typeof j), Te(null)), j instanceof Error && !(j.message in Ne) && (Ne[j.message] = !0, Te(W), B("Failed %s type: %s", o, j.message), Te(null));
A && !(A instanceof Error) && (Te(W), B("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", o, D, typeof A), Te(null)), A instanceof Error && !(A.message in Ne) && (Ne[A.message] = !0, Te(W), B("Failed %s type: %s", o, A.message), Te(null));
}
}
}
var Ee = Q.ReactCurrentOwner, Pe = Object.prototype.hasOwnProperty, gr = {
var _e = ee.ReactCurrentOwner, Pe = Object.prototype.hasOwnProperty, gr = {
key: !0,

@@ -431,4 +431,4 @@ ref: !0,

__source: !0
}, Fe, Ve, Oe;
Oe = {};
}, Fe, Ve, xe;
xe = {};
function hr(e) {

@@ -450,9 +450,9 @@ if (Pe.call(e, "ref")) {

}
function _r(e, t) {
if (typeof e.ref == "string" && Ee.current && t && Ee.current.stateNode !== t) {
var o = z(Ee.current.type);
Oe[o] || (B('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', z(Ee.current.type), e.ref), Oe[o] = !0);
function Er(e, t) {
if (typeof e.ref == "string" && _e.current && t && _e.current.stateNode !== t) {
var o = z(_e.current.type);
xe[o] || (B('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', z(_e.current.type), e.ref), xe[o] = !0);
}
}
function Er(e, t) {
function _r(e, t) {
{

@@ -480,3 +480,3 @@ var o = function() {

var Tr = function(e, t, o, h, W, L, D) {
var j = {
var A = {
// This tag allows us to uniquely identify this as a React Element

@@ -492,3 +492,3 @@ $$typeof: s,

};
return j._store = {}, Object.defineProperty(j._store, "validated", {
return A._store = {}, Object.defineProperty(A._store, "validated", {
configurable: !1,

@@ -498,3 +498,3 @@ enumerable: !1,

value: !1
}), Object.defineProperty(j, "_self", {
}), Object.defineProperty(A, "_self", {
configurable: !1,

@@ -504,3 +504,3 @@ enumerable: !1,

value: h
}), Object.defineProperty(j, "_source", {
}), Object.defineProperty(A, "_source", {
configurable: !1,

@@ -510,8 +510,8 @@ enumerable: !1,

value: W
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
}), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
};
function Rr(e, t, o, h, W) {
{
var L, D = {}, j = null, H = null;
o !== void 0 && (j = "" + o), br(t) && (j = "" + t.key), hr(t) && (H = t.ref, _r(t, W));
var L, D = {}, A = null, H = null;
o !== void 0 && (A = "" + o), br(t) && (A = "" + t.key), hr(t) && (H = t.ref, Er(t, W));
for (L in t)

@@ -524,10 +524,10 @@ Pe.call(t, L) && !gr.hasOwnProperty(L) && (D[L] = t[L]);

}
if (j || H) {
if (A || H) {
var G = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
j && Er(D, G), H && mr(D, G);
A && _r(D, G), H && mr(D, G);
}
return Tr(e, j, H, W, h, Ee.current, D);
return Tr(e, A, H, W, h, _e.current, D);
}
}
var xe = Q.ReactCurrentOwner, Ge = Q.ReactDebugCurrentFrame;
var Oe = ee.ReactCurrentOwner, Ge = ee.ReactDebugCurrentFrame;
function de(e) {

@@ -547,4 +547,4 @@ if (e) {

{
if (xe.current) {
var e = z(xe.current.type);
if (Oe.current) {
var e = z(Oe.current.type);
if (e)

@@ -570,3 +570,3 @@ return `

var ze = {};
function Or(e) {
function xr(e) {
{

@@ -588,3 +588,3 @@ var t = Be();

e._store.validated = !0;
var o = Or(t);
var o = xr(t);
if (ze[o])

@@ -594,3 +594,3 @@ return;

var h = "";
e && e._owner && e._owner !== xe.current && (h = " It was passed a child from " + z(e._owner.type) + "."), de(e), B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, h), de(null);
e && e._owner && e._owner !== Oe.current && (h = " It was passed a child from " + z(e._owner.type) + "."), de(e), B('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', o, h), de(null);
}

@@ -610,3 +610,3 @@ }

else if (e) {
var W = te(e);
var W = Q(e);
if (typeof W == "function" && W !== e.entries)

@@ -618,3 +618,3 @@ for (var L = W.call(e), D; !(D = L.next()).done; )

}
function xr(e) {
function Or(e) {
{

@@ -660,8 +660,8 @@ var t = e.type;

if (!D) {
var j = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (j += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var A = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (A += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var H = Pr(W);
H ? j += H : j += Be();
H ? A += H : A += Be();
var V;
e === null ? V = "null" : Array.isArray(e) ? V = "array" : e !== void 0 && e.$$typeof === s ? (V = "<" + (z(e.type) || "Unknown") + " />", j = " Did you accidentally export a JSX literal instead of a component?") : V = typeof e, B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, j);
e === null ? V = "null" : Array.isArray(e) ? V = "array" : e !== void 0 && e.$$typeof === s ? (V = "<" + (z(e.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : V = typeof e, B("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, A);
}

@@ -684,3 +684,3 @@ var G = Rr(e, t, o, W, L);

}
return e === r.Fragment ? Sr(G) : xr(G), G;
return e === r.Fragment ? Sr(G) : Or(G), G;
}

@@ -699,4 +699,4 @@ }

}
process.env.NODE_ENV === "production" ? Ye.exports = Mr() : Ye.exports = Yr();
var re = Ye.exports, qe = { exports: {} }, Re = { exports: {} }, Y = {};
process.env.NODE_ENV === "production" ? Ye.exports = Yr() : Ye.exports = qr();
var te = Ye.exports, qe = { exports: {} }, Re = { exports: {} }, Y = {};
/** @license React v16.13.1

@@ -711,12 +711,12 @@ * react-is.production.min.js

var rr;
function qr() {
function Wr() {
if (rr)
return Y;
rr = 1;
var r = typeof Symbol == "function" && Symbol.for, _ = r ? Symbol.for("react.element") : 60103, y = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, l = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, T = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119;
var r = typeof Symbol == "function" && Symbol.for, E = r ? Symbol.for("react.element") : 60103, y = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, l = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, T = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119;
function R(a) {
if (typeof a == "object" && a !== null) {
var te = a.$$typeof;
switch (te) {
case _:
var Q = a.$$typeof;
switch (Q) {
case E:
switch (a = a.type, a) {

@@ -739,16 +739,16 @@ case u:

default:
return te;
return Q;
}
}
case y:
return te;
return Q;
}
}
}
function A(a) {
function j(a) {
return R(a) === l;
}
return Y.AsyncMode = u, Y.ConcurrentMode = l, Y.ContextConsumer = c, Y.ContextProvider = p, Y.Element = _, Y.ForwardRef = d, Y.Fragment = s, Y.Lazy = k, Y.Memo = M, Y.Portal = y, Y.Profiler = v, Y.StrictMode = b, Y.Suspense = g, Y.isAsyncMode = function(a) {
return A(a) || R(a) === u;
}, Y.isConcurrentMode = A, Y.isContextConsumer = function(a) {
return Y.AsyncMode = u, Y.ConcurrentMode = l, Y.ContextConsumer = c, Y.ContextProvider = p, Y.Element = E, Y.ForwardRef = d, Y.Fragment = s, Y.Lazy = k, Y.Memo = M, Y.Portal = y, Y.Profiler = v, Y.StrictMode = b, Y.Suspense = g, Y.isAsyncMode = function(a) {
return j(a) || R(a) === u;
}, Y.isConcurrentMode = j, Y.isContextConsumer = function(a) {
return R(a) === c;

@@ -758,3 +758,3 @@ }, Y.isContextProvider = function(a) {

}, Y.isElement = function(a) {
return typeof a == "object" && a !== null && a.$$typeof === _;
return typeof a == "object" && a !== null && a.$$typeof === E;
}, Y.isForwardRef = function(a) {

@@ -790,5 +790,5 @@ return R(a) === d;

var tr;
function Wr() {
function Lr() {
return tr || (tr = 1, process.env.NODE_ENV !== "production" && function() {
var r = typeof Symbol == "function" && Symbol.for, _ = r ? Symbol.for("react.element") : 60103, y = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, l = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, T = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119;
var r = typeof Symbol == "function" && Symbol.for, E = r ? Symbol.for("react.element") : 60103, y = r ? Symbol.for("react.portal") : 60106, s = r ? Symbol.for("react.fragment") : 60107, b = r ? Symbol.for("react.strict_mode") : 60108, v = r ? Symbol.for("react.profiler") : 60114, p = r ? Symbol.for("react.provider") : 60109, c = r ? Symbol.for("react.context") : 60110, u = r ? Symbol.for("react.async_mode") : 60111, l = r ? Symbol.for("react.concurrent_mode") : 60111, d = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, T = r ? Symbol.for("react.suspense_list") : 60120, M = r ? Symbol.for("react.memo") : 60115, k = r ? Symbol.for("react.lazy") : 60116, C = r ? Symbol.for("react.block") : 60121, U = r ? Symbol.for("react.fundamental") : 60117, F = r ? Symbol.for("react.responder") : 60118, Z = r ? Symbol.for("react.scope") : 60119;
function R(i) {

@@ -798,7 +798,7 @@ return typeof i == "string" || typeof i == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.

}
function A(i) {
function j(i) {
if (typeof i == "object" && i !== null) {
var X = i.$$typeof;
switch (X) {
case _:
case E:
var le = i.type;

@@ -831,43 +831,43 @@ switch (le) {

}
var a = u, te = l, Q = c, B = p, he = _, be = d, ue = s, _e = k, ce = M, z = y, ne = v, K = b, ee = g, oe = !1;
var a = u, Q = l, ee = c, B = p, he = E, be = d, ue = s, Ee = k, ce = M, z = y, ne = v, K = b, re = g, oe = !1;
function fe(i) {
return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), n(i) || A(i) === u;
return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), n(i) || j(i) === u;
}
function n(i) {
return A(i) === l;
return j(i) === l;
}
function f(i) {
return A(i) === c;
return j(i) === c;
}
function O(i) {
return j(i) === p;
}
function x(i) {
return A(i) === p;
return typeof i == "object" && i !== null && i.$$typeof === E;
}
function O(i) {
return typeof i == "object" && i !== null && i.$$typeof === _;
function _(i) {
return j(i) === d;
}
function E(i) {
return A(i) === d;
}
function I(i) {
return A(i) === s;
return j(i) === s;
}
function m(i) {
return A(i) === k;
return j(i) === k;
}
function P(i) {
return A(i) === M;
return j(i) === M;
}
function S(i) {
return A(i) === y;
return j(i) === y;
}
function $(i) {
return A(i) === v;
return j(i) === v;
}
function w(i) {
return A(i) === b;
return j(i) === b;
}
function J(i) {
return A(i) === g;
return j(i) === g;
}
q.AsyncMode = a, q.ConcurrentMode = te, q.ContextConsumer = Q, q.ContextProvider = B, q.Element = he, q.ForwardRef = be, q.Fragment = ue, q.Lazy = _e, q.Memo = ce, q.Portal = z, q.Profiler = ne, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = fe, q.isConcurrentMode = n, q.isContextConsumer = f, q.isContextProvider = x, q.isElement = O, q.isForwardRef = E, q.isFragment = I, q.isLazy = m, q.isMemo = P, q.isPortal = S, q.isProfiler = $, q.isStrictMode = w, q.isSuspense = J, q.isValidElementType = R, q.typeOf = A;
q.AsyncMode = a, q.ConcurrentMode = Q, q.ContextConsumer = ee, q.ContextProvider = B, q.Element = he, q.ForwardRef = be, q.Fragment = ue, q.Lazy = Ee, q.Memo = ce, q.Portal = z, q.Profiler = ne, q.StrictMode = K, q.Suspense = re, q.isAsyncMode = fe, q.isConcurrentMode = n, q.isContextConsumer = f, q.isContextProvider = O, q.isElement = x, q.isForwardRef = _, q.isFragment = I, q.isLazy = m, q.isMemo = P, q.isPortal = S, q.isProfiler = $, q.isStrictMode = w, q.isSuspense = J, q.isValidElementType = R, q.typeOf = j;
}()), q;

@@ -877,3 +877,3 @@ }

function fr() {
return nr || (nr = 1, process.env.NODE_ENV === "production" ? Re.exports = qr() : Re.exports = Wr()), Re.exports;
return nr || (nr = 1, process.env.NODE_ENV === "production" ? Re.exports = Wr() : Re.exports = Lr()), Re.exports;
}

@@ -893,3 +893,3 @@ var Ie, ar;

var De, or;
function Lr() {
function Nr() {
if (or)

@@ -901,3 +901,3 @@ return De;

if (process.env.NODE_ENV !== "production") {
var _ = Le(), y = {}, s = lr();
var E = Le(), y = {}, s = lr();
r = function(v) {

@@ -924,3 +924,3 @@ var p = "Warning: " + v;

}
g = v[d](p, d, u, c, null, _);
g = v[d](p, d, u, c, null, E);
} catch (k) {

@@ -946,7 +946,7 @@ g = k;

var ke, sr;
function Nr() {
function Ur() {
if (sr)
return ke;
sr = 1;
var r = fr(), _ = We(), y = Le(), s = lr(), b = Lr(), v = function() {
var r = fr(), E = We(), y = Le(), s = lr(), b = Nr(), v = function() {
};

@@ -982,10 +982,10 @@ process.env.NODE_ENV !== "production" && (v = function(c) {

arrayOf: R,
element: A(),
element: j(),
elementType: a(),
instanceOf: te,
instanceOf: Q,
node: be(),
objectOf: B,
oneOf: Q,
oneOf: ee,
oneOfType: he,
shape: _e,
shape: Ee,
exact: ce

@@ -1002,4 +1002,4 @@ };

if (process.env.NODE_ENV !== "production")
var f = {}, x = 0;
function O(I, m, P, S, $, w, J) {
var f = {}, O = 0;
function x(I, m, P, S, $, w, J) {
if (S = S || T, w = w || P, J !== y) {

@@ -1014,5 +1014,5 @@ if (u) {

!f[X] && // Avoid spamming the console because they are often not actionable except for lib authors
x < 3 && (v(
O < 3 && (v(
"You are manually calling a React.PropTypes validation function for the `" + w + "` prop on `" + S + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
), f[X] = !0, x++);
), f[X] = !0, O++);
}

@@ -1022,12 +1022,12 @@ }

}
var E = O.bind(null, !1);
return E.isRequired = O.bind(null, !0), E;
var _ = x.bind(null, !1);
return _.isRequired = x.bind(null, !0), _;
}
function F(n) {
function f(x, O, E, I, m, P) {
var S = x[O], $ = K(S);
function f(O, x, _, I, m, P) {
var S = O[x], $ = K(S);
if ($ !== n) {
var w = ee(S);
var w = re(S);
return new C(
"Invalid " + I + " `" + m + "` of type " + ("`" + w + "` supplied to `" + E + "`, expected ") + ("`" + n + "`."),
"Invalid " + I + " `" + m + "` of type " + ("`" + w + "` supplied to `" + _ + "`, expected ") + ("`" + n + "`."),
{ expectedType: n }

@@ -1044,12 +1044,12 @@ );

function R(n) {
function f(x, O, E, I, m) {
function f(O, x, _, I, m) {
if (typeof n != "function")
return new C("Property `" + m + "` of component `" + E + "` has invalid PropType notation inside arrayOf.");
var P = x[O];
return new C("Property `" + m + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
var P = O[x];
if (!Array.isArray(P)) {
var S = K(P);
return new C("Invalid " + I + " `" + m + "` of type " + ("`" + S + "` supplied to `" + E + "`, expected an array."));
return new C("Invalid " + I + " `" + m + "` of type " + ("`" + S + "` supplied to `" + _ + "`, expected an array."));
}
for (var $ = 0; $ < P.length; $++) {
var w = n(P, $, E, I, m + "[" + $ + "]", y);
var w = n(P, $, _, I, m + "[" + $ + "]", y);
if (w instanceof Error)

@@ -1062,8 +1062,8 @@ return w;

}
function A() {
function n(f, x, O, E, I) {
var m = f[x];
function j() {
function n(f, O, x, _, I) {
var m = f[O];
if (!c(m)) {
var P = K(m);
return new C("Invalid " + E + " `" + I + "` of type " + ("`" + P + "` supplied to `" + O + "`, expected a single ReactElement."));
return new C("Invalid " + _ + " `" + I + "` of type " + ("`" + P + "` supplied to `" + x + "`, expected a single ReactElement."));
}

@@ -1075,7 +1075,7 @@ return null;

function a() {
function n(f, x, O, E, I) {
var m = f[x];
function n(f, O, x, _, I) {
var m = f[O];
if (!r.isValidElementType(m)) {
var P = K(m);
return new C("Invalid " + E + " `" + I + "` of type " + ("`" + P + "` supplied to `" + O + "`, expected a single ReactElement type."));
return new C("Invalid " + _ + " `" + I + "` of type " + ("`" + P + "` supplied to `" + x + "`, expected a single ReactElement type."));
}

@@ -1086,7 +1086,7 @@ return null;

}
function te(n) {
function f(x, O, E, I, m) {
if (!(x[O] instanceof n)) {
var P = n.name || T, S = fe(x[O]);
return new C("Invalid " + I + " `" + m + "` of type " + ("`" + S + "` supplied to `" + E + "`, expected ") + ("instance of `" + P + "`."));
function Q(n) {
function f(O, x, _, I, m) {
if (!(O[x] instanceof n)) {
var P = n.name || T, S = fe(O[x]);
return new C("Invalid " + I + " `" + m + "` of type " + ("`" + S + "` supplied to `" + _ + "`, expected ") + ("instance of `" + P + "`."));
}

@@ -1097,3 +1097,3 @@ return null;

}
function Q(n) {
function ee(n) {
if (!Array.isArray(n))

@@ -1103,11 +1103,11 @@ return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? v(

) : v("Invalid argument supplied to oneOf, expected an array.")), p;
function f(x, O, E, I, m) {
for (var P = x[O], S = 0; S < n.length; S++)
function f(O, x, _, I, m) {
for (var P = O[x], S = 0; S < n.length; S++)
if (k(P, n[S]))
return null;
var $ = JSON.stringify(n, function(J, i) {
var X = ee(i);
var X = re(i);
return X === "symbol" ? String(i) : i;
});
return new C("Invalid " + I + " `" + m + "` of value `" + String(P) + "` " + ("supplied to `" + E + "`, expected one of " + $ + "."));
return new C("Invalid " + I + " `" + m + "` of value `" + String(P) + "` " + ("supplied to `" + _ + "`, expected one of " + $ + "."));
}

@@ -1117,11 +1117,11 @@ return U(f);

function B(n) {
function f(x, O, E, I, m) {
function f(O, x, _, I, m) {
if (typeof n != "function")
return new C("Property `" + m + "` of component `" + E + "` has invalid PropType notation inside objectOf.");
var P = x[O], S = K(P);
return new C("Property `" + m + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
var P = O[x], S = K(P);
if (S !== "object")
return new C("Invalid " + I + " `" + m + "` of type " + ("`" + S + "` supplied to `" + E + "`, expected an object."));
return new C("Invalid " + I + " `" + m + "` of type " + ("`" + S + "` supplied to `" + _ + "`, expected an object."));
for (var $ in P)
if (s(P, $)) {
var w = n(P, $, E, I, m + "." + $, y);
var w = n(P, $, _, I, m + "." + $, y);
if (w instanceof Error)

@@ -1138,11 +1138,11 @@ return w;

for (var f = 0; f < n.length; f++) {
var x = n[f];
if (typeof x != "function")
var O = n[f];
if (typeof O != "function")
return v(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(x) + " at index " + f + "."
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(O) + " at index " + f + "."
), p;
}
function O(E, I, m, P, S) {
function x(_, I, m, P, S) {
for (var $ = [], w = 0; w < n.length; w++) {
var J = n[w], i = J(E, I, m, P, S, y);
var J = n[w], i = J(_, I, m, P, S, y);
if (i == null)

@@ -1155,25 +1155,25 @@ return null;

}
return U(O);
return U(x);
}
function be() {
function n(f, x, O, E, I) {
return z(f[x]) ? null : new C("Invalid " + E + " `" + I + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
function n(f, O, x, _, I) {
return z(f[O]) ? null : new C("Invalid " + _ + " `" + I + "` supplied to " + ("`" + x + "`, expected a ReactNode."));
}
return U(n);
}
function ue(n, f, x, O, E) {
function ue(n, f, O, x, _) {
return new C(
(n || "React class") + ": " + f + " type `" + x + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + E + "`."
(n || "React class") + ": " + f + " type `" + O + "." + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
);
}
function _e(n) {
function f(x, O, E, I, m) {
var P = x[O], S = K(P);
function Ee(n) {
function f(O, x, _, I, m) {
var P = O[x], S = K(P);
if (S !== "object")
return new C("Invalid " + I + " `" + m + "` of type `" + S + "` " + ("supplied to `" + E + "`, expected `object`."));
return new C("Invalid " + I + " `" + m + "` of type `" + S + "` " + ("supplied to `" + _ + "`, expected `object`."));
for (var $ in n) {
var w = n[$];
if (typeof w != "function")
return ue(E, I, m, $, ee(w));
var J = w(P, $, E, I, m + "." + $, y);
return ue(_, I, m, $, re(w));
var J = w(P, $, _, I, m + "." + $, y);
if (J)

@@ -1187,17 +1187,17 @@ return J;

function ce(n) {
function f(x, O, E, I, m) {
var P = x[O], S = K(P);
function f(O, x, _, I, m) {
var P = O[x], S = K(P);
if (S !== "object")
return new C("Invalid " + I + " `" + m + "` of type `" + S + "` " + ("supplied to `" + E + "`, expected `object`."));
var $ = _({}, x[O], n);
return new C("Invalid " + I + " `" + m + "` of type `" + S + "` " + ("supplied to `" + _ + "`, expected `object`."));
var $ = E({}, O[x], n);
for (var w in $) {
var J = n[w];
if (s(n, w) && typeof J != "function")
return ue(E, I, m, w, ee(J));
return ue(_, I, m, w, re(J));
if (!J)
return new C(
"Invalid " + I + " `" + m + "` key `" + w + "` supplied to `" + E + "`.\nBad object: " + JSON.stringify(x[O], null, " ") + `
"Invalid " + I + " `" + m + "` key `" + w + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(O[x], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(n), null, " ")
);
var i = J(P, w, E, I, m + "." + w, y);
var i = J(P, w, _, I, m + "." + w, y);
if (i)

@@ -1225,11 +1225,11 @@ return i;

if (f) {
var x = f.call(n), O;
var O = f.call(n), x;
if (f !== n.entries) {
for (; !(O = x.next()).done; )
if (!z(O.value))
for (; !(x = O.next()).done; )
if (!z(x.value))
return !1;
} else
for (; !(O = x.next()).done; ) {
var E = O.value;
if (E && !z(E[1]))
for (; !(x = O.next()).done; ) {
var _ = x.value;
if (_ && !z(_[1]))
return !1;

@@ -1251,3 +1251,3 @@ }

}
function ee(n) {
function re(n) {
if (typeof n > "u" || n === null)

@@ -1265,3 +1265,3 @@ return "" + n;

function oe(n) {
var f = ee(n);
var f = re(n);
switch (f) {

@@ -1286,3 +1286,3 @@ case "array":

var Me, ur;
function Ur() {
function Fr() {
if (ur)

@@ -1292,7 +1292,7 @@ return Me;

var r = Le();
function _() {
function E() {
}
function y() {
}
return y.resetWarningCache = _, Me = function() {
return y.resetWarningCache = E, Me = function() {
function s(p, c, u, l, d, g) {

@@ -1331,3 +1331,3 @@ if (g !== r) {

checkPropTypes: y,
resetWarningCache: _
resetWarningCache: E
};

@@ -1338,16 +1338,16 @@ return v.PropTypes = v, v;

if (process.env.NODE_ENV !== "production") {
var Fr = fr(), Vr = !0;
qe.exports = Nr()(Fr.isElement, Vr);
var Vr = fr(), Gr = !0;
qe.exports = Ur()(Vr.isElement, Gr);
} else
qe.exports = Ur()();
var Gr = qe.exports;
const N = /* @__PURE__ */ kr(Gr), ge = (r = []) => {
qe.exports = Fr()();
var Br = qe.exports;
const N = /* @__PURE__ */ Mr(Br), ge = (r = []) => {
if (!r || !Array.isArray(r) || !r.length)
return null;
let _ = [];
let E = [];
return r.forEach((y) => {
typeof y == "string" && _.push(y);
}), _.join(" ");
typeof y == "string" && E.push(y);
}), E.join(" ");
};
const dr = Ir(), Br = {
const dr = Ir(), zr = {
isDragging: !1,

@@ -1358,5 +1358,5 @@ start: 0,

scrolling: !0
}, zr = 50, vr = ({
}, Jr = 50, vr = ({
items: r,
loop: _,
loop: E,
draggable: y,

@@ -1372,23 +1372,28 @@ onChange: s,

() => b || 0
), [M, k] = Ce(() => Br), C = $r([]);
), [M, k] = Ce(() => zr), C = $r([]);
if (!Array.isArray(r))
throw new Error("<Gallery> items prop must be an Array.");
const U = ye(() => {
T(l), d((A) => {
let a = A + 1;
return A === r.length - 1 && (a = _ ? 0 : A), s && s({ oldIndex: A, newIndex: a, direction: 1 }), a;
T(l), d((j) => {
let a = j + 1;
return j === r.length - 1 && (a = E ? 0 : j), s && s({ oldIndex: j, newIndex: a, direction: 1 }), a;
});
}, [l, r.length, _, s]), F = ye(() => {
T(l), d((A) => {
let a = A - 1;
return A === 0 && (a = _ ? r.length - 1 : A), s && s({ oldIndex: A, newIndex: a, direction: 0 }), a;
}, [l, r.length, E, s]), F = ye(() => {
T(l), d((j) => {
let a = j - 1;
return j === 0 && (a = E ? r.length - 1 : j), s && s({ oldIndex: j, newIndex: a, direction: 0 }), a;
});
}, [l, r.length, _, s]), Z = ye(
(A) => {
T(l), d(A);
const a = A - l > 0 ? 1 : 0;
s && s({ oldIndex: l, newIndex: A, direction: a });
}, [l, r.length, E, s]), Z = ye(
(j) => {
const a = r[j] ? j : 0;
T(l), d(a);
const Q = a - l > 0 ? 1 : 0;
s && s({ oldIndex: l, newIndex: a, direction: Q });
},
[l, s]
), R = {
[l, s, r]
);
Dr(() => {
r[l] || Z();
}, [l, r, Z]);
const R = {
galleryItems: r,

@@ -1404,11 +1409,11 @@ itemNodes: C,

previous: F,
loop: _,
loop: E,
draggable: y,
touchState: M,
setTouchState: k,
swipeThreshold: zr,
swipeThreshold: Jr,
onChange: s,
visibleRange: v
};
return /* @__PURE__ */ re.jsx(dr.Provider, { value: R, children: /* @__PURE__ */ re.jsxs(
return /* @__PURE__ */ te.jsx(dr.Provider, { value: R, children: /* @__PURE__ */ te.jsxs(
"div",

@@ -1420,3 +1425,3 @@ {

u,
p && /* @__PURE__ */ re.jsx("p", { "aria-live": "polite", className: "gallery-util-visually-hidden", children: p.replace("$i", l + 1).replace("$t", r.length) })
p && /* @__PURE__ */ te.jsx("p", { "aria-live": "polite", className: "gallery-util-visually-hidden", children: p.replace("$i", l + 1).replace("$t", r.length) })
]

@@ -1445,7 +1450,7 @@ }

const me = () => {
const r = Dr(dr);
const r = kr(dr);
if (!r)
throw new Error("useGallery must be called from within a <Gallery>.");
return r;
}, Jr = ({ renderGalleryItem: r, className: _, ...y }) => {
}, Hr = ({ renderGalleryItem: r, className: E, ...y }) => {
const {

@@ -1501,6 +1506,6 @@ activeIndex: s,

]);
return /* @__PURE__ */ re.jsx(
return /* @__PURE__ */ te.jsx(
"ul",
{
className: ge(["gallery__main", _]),
className: ge(["gallery__main", E]),
onPointerDown: c && g,

@@ -1515,3 +1520,3 @@ onPointerMove: c && T,

};
Jr.propTypes = {
Hr.propTypes = {
renderGalleryItem: N.func.isRequired,

@@ -1522,3 +1527,3 @@ className: N.string

index: r,
active: _,
active: E,
className: y,

@@ -1531,3 +1536,3 @@ children: s,

};
return /* @__PURE__ */ re.jsx("li", { className: ge(["gallery__pagination-item", y]), ...b, children: /* @__PURE__ */ re.jsx("button", { onClick: () => c(r), "aria-current": _ ? "true" : null, children: s }) });
return /* @__PURE__ */ te.jsx("li", { className: ge(["gallery__pagination-item", y]), ...b, children: /* @__PURE__ */ te.jsx("button", { onClick: () => c(r), "aria-current": E ? "true" : null, children: s }) });
};

@@ -1540,16 +1545,16 @@ pr.propTypes = {

};
const Hr = ({ renderPaginationItem: r, className: _, ...y }) => {
const Kr = ({ renderPaginationItem: r, className: E, ...y }) => {
const { activeIndex: s, galleryItems: b } = me();
return /* @__PURE__ */ re.jsx("ul", { className: ge(["gallery__pagination", _]), ...y, children: b.map((v, p) => {
return /* @__PURE__ */ te.jsx("ul", { className: ge(["gallery__pagination", E]), ...y, children: b.map((v, p) => {
const c = s === p;
return /* @__PURE__ */ re.jsx(pr, { index: p, active: c, children: r({ item: v, i: p, activeIndex: s, active: c }) }, p);
return /* @__PURE__ */ te.jsx(pr, { index: p, active: c, children: r({ item: v, i: p, activeIndex: s, active: c }) }, p);
}) });
};
Hr.propTypes = {
Kr.propTypes = {
renderPaginationItem: N.func.isRequired,
className: N.string
};
const Kr = ({
const Xr = ({
direction: r,
renderNavItem: _,
renderNavItem: E,
className: y,

@@ -1565,3 +1570,3 @@ children: s,

};
return !s && !_ ? null : /* @__PURE__ */ re.jsx(
return !s && !E ? null : /* @__PURE__ */ te.jsx(
"button",

@@ -1577,7 +1582,7 @@ {

...b,
children: s || _({ activeIndex: u, disabled: !c && g })
children: s || E({ activeIndex: u, disabled: !c && g })
}
);
};
Kr.propTypes = {
Xr.propTypes = {
direction: N.oneOf([0, 1]).isRequired,

@@ -1588,3 +1593,3 @@ renderNavItem: N.func,

};
const Xr = ({ index: r, active: _, className: y, children: s, ...b }) => {
const Zr = ({ index: r, active: E, className: y, children: s, ...b }) => {
const {

@@ -1598,6 +1603,6 @@ itemNodes: v,

} = me(), g = {
"aria-hidden": _ ? null : "true",
tabIndex: _ ? 0 : -1
"aria-hidden": E ? null : "true",
tabIndex: E ? 0 : -1
};
return /* @__PURE__ */ re.jsx(
return /* @__PURE__ */ te.jsx(
"li",

@@ -1612,3 +1617,3 @@ {

u && l.offsetting && "gallery__item--dragging",
_ && "gallery__item--active",
E && "gallery__item--active",
r === c && "gallery__item--was-active",

@@ -1625,3 +1630,3 @@ r < p && "gallery__item--left",

"--side": r < p ? -1 : r > p ? 1 : 0,
"--active": _ ? 1 : 0
"--active": E ? 1 : 0
},

@@ -1632,3 +1637,3 @@ children: s

};
Xr.propTypes = {
Zr.propTypes = {
index: N.number.isRequired,

@@ -1641,7 +1646,7 @@ active: N.bool.isRequired,

vr as Gallery,
Xr as GalleryItem,
Jr as GalleryMain,
Kr as GalleryNav,
Hr as GalleryPagination,
Zr as GalleryItem,
Hr as GalleryMain,
Xr as GalleryNav,
Kr as GalleryPagination,
me as useGallery
};
{
"name": "@wethegit/react-gallery",
"version": "2.0.0",
"version": "2.0.1",
"description": "A customizable, accessible gallery component for React projects.",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc