react-next-tilt
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -18,3 +18,3 @@ import cr, { forwardRef as pr, useRef as xe, useCallback as R, useMemo as or, useImperativeHandle as mr, useEffect as ir, memo as hr } from "react"; | ||
var a = cr, o = Symbol.for("react.element"), v = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, m = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function te(C, w, ne) { | ||
function te(S, w, ne) { | ||
var j, O = {}, A = null, me = null; | ||
@@ -24,6 +24,6 @@ ne !== void 0 && (A = "" + ne), w.key !== void 0 && (A = "" + w.key), w.ref !== void 0 && (me = w.ref); | ||
i.call(w, j) && !h.hasOwnProperty(j) && (O[j] = w[j]); | ||
if (C && C.defaultProps) | ||
for (j in w = C.defaultProps, w) | ||
if (S && S.defaultProps) | ||
for (j in w = S.defaultProps, w) | ||
O[j] === void 0 && (O[j] = w[j]); | ||
return { $$typeof: o, type: C, key: A, ref: me, props: O, _owner: m.current }; | ||
return { $$typeof: o, type: S, key: A, ref: me, props: O, _owner: m.current }; | ||
} | ||
@@ -45,3 +45,3 @@ return Ve.Fragment = v, Ve.jsx = te, Ve.jsxs = te, Ve; | ||
return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() { | ||
var a = cr, o = Symbol.for("react.element"), v = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), te = Symbol.for("react.provider"), C = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), me = Symbol.for("react.offscreen"), ae = Symbol.iterator, Qe = "@@iterator"; | ||
var a = cr, o = Symbol.for("react.element"), v = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), te = Symbol.for("react.provider"), S = Symbol.for("react.context"), w = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), me = Symbol.for("react.offscreen"), ae = Symbol.iterator, Qe = "@@iterator"; | ||
function Ne(e) { | ||
@@ -74,3 +74,3 @@ if (e === null || typeof e != "object") | ||
function Re(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === i || e === h || X || e === m || e === ne || e === j || U || e === me || he || Ge || Be || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === O || e.$$typeof === te || e.$$typeof === C || e.$$typeof === w || // This needs to include all possible module reference object | ||
return !!(typeof e == "string" || typeof e == "function" || e === i || e === h || X || e === m || e === ne || e === j || U || e === me || he || Ge || Be || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === O || e.$$typeof === te || e.$$typeof === S || e.$$typeof === w || // This needs to include all possible module reference object | ||
// types supported by any Flight configuration anywhere since | ||
@@ -114,3 +114,3 @@ // we don't know which Flight build this will end up being used | ||
switch (e.$$typeof) { | ||
case C: | ||
case S: | ||
var r = e; | ||
@@ -267,10 +267,10 @@ return x(r) + ".Consumer"; | ||
for (var u = ee.stack.split(` | ||
`), S = f.stack.split(` | ||
`), y = u.length - 1, g = S.length - 1; y >= 1 && g >= 0 && u[y] !== S[g]; ) | ||
`), C = f.stack.split(` | ||
`), y = u.length - 1, g = C.length - 1; y >= 1 && g >= 0 && u[y] !== C[g]; ) | ||
g--; | ||
for (; y >= 1 && g >= 0; y--, g--) | ||
if (u[y] !== S[g]) { | ||
if (u[y] !== C[g]) { | ||
if (y !== 1 || g !== 1) | ||
do | ||
if (y--, g--, g < 0 || u[y] !== S[g]) { | ||
if (y--, g--, g < 0 || u[y] !== C[g]) { | ||
var Y = ` | ||
@@ -342,4 +342,4 @@ ` + u[y].replace(" at new ", " at "); | ||
if (typeof e[c] != "function") { | ||
var S = Error((f || "React class") + ": " + t + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw S.name = "Invariant Violation", S; | ||
var C = Error((f || "React class") + ": " + t + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw C.name = "Invariant Violation", C; | ||
} | ||
@@ -429,3 +429,3 @@ u = e[c](r, c, f, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} | ||
var Se = function(e, r, t, f, d, p, c) { | ||
var Ce = function(e, r, t, f, d, p, c) { | ||
var u = { | ||
@@ -461,4 +461,4 @@ // This tag allows us to uniquely identify this as a React Element | ||
{ | ||
var p, c = {}, u = null, S = null; | ||
t !== void 0 && (Ae(t), u = "" + t), He(r) && (Ae(r.key), u = "" + r.key), ce(r) && (S = r.ref, le(r, d)); | ||
var p, c = {}, u = null, C = null; | ||
t !== void 0 && (Ae(t), u = "" + t), He(r) && (Ae(r.key), u = "" + r.key), ce(r) && (C = r.ref, le(r, d)); | ||
for (p in r) | ||
@@ -471,7 +471,7 @@ Te.call(r, p) && !je.hasOwnProperty(p) && (c[p] = r[p]); | ||
} | ||
if (u || S) { | ||
if (u || C) { | ||
var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
u && de(c, g), S && Q(c, g); | ||
u && de(c, g), C && Q(c, g); | ||
} | ||
return Se(e, u, S, d, f, _e.current, c); | ||
return Ce(e, u, C, d, f, _e.current, c); | ||
} | ||
@@ -515,3 +515,3 @@ } | ||
} | ||
var Ce = {}; | ||
var Se = {}; | ||
function n(e) { | ||
@@ -535,5 +535,5 @@ { | ||
var t = n(r); | ||
if (Ce[t]) | ||
if (Se[t]) | ||
return; | ||
Ce[t] = !0; | ||
Se[t] = !0; | ||
var f = ""; | ||
@@ -605,4 +605,4 @@ e && e._owner && e._owner !== D.current && (f = " It was passed a child from " + _(e._owner.type) + "."), P(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, f), P(null); | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " 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 S = be(d); | ||
S ? u += S : u += pe(); | ||
var C = be(d); | ||
C ? u += C : u += pe(); | ||
var y; | ||
@@ -736,3 +736,3 @@ e === null ? y = "null" : K(e) ? y = "array" : e !== void 0 && e.$$typeof === o ? (y = "<" + (_(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, u); | ||
shadow: te = "0 0 1rem rgba(0,0,0,0.5)", | ||
lineGlareEnable: C = !0, | ||
lineGlareEnable: S = !0, | ||
lineGlareBlurEnable: w = !0, | ||
@@ -789,3 +789,3 @@ lineGlareBlurAmount: ne = "4px", | ||
), _e = qe || Ae; | ||
C && (O = B(O, 0, 50) / 2), U = B(U, 0, 90), X = B(X, 0, 90), I = B(I, 0, 90), V = B(V, 0, 90), L && (L = B( | ||
S && (O = B(O, 0, 50) / 2), U = B(U, 0, 90), X = B(X, 0, 90), I = B(I, 0, 90), V = B(V, 0, 90), L && (L = B( | ||
L, | ||
@@ -799,3 +799,3 @@ -U, | ||
)); | ||
const je = or(() => C ? (100 - O) / 2 : 0, [C, O]), Ie = or(() => C ? je + O : 0, [C, O, je]), Z = R(() => { | ||
const je = or(() => S ? (100 - O) / 2 : 0, [S, O]), Ie = or(() => S ? je + O : 0, [S, O, je]), Z = R(() => { | ||
if (!K.current || !F.current || !b.current) | ||
@@ -863,3 +863,3 @@ return; | ||
})); | ||
}, [L, x, ae, ge, de]), Se = R( | ||
}, [L, x, ae, ge, de]), Ce = R( | ||
(n, s) => { | ||
@@ -921,3 +921,3 @@ if (!s) | ||
(n) => { | ||
T || (Se( | ||
T || (Ce( | ||
{ x: n.clientX, y: n.clientY }, | ||
@@ -930,3 +930,3 @@ n.currentTarget | ||
ce, | ||
Se, | ||
Ce, | ||
le, | ||
@@ -941,3 +941,3 @@ J, | ||
const s = n.changedTouches[0]; | ||
s && (Se( | ||
s && (Ce( | ||
{ | ||
@@ -953,3 +953,3 @@ x: s.clientX, | ||
ce, | ||
Se, | ||
Ce, | ||
le, | ||
@@ -997,3 +997,3 @@ J, | ||
]); | ||
const Ce = R( | ||
const Se = R( | ||
(n) => { | ||
@@ -1016,4 +1016,4 @@ if (Ee.current || n.beta === null && n.gamma === null) | ||
if (!(!I && !V)) | ||
return window.addEventListener("deviceorientation", Ce), () => window.removeEventListener("deviceorientation", Ce); | ||
}, [I, V, Ce, k]), /* @__PURE__ */ re.jsx( | ||
return window.addEventListener("deviceorientation", Se), () => window.removeEventListener("deviceorientation", Se); | ||
}, [I, V, Se, k]), /* @__PURE__ */ re.jsx( | ||
"div", | ||
@@ -1032,3 +1032,2 @@ { | ||
perspective: i, | ||
transformStyle: "preserve-3d", | ||
backfaceVisibility: "hidden", | ||
@@ -1070,3 +1069,2 @@ filter: T ? Xe : void 0 | ||
borderRadius: v, | ||
transformStyle: "preserve-3d", | ||
backfaceVisibility: "hidden", | ||
@@ -1114,3 +1112,3 @@ transition: we, | ||
), | ||
C && /* @__PURE__ */ re.jsx( | ||
S && /* @__PURE__ */ re.jsx( | ||
"div", | ||
@@ -1117,0 +1115,0 @@ { |
{ | ||
"name": "react-next-tilt", | ||
"private": false, | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "A Performant Customizable Tilt Component for React", | ||
@@ -6,0 +6,0 @@ "main": "./dist/react-next-tilt.umd.cjs", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102494
1739