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

react-contribution-calendar

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-contribution-calendar - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

612

dist/index.js
import './styles/style.css';
import Je, { useRef as gr, useState as mr, useEffect as Er } from "react";
var ye = { exports: {} }, q = {};
var be = { exports: {} }, q = {};
/**

@@ -18,14 +18,14 @@ * @license React

We = 1;
var t = Je, l = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
function i(u, d, E) {
var c, f = {}, m = null, p = null;
E !== void 0 && (m = "" + E), d.key !== void 0 && (m = "" + d.key), d.ref !== void 0 && (p = d.ref);
for (c in d)
o.call(d, c) && !g.hasOwnProperty(c) && (f[c] = d[c]);
if (u && u.defaultProps)
for (c in d = u.defaultProps, d)
f[c] === void 0 && (f[c] = d[c]);
return { $$typeof: l, type: u, key: m, ref: p, props: f, _owner: h.current };
var t = Je, l = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
function s(c, d, E) {
var u, i = {}, m = null, b = null;
E !== void 0 && (m = "" + E), d.key !== void 0 && (m = "" + d.key), d.ref !== void 0 && (b = d.ref);
for (u in d)
o.call(d, u) && !y.hasOwnProperty(u) && (i[u] = d[u]);
if (c && c.defaultProps)
for (u in d = c.defaultProps, d)
i[u] === void 0 && (i[u] = d[u]);
return { $$typeof: l, type: c, key: m, ref: b, props: i, _owner: p.current };
}
return q.Fragment = a, q.jsx = i, q.jsxs = i, q;
return q.Fragment = a, q.jsx = s, q.jsxs = s, q;
}

@@ -42,26 +42,26 @@ var z = {};

*/
var Be;
var Le;
function Rr() {
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() {
var t = Je, l = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, O = "@@iterator";
function A(e) {
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
var t = Je, l = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), R = Symbol.iterator, T = "@@iterator";
function k(e) {
if (e === null || typeof e != "object")
return null;
var r = R && e[R] || e[O];
var r = R && e[R] || e[T];
return typeof r == "function" ? r : null;
}
var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function T(e) {
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function w(e) {
{
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
n[s - 1] = arguments[s];
le("error", e, n);
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++)
n[f - 1] = arguments[f];
ae("error", e, n);
}
}
function le(e, r, n) {
function ae(e, r, n) {
{
var s = k.ReactDebugCurrentFrame, b = s.getStackAddendum();
b !== "" && (r += "%s", n = n.concat([b]));
var _ = n.map(function(y) {
return String(y);
var f = P.ReactDebugCurrentFrame, g = f.getStackAddendum();
g !== "" && (r += "%s", n = n.concat([g]));
var _ = n.map(function(h) {
return String(h);
});

@@ -71,6 +71,6 @@ _.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _);

}
var Ee = !1, H = !1, ae = !1, oe = !1, ie = !1, $;
var Ee = !1, H = !1, oe = !1, ie = !1, se = !1, $;
$ = Symbol.for("react.module.reference");
function M(e) {
return !!(typeof e == "string" || typeof e == "function" || e === o || e === g || ie || e === h || e === E || e === c || oe || e === p || Ee || H || ae || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === f || e.$$typeof === i || e.$$typeof === u || e.$$typeof === d || // This needs to include all possible module reference object
return !!(typeof e == "string" || typeof e == "function" || e === o || e === y || se || e === p || e === E || e === u || ie || e === b || Ee || H || oe || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === i || e.$$typeof === s || e.$$typeof === c || e.$$typeof === d || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since

@@ -81,8 +81,8 @@ // we don't know which Flight build this will end up being used

}
function P(e, r, n) {
var s = e.displayName;
if (s)
return s;
var b = r.displayName || r.name || "";
return b !== "" ? n + "(" + b + ")" : n;
function A(e, r, n) {
var f = e.displayName;
if (f)
return f;
var g = r.displayName || r.name || "";
return g !== "" ? n + "(" + g + ")" : n;
}

@@ -92,6 +92,6 @@ function Y(e) {

}
function w(e) {
function F(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
return e.displayName || e.name || null;

@@ -105,9 +105,9 @@ if (typeof e == "string")

return "Portal";
case g:
case y:
return "Profiler";
case h:
case p:
return "StrictMode";
case E:
return "Suspense";
case c:
case u:
return "SuspenseList";

@@ -117,17 +117,17 @@ }

switch (e.$$typeof) {
case u:
case c:
var r = e;
return Y(r) + ".Consumer";
case i:
case s:
var n = e;
return Y(n._context) + ".Provider";
case d:
return P(e, e.render, "ForwardRef");
case f:
var s = e.displayName || null;
return s !== null ? s : w(e.type) || "Memo";
return A(e, e.render, "ForwardRef");
case i:
var f = e.displayName || null;
return f !== null ? f : F(e.type) || "Memo";
case m: {
var b = e, _ = b._payload, y = b._init;
var g = e, _ = g._payload, h = g._init;
try {
return w(y(_));
return F(h(_));
} catch {

@@ -140,6 +140,6 @@ return null;

}
var F = Object.assign, N = 0, G, K, X, _e, Re, De, Se;
function xe() {
var C = Object.assign, N = 0, G, K, X, _e, Re, De, Se;
function Te() {
}
xe.__reactDisabledLog = !0;
Te.__reactDisabledLog = !0;
function ze() {

@@ -152,3 +152,3 @@ {

enumerable: !0,
value: xe,
value: Te,
writable: !0

@@ -178,21 +178,21 @@ };

Object.defineProperties(console, {
log: F({}, e, {
log: C({}, e, {
value: G
}),
info: F({}, e, {
info: C({}, e, {
value: K
}),
warn: F({}, e, {
warn: C({}, e, {
value: X
}),
error: F({}, e, {
error: C({}, e, {
value: _e
}),
group: F({}, e, {
group: C({}, e, {
value: Re
}),
groupCollapsed: F({}, e, {
groupCollapsed: C({}, e, {
value: De
}),
groupEnd: F({}, e, {
groupEnd: C({}, e, {
value: Se

@@ -202,20 +202,20 @@ })

}
N < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
N < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var se = k.ReactCurrentDispatcher, fe;
var fe = P.ReactCurrentDispatcher, ce;
function Z(e, r, n) {
{
if (fe === void 0)
if (ce === void 0)
try {
throw Error();
} catch (b) {
var s = b.stack.trim().match(/\n( *(at )?)/);
fe = s && s[1] || "";
} catch (g) {
var f = g.stack.trim().match(/\n( *(at )?)/);
ce = f && f[1] || "";
}
return `
` + fe + e;
` + ce + e;
}
}
var ce = !1, Q;
var ue = !1, Q;
{

@@ -225,4 +225,4 @@ var Ge = typeof WeakMap == "function" ? WeakMap : Map;

}
function Te(e, r) {
if (!e || ce)
function xe(e, r) {
if (!e || ue)
return "";

@@ -234,14 +234,14 @@ {

}
var s;
ce = !0;
var b = Error.prepareStackTrace;
var f;
ue = !0;
var g = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var _;
_ = se.current, se.current = null, ze();
_ = fe.current, fe.current = null, ze();
try {
if (r) {
var y = function() {
var h = function() {
throw Error();
};
if (Object.defineProperty(y.prototype, "props", {
if (Object.defineProperty(h.prototype, "props", {
set: function() {

@@ -252,14 +252,14 @@ throw Error();

try {
Reflect.construct(y, []);
Reflect.construct(h, []);
} catch (I) {
s = I;
f = I;
}
Reflect.construct(e, [], y);
Reflect.construct(e, [], h);
} else {
try {
y.call();
h.call();
} catch (I) {
s = I;
f = I;
}
e.call(y.prototype);
e.call(h.prototype);
}

@@ -270,3 +270,3 @@ } else {

} catch (I) {
s = I;
f = I;
}

@@ -276,12 +276,12 @@ e();

} catch (I) {
if (I && s && typeof I.stack == "string") {
if (I && f && typeof I.stack == "string") {
for (var v = I.stack.split(`
`), C = s.stack.split(`
`), D = v.length - 1, S = C.length - 1; D >= 1 && S >= 0 && v[D] !== C[S]; )
`), O = f.stack.split(`
`), D = v.length - 1, S = O.length - 1; D >= 1 && S >= 0 && v[D] !== O[S]; )
S--;
for (; D >= 1 && S >= 0; D--, S--)
if (v[D] !== C[S]) {
if (v[D] !== O[S]) {
if (D !== 1 || S !== 1)
do
if (D--, S--, S < 0 || v[D] !== C[S]) {
if (D--, S--, S < 0 || v[D] !== O[S]) {
var j = `

@@ -296,9 +296,9 @@ ` + v[D].replace(" at new ", " at ");

} finally {
ce = !1, se.current = _, He(), Error.prepareStackTrace = b;
ue = !1, fe.current = _, He(), Error.prepareStackTrace = g;
}
var B = e ? e.displayName || e.name : "", Ye = B ? Z(B) : "";
var L = e ? e.displayName || e.name : "", Ye = L ? Z(L) : "";
return typeof e == "function" && Q.set(e, Ye), Ye;
}
function Ke(e, r, n) {
return Te(e, !1);
return xe(e, !1);
}

@@ -313,3 +313,3 @@ function Xe(e) {

if (typeof e == "function")
return Te(e, Xe(e));
return xe(e, Xe(e));
if (typeof e == "string")

@@ -320,3 +320,3 @@ return Z(e);

return Z("Suspense");
case c:
case u:
return Z("SuspenseList");

@@ -328,8 +328,8 @@ }

return Ke(e.render);
case f:
case i:
return ee(e.type, r, n);
case m: {
var s = e, b = s._payload, _ = s._init;
var f = e, g = f._payload, _ = f._init;
try {
return ee(_(b), r, n);
return ee(_(g), r, n);
} catch {

@@ -341,3 +341,3 @@ }

}
var re = Object.prototype.hasOwnProperty, we = {}, Fe = k.ReactDebugCurrentFrame;
var re = Object.prototype.hasOwnProperty, we = {}, Fe = P.ReactDebugCurrentFrame;
function te(e) {

@@ -350,18 +350,18 @@ if (e) {

}
function Ze(e, r, n, s, b) {
function Ze(e, r, n, f, g) {
{
var _ = Function.call.bind(re);
for (var y in e)
if (_(e, y)) {
for (var h in e)
if (_(e, h)) {
var v = void 0;
try {
if (typeof e[y] != "function") {
var C = Error((s || "React class") + ": " + n + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw C.name = "Invariant Violation", C;
if (typeof e[h] != "function") {
var O = Error((f || "React class") + ": " + n + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw O.name = "Invariant Violation", O;
}
v = e[y](r, y, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
v = e[h](r, h, f, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (D) {
v = D;
}
v && !(v instanceof Error) && (te(b), T("%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).", s || "React class", n, y, typeof v), te(null)), v instanceof Error && !(v.message in we) && (we[v.message] = !0, te(b), T("Failed %s type: %s", n, v.message), te(null));
v && !(v instanceof Error) && (te(g), w("%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).", f || "React class", n, h, typeof v), te(null)), v instanceof Error && !(v.message in we) && (we[v.message] = !0, te(g), w("Failed %s type: %s", n, v.message), te(null));
}

@@ -371,3 +371,3 @@ }

var Qe = Array.isArray;
function ue(e) {
function de(e) {
return Qe(e);

@@ -393,5 +393,5 @@ }

if (rr(e))
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Ce(e);
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Ce(e);
}
var U = k.ReactCurrentOwner, tr = {
var U = P.ReactCurrentOwner, tr = {
key: !0,

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

__source: !0
}, je, ke, de;
de = {};
}, je, ke, ve;
ve = {};
function nr(e) {

@@ -422,4 +422,4 @@ if (re.call(e, "ref")) {

if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) {
var n = w(U.current.type);
de[n] || (T('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', w(U.current.type), e.ref), de[n] = !0);
var n = F(U.current.type);
ve[n] || (w('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', F(U.current.type), e.ref), ve[n] = !0);
}

@@ -430,3 +430,3 @@ }

var n = function() {
je || (je = !0, T("%s: `key` 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)", r));
je || (je = !0, w("%s: `key` 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)", r));
};

@@ -442,3 +442,3 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", {

var n = function() {
ke || (ke = !0, T("%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)", r));
ke || (ke = !0, w("%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)", r));
};

@@ -451,3 +451,3 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", {

}
var sr = function(e, r, n, s, b, _, y) {
var sr = function(e, r, n, f, g, _, h) {
var v = {

@@ -460,3 +460,3 @@ // This tag allows us to uniquely identify this as a React Element

ref: n,
props: y,
props: h,
// Record the component responsible for creating this element.

@@ -474,3 +474,3 @@ _owner: _

writable: !1,
value: s
value: f
}), Object.defineProperty(v, "_source", {

@@ -480,24 +480,24 @@ configurable: !1,

writable: !1,
value: b
value: g
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
};
function fr(e, r, n, s, b) {
function fr(e, r, n, f, g) {
{
var _, y = {}, v = null, C = null;
n !== void 0 && (Oe(n), v = "" + n), lr(r) && (Oe(r.key), v = "" + r.key), nr(r) && (C = r.ref, ar(r, b));
var _, h = {}, v = null, O = null;
n !== void 0 && (Oe(n), v = "" + n), lr(r) && (Oe(r.key), v = "" + r.key), nr(r) && (O = r.ref, ar(r, g));
for (_ in r)
re.call(r, _) && !tr.hasOwnProperty(_) && (y[_] = r[_]);
re.call(r, _) && !tr.hasOwnProperty(_) && (h[_] = r[_]);
if (e && e.defaultProps) {
var D = e.defaultProps;
for (_ in D)
y[_] === void 0 && (y[_] = D[_]);
h[_] === void 0 && (h[_] = D[_]);
}
if (v || C) {
if (v || O) {
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
v && or(y, S), C && ir(y, S);
v && or(h, S), O && ir(h, S);
}
return sr(e, v, C, b, s, U.current, y);
return sr(e, v, O, g, f, U.current, h);
}
}
var ve = k.ReactCurrentOwner, Pe = k.ReactDebugCurrentFrame;
var pe = P.ReactCurrentOwner, Pe = P.ReactDebugCurrentFrame;
function W(e) {

@@ -510,5 +510,5 @@ if (e) {

}
var pe;
pe = !1;
function he(e) {
var he;
he = !1;
function ye(e) {
return typeof e == "object" && e !== null && e.$$typeof === l;

@@ -518,4 +518,4 @@ }

{
if (ve.current) {
var e = w(ve.current.type);
if (pe.current) {
var e = F(pe.current.type);
if (e)

@@ -562,4 +562,4 @@ return `

Me[n] = !0;
var s = "";
e && e._owner && e._owner !== ve.current && (s = " It was passed a child from " + w(e._owner.type) + "."), W(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), W(null);
var f = "";
e && e._owner && e._owner !== pe.current && (f = " It was passed a child from " + F(e._owner.type) + "."), W(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, f), W(null);
}

@@ -571,14 +571,14 @@ }

return;
if (ue(e))
if (de(e))
for (var n = 0; n < e.length; n++) {
var s = e[n];
he(s) && Ie(s, r);
var f = e[n];
ye(f) && Ie(f, r);
}
else if (he(e))
else if (ye(e))
e._store && (e._store.validated = !0);
else if (e) {
var b = A(e);
if (typeof b == "function" && b !== e.entries)
for (var _ = b.call(e), y; !(y = _.next()).done; )
he(y.value) && Ie(y.value, r);
var g = k(e);
if (typeof g == "function" && g !== e.entries)
for (var _ = g.call(e), h; !(h = _.next()).done; )
ye(h.value) && Ie(h.value, r);
}

@@ -597,3 +597,3 @@ }

// Inner props are checked in the reconciler.
r.$$typeof === f))
r.$$typeof === i))
n = r.propTypes;

@@ -603,10 +603,10 @@ else

if (n) {
var s = w(r);
Ze(n, e.props, "prop", s, e);
} else if (r.PropTypes !== void 0 && !pe) {
pe = !0;
var b = w(r);
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
var f = F(r);
Ze(n, e.props, "prop", f, e);
} else if (r.PropTypes !== void 0 && !he) {
he = !0;
var g = F(r);
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}

@@ -617,35 +617,35 @@ }

for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
var s = r[n];
if (s !== "children" && s !== "key") {
W(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), W(null);
var f = r[n];
if (f !== "children" && f !== "key") {
W(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), W(null);
break;
}
}
e.ref !== null && (W(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
e.ref !== null && (W(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
}
}
function Ne(e, r, n, s, b, _) {
function Ne(e, r, n, f, g, _) {
{
var y = M(e);
if (!y) {
var h = M(e);
if (!h) {
var v = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " 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 C = cr(b);
C ? v += C : v += Ae();
var O = cr(g);
O ? v += O : v += Ae();
var D;
e === null ? D = "null" : ue(e) ? D = "array" : e !== void 0 && e.$$typeof === l ? (D = "<" + (w(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, v);
e === null ? D = "null" : de(e) ? D = "array" : e !== void 0 && e.$$typeof === l ? (D = "<" + (F(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, v);
}
var S = fr(e, r, n, b, _);
var S = fr(e, r, n, g, _);
if (S == null)
return S;
if (y) {
if (h) {
var j = r.children;
if (j !== void 0)
if (s)
if (ue(j)) {
for (var B = 0; B < j.length; B++)
$e(j[B], e);
if (f)
if (de(j)) {
for (var L = 0; L < j.length; L++)
$e(j[L], e);
Object.freeze && Object.freeze(j);
} else
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else

@@ -667,6 +667,6 @@ $e(j, e);

}
process.env.NODE_ENV === "production" ? ye.exports = _r() : ye.exports = Rr();
var x = ye.exports;
function be({ children: t, textColor: l, style: a, colSpan: o, ...h }) {
return /* @__PURE__ */ x.jsx("td", { className: "calendar-label", style: a, colSpan: o, ...h, children: /* @__PURE__ */ x.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) });
process.env.NODE_ENV === "production" ? be.exports = _r() : be.exports = Rr();
var x = be.exports;
function ge({ children: t, textColor: l, style: a, colSpan: o, hide: p, ...y }) {
return /* @__PURE__ */ x.jsx("td", { className: "calendar-label", style: a, colSpan: o, ...y, children: p ? void 0 : /* @__PURE__ */ x.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) });
}

@@ -900,3 +900,3 @@ const Dr = {

}
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xr = (t = /* @__PURE__ */ new Date()) => {
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Tr = (t = /* @__PURE__ */ new Date()) => {
const l = {

@@ -930,16 +930,16 @@ Sun: "Sunday",

};
}, Br = (t) => t.reduce((l, a) => l + a, 0), Tr = (t) => {
const l = xr(new Date(t));
}, Lr = (t) => t.reduce((l, a) => l + a, 0), xr = (t) => {
const l = Tr(new Date(t));
return `${l.date}, ${l.month} ${l.day}, ${l.year}`;
}, Le = (t, l, a) => `${t}-${String(l + 1).padStart(2, "0")}-${String(a).padStart(2, "0")}`, wr = (t, l, a) => `${t}-${String(l).padStart(2, "0")}-${String(a).padStart(2, "0")}`, ge = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), L = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Lr = (t) => +t.slice(8, 10), Fr = (t = J()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, me = (t = J()) => [31, Fr(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = (t) => new Date(t).getDay(), V = (t = J()) => new Date(t, 0, 1).getDay(), Vr = (t) => new Date(t).getDay(), J = () => (/* @__PURE__ */ new Date()).getFullYear(), Jr = (t = J(), l, a) => {
const o = me(t), h = V(t), g = [];
let i = h;
for (let u = 0; u < 12; u++) {
const d = o[u];
}, Be = (t, l, a) => `${t}-${String(l + 1).padStart(2, "0")}-${String(a).padStart(2, "0")}`, wr = (t, l, a) => `${t}-${String(l).padStart(2, "0")}-${String(a).padStart(2, "0")}`, ne = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), B = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Br = (t) => +t.slice(8, 10), Fr = (t = J()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, me = (t = J()) => [31, Fr(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = (t) => new Date(t).getDay(), V = (t = J()) => new Date(t, 0, 1).getDay(), Vr = (t) => new Date(t).getDay(), J = () => (/* @__PURE__ */ new Date()).getFullYear(), Jr = (t = J(), l, a) => {
const o = me(t), p = V(t), y = [];
let s = p;
for (let c = 0; c < 12; c++) {
const d = o[c];
let E = 0;
for (let c = 0; c < d; c++)
i === 0 && E++, i = (i + 1) % 7;
u === 0 && h !== 0 && E++, g.push(E);
for (let u = 0; u < d; u++)
s === 0 && E++, s = (s + 1) % 7;
c === 0 && p !== 0 && E++, y.push(E);
}
return t !== l && h !== 0 && l !== a && (g[0] -= 1), g;
return t !== l && p !== 0 && l !== a && (y[0] -= 1), y;
}, Or = (t) => {

@@ -966,37 +966,37 @@ const l = /* @__PURE__ */ new Map();

}, Ar = (t, l, a) => {
const o = L(t), h = L(l), g = kr(o, h);
let i = 0, u = 1;
for (let d = o; d <= h; ++d) {
const E = a ? V(d) : (V(d) + 6) % 7, c = me(d);
let f = 0, m = 1, p = E;
for (; f < 12; ) {
for (let R = 0; R < c[f]; ++R)
g[p % 7][~~(p / 7) + i] = u, p++, m++, u++;
m > c[f] && (m = 1, f++);
const o = B(t), p = B(l), y = kr(o, p);
let s = 0, c = 1;
for (let d = o; d <= p; ++d) {
const E = a ? V(d) : (V(d) + 6) % 7, u = me(d);
let i = 0, m = 1, b = E;
for (; i < 12; ) {
for (let R = 0; R < u[i]; ++R)
y[b % 7][~~(b / 7) + s] = c, b++, m++, c++;
m > u[i] && (m = 1, i++);
}
i += ~~(p / 7);
s += ~~(b / 7);
}
return g;
return y;
}, qe = (t, l, a) => {
const o = L(t), h = L(l), g = Pr(o, h);
let i = 0;
for (let u = o; u <= h; ++u) {
const d = a ? V(u) : (V(u) + 6) % 7, E = me(u);
let c = 0, f = 1, m = d;
for (; c < 12; ) {
for (let p = 0; p < E[c]; ++p) {
const R = wr(u, c + 1, f);
g[m % 7][~~(m / 7) + i] = R, m++, f++;
const o = B(t), p = B(l), y = Pr(o, p);
let s = 0;
for (let c = o; c <= p; ++c) {
const d = a ? V(c) : (V(c) + 6) % 7, E = me(c);
let u = 0, i = 1, m = d;
for (; u < 12; ) {
for (let b = 0; b < E[u]; ++b) {
const R = wr(c, u + 1, i);
y[m % 7][~~(m / 7) + s] = R, m++, i++;
}
f > E[c] && (f = 1, c++);
i > E[u] && (i = 1, u++);
}
i += ~~(m / 7);
s += ~~(m / 7);
}
return g;
}, ne = (t, l, a) => {
const o = `${t}-01-01`, h = Mr(o, l), g = Ar(o, l, a);
for (let i = 0; i < g.length; ++i)
for (let u = 0; u < g[i].length; ++u)
if (h === g[i][u])
return { row: i, col: u };
return y;
}, le = (t, l, a) => {
const o = `${t}-01-01`, p = Mr(o, l), y = Ar(o, l, a);
for (let s = 0; s < y.length; ++s)
for (let c = 0; c < y[s].length; ++c)
if (p === y[s][c])
return { row: s, col: c };
return { row: 0, col: 0 };

@@ -1007,53 +1007,65 @@ }, Mr = (t, l) => {

}, Ir = (t, l, a, o) => {
const { row: h, col: g } = ne(
L(t),
const { row: p, col: y } = le(
B(t),
t,
o
), { col: i } = ne(L(t), l, o), u = [], d = [];
let E = -1, c = 0;
for (let f = g; f <= i; ++f)
f === g ? c = Ve(a[h][f]) - 1 : c = Ve(a[0][f]) - 1, c !== E && (u.push(Sr[c]), E = c, d.push(0)), d[d.length - 1]++;
return { months: u, colSpans: d };
), { col: s } = le(B(t), l, o), c = [], d = [];
let E = -1, u = 0;
for (let i = y; i <= s; ++i)
i === y ? u = Ve(a[p][i]) - 1 : u = Ve(a[0][i]) - 1, u !== E && (c.push(Sr[u]), E = u, d.push(0)), d[d.length - 1]++;
return { months: c, colSpans: d };
};
function $r({ start: t, end: l, textColor: a, startsOnSunday: o, cy: h }) {
const g = qe(t, l, o), { year: i, month: u, day: d } = ge(l), E = Cr(`${i}-${u}-01`), { months: c, colSpans: f } = Ir(t, l, g, o);
function $r({ start: t, end: l, textColor: a, startsOnSunday: o, cy: p }) {
const y = qe(t, l, o), { day: s } = ne(t), { year: c, month: d, day: E } = ne(l), u = Cr(`${c}-${d}-01`), { months: i, colSpans: m } = Ir(t, l, y, o);
return /* @__PURE__ */ x.jsx("thead", { children: /* @__PURE__ */ x.jsxs("tr", { children: [
/* @__PURE__ */ x.jsx(be, { textColor: a, style: { width: "4em", fontSize: h }, colSpan: 1, children: " " }),
c.map((m, p) => {
let R = f[p];
return f.length === 1 && f[0] === 1 ? R++ : c.length > 1 && d < 10 && E !== 0 && p === c.length - 2 ? R-- : c.length > 1 && d < 10 && E !== 0 && p === c.length - 1 && R++, /* @__PURE__ */ x.jsx(be, { textColor: a, style: { fontSize: h }, colSpan: R, children: m }, p);
/* @__PURE__ */ x.jsx(ge, { textColor: a, style: { width: "4em", fontSize: p }, colSpan: 1, children: " " }),
i.map((b, R) => {
let T = m[R];
m.length === 1 && m[0] === 1 ? T++ : i.length > 1 && E < 10 && u !== 0 && R === i.length - 2 ? T-- : i.length > 1 && E < 10 && u !== 0 && R === i.length - 1 && T++;
const k = R === 0 && i.length > 1 && T === 1 && s >= 19;
return /* @__PURE__ */ x.jsx(
ge,
{
textColor: a,
style: { fontSize: p },
colSpan: T,
hide: k,
children: b
},
R
);
})
] }) });
}
function Nr({ themeProps: t, dataLevel: l, style: a, dataTooltip: o, tooltipSize: h, ...g }) {
const i = gr(null), [u, d] = mr(-10), E = (f) => {
if (!f)
function Nr({ themeProps: t, dataLevel: l, style: a, dataTooltip: o, tooltipSize: p, ...y }) {
const s = gr(null), [c, d] = mr(-10), E = (i) => {
if (!i)
return 0;
let m = 0;
return f.childNodes.forEach((p) => {
p.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(p).display !== "none" && m++;
return i.childNodes.forEach((b) => {
b.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(b).display !== "none" && m++;
}), m;
}, c = (f) => {
if (!f || !f.parentNode)
}, u = (i) => {
if (!i || !i.parentNode)
return -1;
const m = Array.from(f.parentNode.childNodes);
let p = 0;
for (let R = 0; R < f.cellIndex; R++)
m[R].style.display !== "none" && p++;
return p;
const m = Array.from(i.parentNode.childNodes);
let b = 0;
for (let R = 0; R < i.cellIndex; R++)
m[R].style.display !== "none" && b++;
return b;
};
return Er(() => {
const f = () => {
const i = () => {
var m;
if (i.current) {
const p = E((m = i.current) == null ? void 0 : m.parentNode), R = c(i.current);
if (p) {
let O = -10;
const A = R / p;
A > 0.9 ? O = Math.max(~~(i.current.cellIndex * -150) / p, -150) : A > 0.8 ? O = Math.max(~~(i.current.cellIndex * -130) / p, -140) : A > 0.66 ? O = Math.max(~~(i.current.cellIndex * -120) / p, -120) : A > 0.5 ? O = Math.max(~~(i.current.cellIndex * -100) / p, -100) : A > 0.33 ? O = Math.max(~~(i.current.cellIndex * -50) / p, -50) : A > 0.2 ? O = Math.min(~~(i.current.cellIndex * -20) / p, -30) : O = Math.min(~~(i.current.cellIndex * -7) / p, -10), d(O);
if (s.current) {
const b = E((m = s.current) == null ? void 0 : m.parentNode), R = u(s.current);
if (b) {
let T = -10;
const k = R / b;
k > 0.9 ? T = Math.max(~~(s.current.cellIndex * -150) / b, -150) : k > 0.8 ? T = Math.max(~~(s.current.cellIndex * -130) / b, -140) : k > 0.66 ? T = Math.max(~~(s.current.cellIndex * -120) / b, -120) : k > 0.33 ? T = Math.max(~~(s.current.cellIndex * -100) / b, -100) : k > 0.2 ? T = Math.max(~~(s.current.cellIndex * -70) / b, -70) : T = Math.max(~~(s.current.cellIndex * -50) * 5 / b, -50), d(T);
}
}
};
return i.current && i.current.addEventListener("mouseover", f), () => {
i.current && i.current.removeEventListener("mouseover", f);
return s.current && s.current.addEventListener("mouseover", i), () => {
s.current && s.current.removeEventListener("mouseover", i);
};

@@ -1063,3 +1075,3 @@ }, []), /* @__PURE__ */ x.jsx(

{
ref: i,
ref: s,
className: "calendar-cell top half-arrow",

@@ -1069,8 +1081,8 @@ style: {

backgroundColor: t[`level${l}`],
"--tooltip-offset": `${u}px`,
fontSize: h
"--tooltip-offset": `${c}px`,
fontSize: p
},
"data-tooltip": o,
"data-level": l,
...g
...y
}

@@ -1084,15 +1096,15 @@ );

textColor: o,
startsOnSunday: h,
includeBoundary: g,
cx: i,
cy: u,
startsOnSunday: p,
includeBoundary: y,
cx: s,
cy: c,
cr: d,
theme: E,
onClick: c
onClick: u
}) {
const { year: f, day: m } = ge(l), { day: p } = ge(a), { row: R, col: O } = ne(f, l, h), { row: A, col: k } = ne(f, a, h), T = h ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], le = qe(l, a, h), H = ((M) => jr(M))(E), ae = Or(t), oe = (M, P) => P < O || P > k, ie = (M, P) => P === O && M < R || P === k && M > A, $ = () => O === k || p - m <= 7;
return /* @__PURE__ */ x.jsx("tbody", { children: T.map((M, P) => /* @__PURE__ */ x.jsxs("tr", { children: [
/* @__PURE__ */ x.jsx(be, { tabIndex: 0, textColor: o, style: { textAlign: "right", fontSize: u, lineHeight: 0 }, children: M }),
le[P].map((Y, w) => {
if (k === 0 && w === 1)
const { year: i, day: m } = ne(l), { day: b } = ne(a), { row: R, col: T } = le(i, l, p), { row: k, col: P } = le(i, a, p), w = p ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], ae = qe(l, a, p), H = ((M) => jr(M))(E), oe = Or(t), ie = (M, A) => A < T || A > P, se = (M, A) => A === T && M < R || A === P && M > k, $ = () => T === P || b - m <= 7;
return /* @__PURE__ */ x.jsx("tbody", { children: w.map((M, A) => /* @__PURE__ */ x.jsxs("tr", { children: [
/* @__PURE__ */ x.jsx(ge, { tabIndex: 0, textColor: o, style: { textAlign: "right", fontSize: c, lineHeight: 0 }, children: M }),
ae[A].map((Y, F) => {
if (P === 0 && F === 1)
return /* @__PURE__ */ x.jsx(

@@ -1103,4 +1115,4 @@ "td",

padding: 0,
width: $() ? i : 0,
height: $() ? u : 0,
width: $() ? s : 0,
height: $() ? c : 0,
outline: "none",

@@ -1112,7 +1124,7 @@ borderRadius: d,

},
w
F
);
if (oe(P, w))
return /* @__PURE__ */ x.jsx("td", { style: { padding: "0", display: "none" } }, w);
if (ie(P, w))
if (ie(A, F))
return /* @__PURE__ */ x.jsx("td", { style: { padding: "0", display: "none" } }, F);
if (se(A, F))
return /* @__PURE__ */ x.jsx(

@@ -1123,5 +1135,5 @@ "td",

padding: 0,
width: $() ? i : 0,
height: $() ? u : 0,
outline: g ? `1px solid ${H.level0}` : "none",
width: $() ? s : 0,
height: $() ? c : 0,
outline: y ? `1px solid ${H.level0}` : "none",
borderRadius: d,

@@ -1132,10 +1144,10 @@ outlineOffset: "-1px",

},
w
F
);
const F = ae.get(Y), N = Tr(Y), G = (K) => {
const C = oe.get(Y), N = xr(Y), G = (K) => {
const X = {
date: Y,
data: F == null ? void 0 : F.data
data: C == null ? void 0 : C.data
};
c && c(K, X);
u && u(K, X);
};

@@ -1146,11 +1158,11 @@ return /* @__PURE__ */ x.jsx(

tabIndex: -1,
style: { width: i, height: u, borderRadius: d },
dataLevel: F !== void 0 ? F.level : 0,
"data-content": JSON.stringify(F == null ? void 0 : F.data),
style: { width: s, height: c, borderRadius: d },
dataLevel: C !== void 0 ? C.level : 0,
"data-content": JSON.stringify(C == null ? void 0 : C.data),
dataTooltip: N,
tooltipSize: u,
tooltipSize: c,
themeProps: H,
onClick: G
},
w
F
);

@@ -1162,17 +1174,17 @@ })

data: t = [],
start: l = Le(J(), 0, 1),
end: a = Le(J(), 11, 31),
start: l = Be(J(), 0, 1),
end: a = Be(J(), 11, 31),
textColor: o = "#000",
startsOnSunday: h = !0,
includeBoundary: g = !0,
cx: i = 10,
cy: u = 10,
startsOnSunday: p = !0,
includeBoundary: y = !0,
cx: s = 10,
cy: c = 10,
cr: d = 2,
theme: E = "grass",
onCellClick: c = () => {
onCellClick: u = () => {
},
style: f
style: i
}) {
return /* @__PURE__ */ x.jsx("div", { className: "container", style: f, children: /* @__PURE__ */ x.jsxs("table", { children: [
/* @__PURE__ */ x.jsx($r, { start: l, end: a, textColor: o, startsOnSunday: h, cy: u }),
return /* @__PURE__ */ x.jsx("div", { className: "container", style: i, children: /* @__PURE__ */ x.jsxs("table", { children: [
/* @__PURE__ */ x.jsx($r, { start: l, end: a, textColor: o, startsOnSunday: p, cy: c }),
/* @__PURE__ */ x.jsx(

@@ -1185,9 +1197,9 @@ Yr,

textColor: o,
startsOnSunday: h,
includeBoundary: g,
cx: i,
cy: u,
startsOnSunday: p,
includeBoundary: y,
cx: s,
cy: c,
cr: d,
theme: E,
onClick: c
onClick: u
}

@@ -1200,8 +1212,8 @@ )

jr as createTheme,
Br as getArraySum,
Lr as getArraySum,
Jr as getColumnSpansForYears,
J as getCurrentYear,
xr as getDateDetails,
Le as getDateString,
Tr as getDateTooltip,
Tr as getDateDetails,
Be as getDateString,
xr as getDateTooltip,
qe as getDayArray,

@@ -1213,9 +1225,9 @@ Cr as getDayIndexFromDateString,

Ir as getMonthsAndColSpans,
ne as getRowAndColumnIndexFromDate,
le as getRowAndColumnIndexFromDate,
Fr as isLeapYear,
ge as parseDateFromDateString,
Lr as parseDayFromDateString,
ne as parseDateFromDateString,
Br as parseDayFromDateString,
Or as parseInputData,
Ve as parseMonthFromDateString,
L as parseYearFromDateString
B as parseYearFromDateString
};

@@ -1,2 +0,2 @@

// Type definitions for react-contribution-calendar 1.2.3
// Type definitions for react-contribution-calendar 1.2.4
// Project: https://github.com/seiwon-yaehee/react-contribution-calendar

@@ -110,3 +110,3 @@ // Definitions by: Seiwon Park <https://github.com/SeiwonPark>

*
* @version 1.2.3
* @version 1.2.4
* @see {@link https://github.com/seiwon-yaehee/react-contribution-calendar#apis}

@@ -113,0 +113,0 @@ */

{
"name": "react-contribution-calendar",
"description": "A GitHub-like contribution calendar component for React",
"version": "1.2.3",
"version": "1.2.4",
"type": "module",

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

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