cally 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cally.js +15 -15
  2. package/package.json +1 -1
package/dist/cally.js CHANGED
@@ -375,7 +375,7 @@ const Yt = globalThis[nt], ve = {
375
375
  }, _ = {}, st = [];
376
376
  class ot extends Text {
377
377
  }
378
- const Ne = F("atomico/id"), R = F("atomico/type"), Z = F("atomico/ref"), $t = F("atomico/vnode"), Pe = () => {
378
+ const Ne = F("atomico/id"), R = F("atomico/type"), X = F("atomico/ref"), $t = F("atomico/vnode"), Pe = () => {
379
379
  };
380
380
  function Oe(e, t, s) {
381
381
  return qt(this, e, t, s);
@@ -418,7 +418,7 @@ function qt(e, t, s = Ne, n, o) {
418
418
  let r;
419
419
  if (t && t[s] && t[s].vnode == e || e[R] != $t)
420
420
  return t;
421
- (e || !t) && (o = o || e.type == "svg", r = e.type != "host" && (e.raw == 1 ? (t && e.clone ? t[Z] : t) != e.type : e.raw == 2 ? !(t instanceof e.type) : t ? t[Z] || t.localName != e.type : !t), r && e.type != null && (e.raw == 1 && e.clone ? (n = !0, t = e.type.cloneNode(!0), t[Z] = e.type) : t = e.raw == 1 ? e.type : e.raw == 2 ? new e.type() : o ? document.createElementNS(
421
+ (e || !t) && (o = o || e.type == "svg", r = e.type != "host" && (e.raw == 1 ? (t && e.clone ? t[X] : t) != e.type : e.raw == 2 ? !(t instanceof e.type) : t ? t[X] || t.localName != e.type : !t), r && e.type != null && (e.raw == 1 && e.clone ? (n = !0, t = e.type.cloneNode(!0), t[X] = e.type) : t = e.raw == 1 ? e.type : e.raw == 2 ? new e.type() : o ? document.createElementNS(
422
422
  "http://www.w3.org/2000/svg",
423
423
  e.type
424
424
  ) : document.createElement(
@@ -666,13 +666,13 @@ function qe(e, t, s) {
666
666
  n[f] = i.format(r), r.setDate(r.getDate() + 1);
667
667
  return n;
668
668
  }
669
- const ze = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, Kt = "years", Jt = "months", Xt = "days";
669
+ const ze = /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/, Kt = "years", Jt = "months", Zt = "days";
670
670
  function Be(e) {
671
671
  if (Kt in e)
672
672
  return { years: -e.years };
673
673
  if (Jt in e)
674
674
  return { months: -e.months };
675
- if (Xt in e)
675
+ if (Zt in e)
676
676
  return { days: -e.days };
677
677
  throw new TypeError();
678
678
  }
@@ -688,7 +688,7 @@ function Ke(e, t) {
688
688
  return o.setUTCMonth(t - 1), H(g.from(o), s, n);
689
689
  }
690
690
  function Dt(e, t) {
691
- return Xt in t ? He(e, e.day + t.days) : Jt in t ? Ke(e, e.month + t.months) : Kt in t ? We(e, e.year + t.years) : e;
691
+ return Zt in t ? He(e, e.day + t.days) : Jt in t ? Ke(e, e.month + t.months) : Kt in t ? We(e, e.year + t.years) : e;
692
692
  }
693
693
  const Q = (e, t) => e.toString().padStart(t, "0");
694
694
  class g {
@@ -788,16 +788,16 @@ function Je(e) {
788
788
  }
789
789
  return [];
790
790
  }
791
- function Xe(e, t) {
791
+ function Ze(e, t) {
792
792
  return `${e}/${t}`;
793
793
  }
794
- function Ze(e) {
794
+ function Xe(e) {
795
795
  const [t, s] = Lt(e);
796
- return [P(() => Je(t), [t]), (r) => s(Xe(r[0], r[1]))];
796
+ return [P(() => Je(t), [t]), (r) => s(Ze(r[0], r[1]))];
797
797
  }
798
798
  function Y(e, t) {
799
799
  return P(
800
- () => new Intl.DateTimeFormat(t, e),
800
+ () => new Intl.DateTimeFormat(t, { timeZone: "UTC", ...e }),
801
801
  [t, e]
802
802
  );
803
803
  }
@@ -861,8 +861,8 @@ function tn({ props: e, context: t }) {
861
861
  const E = D.equals(p), se = p.equals(y), dt = p.equals(l), ht = p.toDate(), x = o?.(ht), mt = !rt(p, r, i);
862
862
  let k = !1, yt = !1, W = !1, K = !1;
863
863
  if ("highlightedRange" in t) {
864
- const [J, X] = t.highlightedRange;
865
- yt = !0, W = J?.equals(p) ?? !1, K = X?.equals(p) ?? !1, k = J && X ? rt(p, J, X) : !1;
864
+ const [J, Z] = t.highlightedRange;
865
+ yt = !0, W = J?.equals(p) ?? !1, K = Z?.equals(p) ?? !1, k = J && Z ? rt(p, J, Z) : !1;
866
866
  } else
867
867
  "value" in t && (k = t.value?.equals(p) ?? !1);
868
868
  return {
@@ -976,7 +976,7 @@ const en = $(
976
976
  }
977
977
  );
978
978
  customElements.define("calendar-month", en);
979
- function Zt(e) {
979
+ function Xt(e) {
980
980
  const t = e.dateWindow.start.toDate(), s = e.dateWindow.end.toDate();
981
981
  return /* @__PURE__ */ I("div", { role: "group", "aria-labelledby": "label", part: "container", children: [
982
982
  /* @__PURE__ */ b("div", { id: "label", class: "vh", "aria-live": "polite", "aria-atomic": "true", children: e.formatVerbose.formatRange(t, s) }),
@@ -1094,7 +1094,7 @@ const on = $(
1094
1094
  s(r.detail), n.dispatch();
1095
1095
  }
1096
1096
  return /* @__PURE__ */ b("host", { shadowDom: !0, focus: n.focus, children: /* @__PURE__ */ b(
1097
- Zt,
1097
+ Xt,
1098
1098
  {
1099
1099
  ...e,
1100
1100
  ...n,
@@ -1109,7 +1109,7 @@ const on = $(
1109
1109
  customElements.define("calendar-date", on);
1110
1110
  const Ct = (e, t) => g.compare(e, t) < 0 ? [e, t] : [t, e], rn = $(
1111
1111
  (e) => {
1112
- const [t, s] = Ze("value"), n = Vt(e), o = v("rangestart"), r = v("rangeend"), [i, f] = ct();
1112
+ const [t, s] = Xe("value"), n = Vt(e), o = v("rangestart"), r = v("rangeend"), [i, f] = ct();
1113
1113
  j(() => {
1114
1114
  t.length && !rt(n.dateWindow.focusedDate, t[0], t[1]) && n.setFocusedDate(t[1]);
1115
1115
  }, [t]);
@@ -1125,7 +1125,7 @@ const Ct = (e, t) => g.compare(e, t) < 0 ? [e, t] : [t, e], rn = $(
1125
1125
  }
1126
1126
  const h = i ? Ct(i.first, i.second) : t;
1127
1127
  return /* @__PURE__ */ b("host", { shadowDom: !0, focus: n.focus, children: /* @__PURE__ */ b(
1128
- Zt,
1128
+ Xt,
1129
1129
  {
1130
1130
  ...e,
1131
1131
  ...n,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cally",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "small, feature-rich calendar components",
5
5
  "license": "MIT",
6
6
  "type": "module",