New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-contribution-calendar

Package Overview
Dependencies
Maintainers
2
Versions
66
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.0.1 to 1.0.2

437

dist/index.js
import './styles/style.css';
import Ce from "react";
var Z = { exports: {} }, $ = {};
var Z = { exports: {} }, M = {};
/**

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

if (we)
return $;
return M;
we = 1;
var n = Ce, i = Symbol.for("react.element"), l = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, p = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 };
function E(f, d, O) {
var m, x = {}, S = null, Y = null;
O !== void 0 && (S = "" + O), d.key !== void 0 && (S = "" + d.key), d.ref !== void 0 && (Y = d.ref);
for (m in d)
o.call(d, m) && !h.hasOwnProperty(m) && (x[m] = d[m]);
if (f && f.defaultProps)
for (m in d = f.defaultProps, d)
x[m] === void 0 && (x[m] = d[m]);
return { $$typeof: i, type: f, key: S, ref: Y, props: x, _owner: p.current };
var n = Ce, i = Symbol.for("react.element"), o = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, c = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
function _(v, p, x) {
var m, S = {}, w = null, O = null;
x !== void 0 && (w = "" + x), p.key !== void 0 && (w = "" + p.key), p.ref !== void 0 && (O = p.ref);
for (m in p)
l.call(p, m) && !b.hasOwnProperty(m) && (S[m] = p[m]);
if (v && v.defaultProps)
for (m in p = v.defaultProps, p)
S[m] === void 0 && (S[m] = p[m]);
return { $$typeof: i, type: v, key: w, ref: O, props: S, _owner: c.current };
}
return $.Fragment = l, $.jsx = E, $.jsxs = E, $;
return M.Fragment = o, M.jsx = _, M.jsxs = _, M;
}
var M = {};
var Y = {};
/**

@@ -45,3 +45,3 @@ * @license React

return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
var n = Ce, i = Symbol.for("react.element"), l = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), f = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), te = Symbol.iterator, ke = "@@iterator";
var n = Ce, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), v = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), te = Symbol.iterator, ke = "@@iterator";
function Ae(e) {

@@ -53,4 +53,4 @@ if (e === null || typeof e != "object")

}
var D = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function _(e) {
var k = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function E(e) {
{

@@ -64,8 +64,8 @@ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)

{
var a = D.ReactDebugCurrentFrame, c = a.getStackAddendum();
c !== "" && (r += "%s", t = t.concat([c]));
var v = t.map(function(u) {
var a = k.ReactDebugCurrentFrame, f = a.getStackAddendum();
f !== "" && (r += "%s", t = t.concat([f]));
var d = t.map(function(u) {
return String(u);
});
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
}

@@ -76,3 +76,3 @@ }

function We(e) {
return !!(typeof e == "string" || typeof e == "function" || e === o || e === h || Ne || e === p || e === O || e === m || Ye || e === Y || Ie || $e || Me || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === x || e.$$typeof === E || e.$$typeof === f || e.$$typeof === d || // This needs to include all possible module reference object
return !!(typeof e == "string" || typeof e == "function" || e === l || e === b || Ne || e === c || e === x || e === m || Ye || e === O || Ie || $e || Me || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === S || e.$$typeof === _ || e.$$typeof === v || e.$$typeof === p || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since

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

return a;
var c = r.displayName || r.name || "";
return c !== "" ? t + "(" + c + ")" : t;
var f = r.displayName || r.name || "";
return f !== "" ? t + "(" + f + ")" : t;
}

@@ -94,6 +94,6 @@ function ae(e) {

}
function w(e) {
function j(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && _("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" && E("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;

@@ -103,11 +103,11 @@ if (typeof e == "string")

switch (e) {
case l:
return "Fragment";
case o:
return "Fragment";
case l:
return "Portal";
case h:
case b:
return "Profiler";
case p:
case c:
return "StrictMode";
case O:
case x:
return "Suspense";

@@ -119,17 +119,17 @@ case m:

switch (e.$$typeof) {
case f:
case v:
var r = e;
return ae(r) + ".Consumer";
case E:
case _:
var t = e;
return ae(t._context) + ".Provider";
case d:
case p:
return Le(e, e.render, "ForwardRef");
case x:
case S:
var a = e.displayName || null;
return a !== null ? a : w(e.type) || "Memo";
case S: {
var c = e, v = c._payload, u = c._init;
return a !== null ? a : j(e.type) || "Memo";
case w: {
var f = e, d = f._payload, u = f._init;
try {
return w(u(v));
return j(u(d));
} catch {

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

}
var P = Object.assign, F = 0, le, oe, ie, se, ue, ce, fe;
var P = Object.assign, I = 0, le, oe, ie, se, ue, fe, ce;
function de() {

@@ -149,4 +149,4 @@ }

{
if (F === 0) {
le = console.log, oe = console.info, ie = console.warn, se = console.error, ue = console.group, ce = console.groupCollapsed, fe = console.groupEnd;
if (I === 0) {
le = console.log, oe = console.info, ie = console.warn, se = console.error, ue = console.group, fe = console.groupCollapsed, ce = console.groupEnd;
var e = {

@@ -168,3 +168,3 @@ configurable: !0,

}
F++;
I++;
}

@@ -174,3 +174,3 @@ }

{
if (F--, F === 0) {
if (I--, I === 0) {
var e = {

@@ -198,13 +198,13 @@ configurable: !0,

groupCollapsed: P({}, e, {
value: ce
value: fe
}),
groupEnd: P({}, e, {
value: fe
value: ce
})
});
}
F < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
I < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var U = D.ReactCurrentDispatcher, B;
var U = k.ReactCurrentDispatcher, B;
function N(e, r, t) {

@@ -215,4 +215,4 @@ {

throw Error();
} catch (c) {
var a = c.stack.trim().match(/\n( *(at )?)/);
} catch (f) {
var a = f.stack.trim().match(/\n( *(at )?)/);
B = a && a[1] || "";

@@ -239,6 +239,6 @@ }

q = !0;
var c = Error.prepareStackTrace;
var f = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var v;
v = U.current, U.current = null, Je();
var d;
d = U.current, U.current = null, Je();
try {

@@ -256,4 +256,4 @@ if (r) {

Reflect.construct(u, []);
} catch (j) {
a = j;
} catch (C) {
a = C;
}

@@ -264,4 +264,4 @@ Reflect.construct(e, [], u);

u.call();
} catch (j) {
a = j;
} catch (C) {
a = C;
}

@@ -273,23 +273,23 @@ e.call(u.prototype);

throw Error();
} catch (j) {
a = j;
} catch (C) {
a = C;
}
e();
}
} catch (j) {
if (j && a && typeof j.stack == "string") {
for (var s = j.stack.split(`
} catch (C) {
if (C && a && typeof C.stack == "string") {
for (var s = C.stack.split(`
`), R = a.stack.split(`
`), b = s.length - 1, y = R.length - 1; b >= 1 && y >= 0 && s[b] !== R[y]; )
`), h = s.length - 1, y = R.length - 1; h >= 1 && y >= 0 && s[h] !== R[y]; )
y--;
for (; b >= 1 && y >= 0; b--, y--)
if (s[b] !== R[y]) {
if (b !== 1 || y !== 1)
for (; h >= 1 && y >= 0; h--, y--)
if (s[h] !== R[y]) {
if (h !== 1 || y !== 1)
do
if (b--, y--, y < 0 || s[b] !== R[y]) {
if (h--, y--, y < 0 || s[h] !== R[y]) {
var T = `
` + s[b].replace(" at new ", " at ");
` + s[h].replace(" at new ", " at ");
return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && W.set(e, T), T;
}
while (b >= 1 && y >= 0);
while (h >= 1 && y >= 0);
break;

@@ -299,5 +299,5 @@ }

} finally {
q = !1, U.current = v, Ve(), Error.prepareStackTrace = c;
q = !1, U.current = d, Ve(), Error.prepareStackTrace = f;
}
var A = e ? e.displayName || e.name : "", Oe = A ? N(A) : "";
var F = e ? e.displayName || e.name : "", Oe = F ? N(F) : "";
return typeof e == "function" && W.set(e, Oe), Oe;

@@ -320,3 +320,3 @@ }

switch (e) {
case O:
case x:
return N("Suspense");

@@ -328,10 +328,10 @@ case m:

switch (e.$$typeof) {
case d:
case p:
return Be(e.render);
case x:
case S:
return L(e.type, r, t);
case S: {
var a = e, c = a._payload, v = a._init;
case w: {
var a = e, f = a._payload, d = a._init;
try {
return L(v(c), r, t);
return L(d(f), r, t);
} catch {

@@ -343,3 +343,3 @@ }

}
var J = Object.prototype.hasOwnProperty, pe = {}, be = D.ReactDebugCurrentFrame;
var J = Object.prototype.hasOwnProperty, pe = {}, be = k.ReactDebugCurrentFrame;
function V(e) {

@@ -352,7 +352,7 @@ if (e) {

}
function Ge(e, r, t, a, c) {
function Ge(e, r, t, a, f) {
{
var v = Function.call.bind(J);
var d = Function.call.bind(J);
for (var u in e)
if (v(e, u)) {
if (d(e, u)) {
var s = void 0;

@@ -365,6 +365,6 @@ try {

s = e[u](r, u, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (b) {
s = b;
} catch (h) {
s = h;
}
s && !(s instanceof Error) && (V(c), _("%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).", a || "React class", t, u, typeof s), V(null)), s instanceof Error && !(s.message in pe) && (pe[s.message] = !0, V(c), _("Failed %s type: %s", t, s.message), V(null));
s && !(s instanceof Error) && (V(f), E("%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).", a || "React class", t, u, typeof s), V(null)), s instanceof Error && !(s.message in pe) && (pe[s.message] = !0, V(f), E("Failed %s type: %s", t, s.message), V(null));
}

@@ -385,3 +385,3 @@ }

try {
return ye(e), !1;
return he(e), !1;
} catch {

@@ -391,10 +391,10 @@ return !0;

}
function ye(e) {
function he(e) {
return "" + e;
}
function he(e) {
function ye(e) {
if (Ke(e))
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), ye(e);
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), he(e);
}
var I = D.ReactCurrentOwner, Xe = {
var $ = k.ReactCurrentOwner, Xe = {
key: !0,

@@ -404,3 +404,3 @@ ref: !0,

__source: !0
}, me, ge, z;
}, ge, me, z;
z = {};

@@ -424,5 +424,5 @@ function Ze(e) {

function er(e, r) {
if (typeof e.ref == "string" && I.current && r && I.current.stateNode !== r) {
var t = w(I.current.type);
z[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(I.current.type), e.ref), z[t] = !0);
if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
var t = j($.current.type);
z[t] || (E('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', j($.current.type), e.ref), z[t] = !0);
}

@@ -433,3 +433,3 @@ }

var t = function() {
me || (me = !0, _("%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));
ge || (ge = !0, E("%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));
};

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

var t = function() {
ge || (ge = !0, _("%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));
me || (me = !0, E("%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));
};

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

}
var nr = function(e, r, t, a, c, v, u) {
var nr = function(e, r, t, a, f, d, u) {
var s = {

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

// Record the component responsible for creating this element.
_owner: v
_owner: d
};

@@ -482,15 +482,15 @@ return s._store = {}, Object.defineProperty(s._store, "validated", {

writable: !1,
value: c
value: f
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
};
function ar(e, r, t, a, c) {
function ar(e, r, t, a, f) {
{
var v, u = {}, s = null, R = null;
t !== void 0 && (he(t), s = "" + t), Qe(r) && (he(r.key), s = "" + r.key), Ze(r) && (R = r.ref, er(r, c));
for (v in r)
J.call(r, v) && !Xe.hasOwnProperty(v) && (u[v] = r[v]);
var d, u = {}, s = null, R = null;
t !== void 0 && (ye(t), s = "" + t), Qe(r) && (ye(r.key), s = "" + r.key), Ze(r) && (R = r.ref, er(r, f));
for (d in r)
J.call(r, d) && !Xe.hasOwnProperty(d) && (u[d] = r[d]);
if (e && e.defaultProps) {
var b = e.defaultProps;
for (v in b)
u[v] === void 0 && (u[v] = b[v]);
var h = e.defaultProps;
for (d in h)
u[d] === void 0 && (u[d] = h[d]);
}

@@ -501,12 +501,12 @@ if (s || R) {

}
return nr(e, s, R, c, a, I.current, u);
return nr(e, s, R, f, a, $.current, u);
}
}
var H = D.ReactCurrentOwner, Ee = D.ReactDebugCurrentFrame;
function k(e) {
var H = k.ReactCurrentOwner, _e = k.ReactDebugCurrentFrame;
function A(e) {
if (e) {
var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
Ee.setExtraStackFrame(t);
_e.setExtraStackFrame(t);
} else
Ee.setExtraStackFrame(null);
_e.setExtraStackFrame(null);
}

@@ -518,6 +518,6 @@ var K;

}
function _e() {
function Ee() {
{
if (H.current) {
var e = w(H.current.type);
var e = j(H.current.type);
if (e)

@@ -545,3 +545,3 @@ return `

{
var r = _e();
var r = Ee();
if (!r) {

@@ -566,3 +566,3 @@ var t = typeof e == "string" ? e : e.displayName || e.name;

var a = "";
e && e._owner && e._owner !== H.current && (a = " It was passed a child from " + w(e._owner.type) + "."), k(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, a), k(null);
e && e._owner && e._owner !== H.current && (a = " It was passed a child from " + j(e._owner.type) + "."), A(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, a), A(null);
}

@@ -582,5 +582,5 @@ }

else if (e) {
var c = Ae(e);
if (typeof c == "function" && c !== e.entries)
for (var v = c.call(e), u; !(u = v.next()).done; )
var f = Ae(e);
if (typeof f == "function" && f !== e.entries)
for (var d = f.call(e), u; !(u = d.next()).done; )
X(u.value) && Se(u.value, r);

@@ -598,5 +598,5 @@ }

t = r.propTypes;
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
r.$$typeof === x))
r.$$typeof === S))
t = r.propTypes;

@@ -606,10 +606,10 @@ else

if (t) {
var a = w(r);
var a = j(r);
Ge(t, e.props, "prop", a, e);
} else if (r.PropTypes !== void 0 && !K) {
K = !0;
var c = w(r);
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown");
var f = j(r);
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
}
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}

@@ -622,10 +622,10 @@ }

if (a !== "children" && a !== "key") {
k(e), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), k(null);
A(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), A(null);
break;
}
}
e.ref !== null && (k(e), _("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
e.ref !== null && (A(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
}
}
function xe(e, r, t, a, c, v) {
function xe(e, r, t, a, f, d) {
{

@@ -636,8 +636,8 @@ var u = We(e);

(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " 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 R = lr(c);
R ? s += R : s += _e();
var b;
e === null ? b = "null" : G(e) ? b = "array" : e !== void 0 && e.$$typeof === i ? (b = "<" + (w(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, s);
var R = lr(f);
R ? s += R : s += Ee();
var h;
e === null ? h = "null" : G(e) ? h = "array" : e !== void 0 && e.$$typeof === i ? (h = "<" + (j(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : h = 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", h, s);
}
var y = ar(e, r, t, c, v);
var y = ar(e, r, t, f, d);
if (y == null)

@@ -650,11 +650,11 @@ return y;

if (G(T)) {
for (var A = 0; A < T.length; A++)
Te(T[A], e);
for (var F = 0; F < T.length; F++)
Te(T[F], e);
Object.freeze && Object.freeze(T);
} else
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
E("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
Te(T, e);
}
return e === o ? sr(y) : ir(y), y;
return e === l ? sr(y) : ir(y), y;
}

@@ -665,13 +665,13 @@ }

}
function cr(e, r, t) {
function fr(e, r, t) {
return xe(e, r, t, !1);
}
var fr = cr, dr = ur;
M.Fragment = o, M.jsx = fr, M.jsxs = dr;
}()), M;
var cr = fr, dr = ur;
Y.Fragment = l, Y.jsx = cr, Y.jsxs = dr;
}()), Y;
}
process.env.NODE_ENV === "production" ? Z.exports = vr() : Z.exports = pr();
var g = Z.exports;
function Q({ children: n, style: i, colSpan: l, ...o }) {
return /* @__PURE__ */ g.jsxs("td", { className: "calendar-label", style: i, colSpan: l, ...o, children: [
function Q({ children: n, style: i, colSpan: o, ...l }) {
return /* @__PURE__ */ g.jsxs("td", { className: "calendar-label", style: i, colSpan: o, ...l, children: [
/* @__PURE__ */ g.jsx("span", { className: "sr-only", children: n }),

@@ -802,3 +802,3 @@ /* @__PURE__ */ g.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", children: n })

}
}, yr = (n = /* @__PURE__ */ new Date()) => {
}, hr = (n = /* @__PURE__ */ new Date()) => {
const i = {

@@ -812,3 +812,3 @@ Sun: "Sunday",

Sat: "Saturday"
}, l = {
}, o = {
Jan: "January",

@@ -826,48 +826,48 @@ Feb: "February",

Dec: "December"
}, o = n.toString().split(" ");
return { year: o[3], month: l[o[1]], day: parseInt(o[2], 10), date: i[o[0]] };
}, hr = (n, i, l) => {
const o = De(i, l, n), p = yr(new Date(n, o, l));
return `${p.date}, ${p.month} ${p.day}, ${p.year}`;
}, mr = (n, i, l) => {
const o = De(i, l, n);
return `${n}-${String(o + 1).padStart(2, "0")}-${String(l).padStart(2, "0")}`;
}, gr = (n = C()) => n % 4 === 0 && n % 100 !== 0 || n % 400 === 0, ee = (n = C()) => [31, gr(n) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Pe = (n = C()) => new Date(n, 0, 1).getDay(), C = () => (/* @__PURE__ */ new Date()).getFullYear(), Er = (n) => n.reduce((i, l) => i + l, 0), re = (n = C()) => {
const i = ee(n), l = Pe(n), o = [];
let p = l;
for (let h = 0; h < 12; h++) {
const E = i[h];
let f = 0;
for (let d = 0; d < E; d++)
p === 0 && f++, p = (p + 1) % 7;
h === 0 && l !== 0 && f++, o.push(f);
}, l = n.toString().split(" ");
return { year: l[3], month: o[l[1]], day: parseInt(l[2], 10), date: i[l[0]] };
}, yr = (n, i, o) => {
const l = Pe(i, o, n), c = hr(new Date(n, l, o));
return `${c.date}, ${c.month} ${c.day}, ${c.year}`;
}, gr = (n, i, o) => {
const l = Pe(i, o, n);
return `${n}-${String(l + 1).padStart(2, "0")}-${String(o).padStart(2, "0")}`;
}, mr = (n = D()) => n % 4 === 0 && n % 100 !== 0 || n % 400 === 0, ee = (n = D()) => [31, mr(n) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], De = (n = D()) => new Date(n, 0, 1).getDay(), D = () => (/* @__PURE__ */ new Date()).getFullYear(), _r = (n) => n.reduce((i, o) => i + o, 0), re = (n = D()) => {
const i = ee(n), o = De(n), l = [];
let c = o;
for (let b = 0; b < 12; b++) {
const _ = i[b];
let v = 0;
for (let p = 0; p < _; p++)
c === 0 && v++, c = (c + 1) % 7;
b === 0 && o !== 0 && v++, l.push(v);
}
return o;
}, De = (n, i, l = C()) => {
const o = re(l), p = ee(l);
let h = 0, E = 0, f = 0;
for (f = 0; f < o.length; f++) {
if (h += o[f], E += p[f], n + 1 === h && i < 7)
return f + 1;
if (n < h && i <= E)
return f;
return l;
}, Pe = (n, i, o = D()) => {
const l = re(o), c = ee(o);
let b = 0, _ = 0, v = 0;
for (v = 0; v < l.length; v++) {
if (b += l[v], _ += c[v], n + 1 === b && i < 7)
return v + 1;
if (n < b && i <= _)
return v;
}
return f;
}, _r = (n) => new Array(7).fill(0).map(() => new Array(n).fill(0)), Rr = (n, i = C()) => {
const l = ee(i), o = Pe(i);
let p = 0, h = 1, E = o;
for (; p < 12; ) {
for (let f = 0; f < l[p]; f++)
n[E % 7][~~(E / 7)] = h, E++, h++;
h > l[p] && (h = 1, p++);
return v;
}, Er = (n) => new Array(7).fill(0).map(() => new Array(n).fill(0)), Rr = (n, i = D()) => {
const o = ee(i), l = De(i);
let c = 0, b = 1, _ = l;
for (; c < 12; ) {
for (let v = 0; v < o[c]; v++)
n[_ % 7][~~(_ / 7)] = b, _++, b++;
b > o[c] && (b = 1, c++);
}
return n;
}, Sr = (n = C()) => {
const i = re(n), l = Er(i), o = _r(l);
return Rr(o, n);
}, Sr = (n = D()) => {
const i = re(n), o = _r(i), l = Er(o);
return Rr(l, n);
}, Tr = (n) => {
const i = /* @__PURE__ */ new Map();
return n.forEach((l) => {
Object.keys(l).forEach((o) => {
i.set(o, l[o]);
return n.forEach((o) => {
Object.keys(o).forEach((l) => {
i.set(l, o[l]);
});

@@ -877,23 +877,31 @@ }), i;

function Or() {
const n = C(), i = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], l = re(n);
const n = D(), i = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], o = re(n);
return /* @__PURE__ */ g.jsx("thead", { children: /* @__PURE__ */ g.jsxs("tr", { children: [
/* @__PURE__ */ g.jsx(Q, { style: { width: "40px" }, colSpan: 1, children: " " }),
i.map((o, p) => /* @__PURE__ */ g.jsx(Q, { colSpan: l[p], children: o }, o))
i.map((l, c) => /* @__PURE__ */ g.jsx(Q, { colSpan: o[c], children: l }, l))
] }) });
}
function wr({ children: n, style: i, dataTooltip: l, ...o }) {
return /* @__PURE__ */ g.jsx("td", { className: "calendar-cell top half-arrow", style: i, ...o, "data-tooltip": l, children: /* @__PURE__ */ g.jsx("span", { className: "sr-only", children: n }) });
function wr({ children: n, style: i, dataTooltip: o, dataLevel: l, themeProps: c, ...b }) {
return /* @__PURE__ */ g.jsx(
"td",
{
className: "calendar-cell top half-arrow",
style: { ...i, backgroundColor: c[`level${l}`] },
"data-tooltip": o,
"data-level": l,
...b,
children: /* @__PURE__ */ g.jsx("span", { className: "sr-only", children: n })
}
);
}
function jr({ data: n = [], theme: i = "grass" }) {
const l = C(), o = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], p = Sr(l);
((f) => {
const d = xr(f);
d ? (document.documentElement.style.setProperty("--color-bg-level-0", d.level0), document.documentElement.style.setProperty("--color-bg-level-1", d.level1), document.documentElement.style.setProperty("--color-bg-level-2", d.level2), document.documentElement.style.setProperty("--color-bg-level-3", d.level3), document.documentElement.style.setProperty("--color-bg-level-4", d.level4)) : console.error("Invalid theme name");
})(i);
const E = Tr(n);
return /* @__PURE__ */ g.jsx("tbody", { children: o.map((f, d) => /* @__PURE__ */ g.jsxs("tr", { children: [
/* @__PURE__ */ g.jsx(Q, { tabIndex: 0, style: { textAlign: "inherit" }, children: f }),
p[d].map((O, m) => {
const x = mr(l, m, O), S = E.get(x);
return O ? /* @__PURE__ */ g.jsx(
const o = D(), l = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], c = Sr(o), _ = ((p) => {
const x = xr(p);
return x || console.error("Invalid theme name"), x;
})(i), v = Tr(n);
return /* @__PURE__ */ g.jsx("tbody", { children: l.map((p, x) => /* @__PURE__ */ g.jsxs("tr", { children: [
/* @__PURE__ */ g.jsx(Q, { tabIndex: 0, style: { textAlign: "inherit" }, children: p }),
c[x].map((m, S) => {
const w = gr(o, S, m), O = v.get(w);
return m ? /* @__PURE__ */ g.jsx(
wr,

@@ -903,12 +911,13 @@ {

style: { width: "10px", height: "10px" },
"data-level": S !== void 0 ? S.level : 0,
"data-content": JSON.stringify(S == null ? void 0 : S.data),
dataTooltip: hr(l, m, O)
dataLevel: O !== void 0 ? O.level : 0,
"data-content": JSON.stringify(O == null ? void 0 : O.data),
dataTooltip: yr(o, S, m),
themeProps: _
},
m
) : /* @__PURE__ */ g.jsx("td", {}, m);
S
) : /* @__PURE__ */ g.jsx("td", {}, S);
})
] }, f)) });
] }, p)) });
}
function Pr({ data: n = [], theme: i = "grass" }) {
function Dr({ data: n = [], theme: i = "grass" }) {
return /* @__PURE__ */ g.jsx("div", { className: "container", children: /* @__PURE__ */ g.jsxs("table", { children: [

@@ -920,14 +929,14 @@ /* @__PURE__ */ g.jsx(Or, {}),

export {
Pr as ContributionCalendar,
Dr as ContributionCalendar,
xr as createTheme,
Er as getArraySum,
_r as getArraySum,
re as getColumnSpans,
C as getCurrentYear,
yr as getDateDetails,
mr as getDateString,
hr as getDateTooltip,
D as getCurrentYear,
hr as getDateDetails,
gr as getDateString,
yr as getDateTooltip,
Sr as getDayArrayFromYear,
De as getMonthIndex,
gr as isLeapYear,
Pe as getMonthIndex,
mr as isLeapYear,
Tr as parseInputData
};

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

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

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

import { FunctionComponent } from 'react'
/**
* Returns an object of ThemeProps which could be used as theme attribute of
* ContributionCalendarProps.
* @param {ThemeProps} themeProps - Theme color properties from level 0 to 4.
*/
export const createTheme = (themeProps: ThemeProps): ThemeProps => {}
/**

@@ -13,0 +19,0 @@ * This is for attributes of <ContributionCalendar /> function component.

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

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

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