@melodicdev/components 2.0.1 → 2.0.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.
@@ -606,45 +606,54 @@ var me = class {
606
606
  const e = [], t = /* @__PURE__ */ new Set();
607
607
  let r = this._component;
608
608
  for (; r && r !== Object.prototype; ) {
609
- for (const l of Object.getOwnPropertyNames(r)) t.has(l) || (t.add(l), e.push(l));
609
+ for (const o of Object.getOwnPropertyNames(r)) t.has(o) || (t.add(o), e.push(o));
610
610
  r = Object.getPrototypeOf(r);
611
611
  }
612
- const a = e.filter((l) => {
613
- if (l.startsWith("_") || l === "elementRef" || l === "constructor") return !1;
614
- const o = this.getPropertyDescriptor(this._component, l);
615
- if (o && o.get && !o.set) return !1;
616
- const s = this._component[l];
617
- return ua(s) ? (this._reactiveSources.push(s), !1) : s instanceof me ? (this._reactiveSources.push(s.value), this._reactiveSources.push(s.state), !1) : typeof s != "function";
612
+ const a = [], l = e.filter((o) => {
613
+ if (o.startsWith("_") || o === "elementRef" || o === "constructor") return !1;
614
+ const s = this.getPropertyDescriptor(this._component, o);
615
+ if (s && s.get && !s.set)
616
+ return a.push(o), !1;
617
+ const n = this._component[o];
618
+ return ua(n) ? (this._reactiveSources.push(n), !1) : n instanceof me ? (this._reactiveSources.push(n.value), this._reactiveSources.push(n.state), !1) : typeof n != "function";
618
619
  });
619
- for (const l of a) {
620
- const o = this.getPropertyDescriptor(this._component, l), s = Object.getOwnPropertyDescriptor(this, l)?.value;
621
- let n = s === void 0 ? this._component[l] : s;
622
- typeof n == "boolean" && this._booleanProperties.add(l);
623
- let c = () => n, m = (h) => {
624
- Object.is(n, h) || (this._component.onPropertyChange?.(l, n, h), n = h, this.scheduleRender());
620
+ for (const o of l) {
621
+ const s = this.getPropertyDescriptor(this._component, o), n = Object.getOwnPropertyDescriptor(this, o)?.value;
622
+ let c = n === void 0 ? this._component[o] : n;
623
+ typeof c == "boolean" && this._booleanProperties.add(o);
624
+ let m = () => c, h = (p) => {
625
+ Object.is(c, p) || (this._component.onPropertyChange?.(o, c, p), c = p, this.scheduleRender());
625
626
  };
626
- if (o?.get) {
627
- const h = o.get;
628
- c = () => h.call(this._component);
627
+ if (s?.get) {
628
+ const p = s.get;
629
+ m = () => p.call(this._component);
629
630
  }
630
- if (o?.set) {
631
- const h = o.set, u = m;
632
- m = (p) => {
633
- h.call(this._component, p), u(p);
631
+ if (s?.set) {
632
+ const p = s.set, u = h;
633
+ h = (b) => {
634
+ p.call(this._component, b), u(b);
634
635
  };
635
636
  }
636
- Object.defineProperty(this._component, l, {
637
- get: c,
638
- set: m,
637
+ Object.defineProperty(this._component, o, {
638
+ get: m,
639
+ set: h,
639
640
  enumerable: !0,
640
641
  configurable: !0
641
- }), Object.defineProperty(this, l, {
642
- get: c,
643
- set: m,
642
+ }), Object.defineProperty(this, o, {
643
+ get: m,
644
+ set: h,
644
645
  enumerable: !0,
645
646
  configurable: !0
646
647
  });
647
648
  }
649
+ for (const o of a)
650
+ Object.prototype.hasOwnProperty.call(this, o) || Object.defineProperty(this, o, {
651
+ get: () => this._component[o],
652
+ set: () => {
653
+ },
654
+ enumerable: !0,
655
+ configurable: !0
656
+ });
648
657
  }
649
658
  getPropertyDescriptor(e, t) {
650
659
  let r = e;
@@ -1138,12 +1147,12 @@ function Zr(e, t, r, a, l) {
1138
1147
  children: o.children
1139
1148
  };
1140
1149
  if (Object.assign(l, n), a.push(h), o.children) {
1141
- const u = o.children.find((p) => p.path === "" && p.redirectTo);
1142
- if (u && u.redirectTo) return {
1150
+ const p = o.children.find((u) => u.path === "" && u.redirectTo);
1151
+ if (p && p.redirectTo) return {
1143
1152
  matches: a,
1144
1153
  params: l,
1145
1154
  isExactMatch: !1,
1146
- redirectTo: ct(u.redirectTo, m)
1155
+ redirectTo: ct(p.redirectTo, m)
1147
1156
  };
1148
1157
  }
1149
1158
  return {
@@ -1403,10 +1412,10 @@ var V = class {
1403
1412
  const { data: a, replace: l = !1, queryParams: o, skipGuards: s = !1, skipResolvers: n = !1, scrollToTop: c = !0 } = r;
1404
1413
  let m = t;
1405
1414
  o && Object.keys(o).length > 0 && (m = `${t}?${new URLSearchParams(o).toString()}`);
1406
- const h = ++this._navigationId, { pathname: u, search: p } = this.parseUrl(m);
1415
+ const h = ++this._navigationId, { pathname: p, search: u } = this.parseUrl(m);
1407
1416
  this._pendingTarget = {
1408
- pathname: u,
1409
- queryParams: new URLSearchParams(p)
1417
+ pathname: p,
1418
+ queryParams: new URLSearchParams(u)
1410
1419
  };
1411
1420
  const b = () => ({
1412
1421
  success: !1,
@@ -1666,10 +1675,10 @@ var qa = class oe {
1666
1675
  c.innerHTML = l;
1667
1676
  const m = [];
1668
1677
  let h = 0;
1669
- const u = [], p = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
1678
+ const p = [], u = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
1670
1679
  for (const k of a) switch (k.type) {
1671
1680
  case "event":
1672
- p.set(k.index, k);
1681
+ u.set(k.index, k);
1673
1682
  break;
1674
1683
  case "property":
1675
1684
  b.set(k.index, k);
@@ -1681,7 +1690,7 @@ var qa = class oe {
1681
1690
  w.set(k.index, k);
1682
1691
  break;
1683
1692
  case "node":
1684
- u.push(k);
1693
+ p.push(k);
1685
1694
  break;
1686
1695
  default:
1687
1696
  break;
@@ -1689,7 +1698,7 @@ var qa = class oe {
1689
1698
  const $ = (k, E) => {
1690
1699
  if (k.nodeType === Node.COMMENT_NODE) {
1691
1700
  if (k.data === ze) {
1692
- const S = u[h++];
1701
+ const S = p[h++];
1693
1702
  S && m.push({
1694
1703
  path: [...E],
1695
1704
  type: "node",
@@ -1701,7 +1710,7 @@ var qa = class oe {
1701
1710
  for (let F = S.attributes.length - 1; F >= 0; F--) {
1702
1711
  const z = S.attributes[F];
1703
1712
  if (z.name.startsWith("__event-")) {
1704
- const R = parseInt(z.name.match(/__event-(\d+)__/)?.[1] || "0"), C = p.get(R);
1713
+ const R = parseInt(z.name.match(/__event-(\d+)__/)?.[1] || "0"), C = u.get(R);
1705
1714
  C && m.push({
1706
1715
  path: [...E],
1707
1716
  type: "event",
@@ -1959,30 +1968,30 @@ var qa = class oe {
1959
1968
  keys: []
1960
1969
  }, n = /* @__PURE__ */ new Map(), c = [];
1961
1970
  for (const h of l) {
1962
- const u = s.items.get(h.key);
1963
- if (u)
1964
- this.updateArrayItem(u, h.value, a, t.endMarker), n.set(h.key, u);
1971
+ const p = s.items.get(h.key);
1972
+ if (p)
1973
+ this.updateArrayItem(p, h.value, a, t.endMarker), n.set(h.key, p);
1965
1974
  else {
1966
- const p = this.createArrayItem(h.value, a, t.endMarker);
1975
+ const u = this.createArrayItem(h.value, a, t.endMarker);
1967
1976
  n.set(h.key, {
1968
1977
  key: h.key,
1969
1978
  value: h.value,
1970
- container: p.container,
1971
- nodes: p.nodes
1979
+ container: u.container,
1980
+ nodes: u.nodes
1972
1981
  });
1973
1982
  }
1974
1983
  c.push(h.key);
1975
1984
  }
1976
- for (const [h, u] of s.items.entries()) if (!n.has(h)) for (const p of u.nodes) p.parentNode?.removeChild(p);
1985
+ for (const [h, p] of s.items.entries()) if (!n.has(h)) for (const u of p.nodes) u.parentNode?.removeChild(u);
1977
1986
  let m = t.startMarker.nextSibling;
1978
1987
  for (const h of c) {
1979
- const u = n.get(h);
1980
- for (const p of u.nodes) {
1981
- if (p === m) {
1988
+ const p = n.get(h);
1989
+ for (const u of p.nodes) {
1990
+ if (u === m) {
1982
1991
  m = m?.nextSibling ?? null;
1983
1992
  continue;
1984
1993
  }
1985
- a.insertBefore(p, m ?? t.endMarker);
1994
+ a.insertBefore(u, m ?? t.endMarker);
1986
1995
  }
1987
1996
  }
1988
1997
  t.arrayState = {
@@ -2394,7 +2403,7 @@ function Fa(e, t, r) {
2394
2403
  console.warn("routerLink: Invalid value. Expected string or { href: string, ... }");
2395
2404
  return;
2396
2405
  }
2397
- const { href: l, activeClass: o = "active", exactMatch: s = !1, replace: n = !1, data: c = null, queryParams: m = {} } = a, h = L.get(V), u = () => {
2406
+ const { href: l, activeClass: o = "active", exactMatch: s = !1, replace: n = !1, data: c = null, queryParams: m = {} } = a, h = L.get(V), p = () => {
2398
2407
  let w = l;
2399
2408
  if (m && Object.keys(m).length > 0) {
2400
2409
  const $ = new URLSearchParams(m);
@@ -2402,8 +2411,8 @@ function Fa(e, t, r) {
2402
2411
  }
2403
2412
  return w;
2404
2413
  };
2405
- e.tagName.toLowerCase() === "a" && (e.href = u());
2406
- const p = () => {
2414
+ e.tagName.toLowerCase() === "a" && (e.href = p());
2415
+ const u = () => {
2407
2416
  const w = window.location.pathname, $ = l.startsWith("/") ? l : `/${l}`, k = w.replace(/\/$/, "") || "/", E = $.replace(/\/$/, "") || "/";
2408
2417
  let A;
2409
2418
  s ? A = k === E : A = k === E || k.startsWith(E + "/"), A ? (e.classList.add(o), e.tagName.toLowerCase() === "a" && e.setAttribute("aria-current", "page")) : (e.classList.remove(o), e.removeAttribute("aria-current")), e.setAttribute("router-link", "");
@@ -2411,7 +2420,7 @@ function Fa(e, t, r) {
2411
2420
  const $ = w;
2412
2421
  if ($.ctrlKey || $.metaKey || $.shiftKey) {
2413
2422
  if (e.tagName.toLowerCase() === "a") return;
2414
- window.open(u(), "_blank");
2423
+ window.open(p(), "_blank");
2415
2424
  return;
2416
2425
  }
2417
2426
  w.preventDefault();
@@ -2422,9 +2431,9 @@ function Fa(e, t, r) {
2422
2431
  };
2423
2432
  h.navigate(l, k);
2424
2433
  }, y = () => {
2425
- p();
2434
+ u();
2426
2435
  };
2427
- return e.addEventListener("click", b), window.addEventListener("NavigationEvent", y), p(), (() => {
2436
+ return e.addEventListener("click", b), window.addEventListener("NavigationEvent", y), u(), (() => {
2428
2437
  e.removeEventListener("click", b), window.removeEventListener("NavigationEvent", y);
2429
2438
  });
2430
2439
  }
@@ -2659,38 +2668,38 @@ function x(e, t, r) {
2659
2668
  }
2660
2669
  function vt(e, t, r, a) {
2661
2670
  const l = a.items, o = /* @__PURE__ */ new Map(), s = [];
2662
- for (let p = 0; p < e.length; p++) {
2663
- const b = t(e[p], p);
2664
- o.set(b, p);
2671
+ for (let u = 0; u < e.length; u++) {
2672
+ const b = t(e[u], u);
2673
+ o.set(b, u);
2665
2674
  }
2666
2675
  if (l.length === e.length) {
2667
- let p = !0;
2676
+ let u = !0;
2668
2677
  for (let b = 0; b < e.length; b++) {
2669
2678
  const y = t(e[b], b);
2670
2679
  if (b >= l.length || l[b].key !== y) {
2671
- p = !1;
2680
+ u = !1;
2672
2681
  break;
2673
2682
  }
2674
2683
  }
2675
- if (p) {
2684
+ if (u) {
2676
2685
  for (let b = 0; b < e.length; b++) r(e[b], b).renderInto(l[b].container);
2677
2686
  return;
2678
2687
  }
2679
2688
  }
2680
2689
  const n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
2681
- for (const p of l)
2682
- n.set(p.key, p), c.set(p.key, c.size);
2683
- for (let p = 0; p < e.length; p++) {
2684
- const b = e[p], y = t(b, p);
2690
+ for (const u of l)
2691
+ n.set(u.key, u), c.set(u.key, c.size);
2692
+ for (let u = 0; u < e.length; u++) {
2693
+ const b = e[u], y = t(b, u);
2685
2694
  if (n.has(y)) {
2686
2695
  const w = n.get(y);
2687
- n.delete(y), r(b, p).renderInto(w.container), s.push({
2696
+ n.delete(y), r(b, u).renderInto(w.container), s.push({
2688
2697
  item: w,
2689
2698
  oldIndex: c.get(y) ?? -1,
2690
2699
  isNew: !1
2691
2700
  });
2692
2701
  } else {
2693
- const w = Ha(b, p, y, r);
2702
+ const w = Ha(b, u, y, r);
2694
2703
  s.push({
2695
2704
  item: w,
2696
2705
  oldIndex: -1,
@@ -2698,18 +2707,18 @@ function vt(e, t, r, a) {
2698
2707
  });
2699
2708
  }
2700
2709
  }
2701
- for (const p of n.values()) Ka(p);
2710
+ for (const u of n.values()) Ka(u);
2702
2711
  if (s.length === 0) {
2703
2712
  a.keyToIndex = o, a.items = [];
2704
2713
  return;
2705
2714
  }
2706
2715
  const m = Ua(s), h = a.startMarker.parentElement;
2707
- let u = a.endMarker;
2708
- for (let p = s.length - 1; p >= 0; p--) {
2709
- const b = s[p];
2710
- b.isNew ? Ya(b.item, h, u) : m.has(p) || Ga(b.item, u), u = b.item.start;
2716
+ let p = a.endMarker;
2717
+ for (let u = s.length - 1; u >= 0; u--) {
2718
+ const b = s[u];
2719
+ b.isNew ? Ya(b.item, h, p) : m.has(u) || Ga(b.item, p), p = b.item.start;
2711
2720
  }
2712
- a.keyToIndex = o, a.items = s.map((p) => p.item);
2721
+ a.keyToIndex = o, a.items = s.map((u) => u.item);
2713
2722
  }
2714
2723
  function Ha(e, t, r, a) {
2715
2724
  const l = a(e, t), o = document.createDocumentFragment();
@@ -2792,9 +2801,9 @@ function zn(e, t, r) {
2792
2801
  endMarker: n
2793
2802
  }, m = document.createDocumentFragment();
2794
2803
  for (let h = 0; h < e.length; h++) {
2795
- const u = e[h], p = t(u, h), b = r(u, h);
2796
- c.keyToItem.set(p, {
2797
- key: p,
2804
+ const p = e[h], u = t(p, h), b = r(p, h);
2805
+ c.keyToItem.set(u, {
2806
+ key: u,
2798
2807
  element: b
2799
2808
  }), m.appendChild(b);
2800
2809
  }
@@ -2806,25 +2815,25 @@ function zn(e, t, r) {
2806
2815
  function Xa(e, t, r, a) {
2807
2816
  const l = a.keyToItem, o = /* @__PURE__ */ new Map(), s = a.startMarker.parentElement, n = a.endMarker;
2808
2817
  if (l.size === e.length) {
2809
- let h = !0, u = 0;
2810
- for (const [p] of l) {
2811
- if (p !== t(e[u], u)) {
2818
+ let h = !0, p = 0;
2819
+ for (const [u] of l) {
2820
+ if (u !== t(e[p], p)) {
2812
2821
  h = !1;
2813
2822
  break;
2814
2823
  }
2815
- u++;
2824
+ p++;
2816
2825
  }
2817
2826
  if (h) {
2818
- u = 0;
2819
- for (const [p, { element: b }] of l) {
2820
- const y = e[u], w = r(y, u);
2821
- b !== w ? (b.replaceWith(w), o.set(p, {
2822
- key: p,
2827
+ p = 0;
2828
+ for (const [u, { element: b }] of l) {
2829
+ const y = e[p], w = r(y, p);
2830
+ b !== w ? (b.replaceWith(w), o.set(u, {
2831
+ key: u,
2823
2832
  element: w
2824
- })) : o.set(p, {
2825
- key: p,
2833
+ })) : o.set(u, {
2834
+ key: u,
2826
2835
  element: b
2827
- }), u++;
2836
+ }), p++;
2828
2837
  }
2829
2838
  a.keyToItem = o;
2830
2839
  return;
@@ -2832,24 +2841,24 @@ function Xa(e, t, r, a) {
2832
2841
  }
2833
2842
  const c = document.createDocumentFragment(), m = /* @__PURE__ */ new Set();
2834
2843
  for (let h = 0; h < e.length; h++) {
2835
- const u = e[h], p = t(u, h);
2836
- m.add(p);
2837
- const b = l.get(p);
2844
+ const p = e[h], u = t(p, h);
2845
+ m.add(u);
2846
+ const b = l.get(u);
2838
2847
  if (b) {
2839
- const y = r(u, h);
2840
- b.element !== y ? (o.set(p, {
2841
- key: p,
2848
+ const y = r(p, h);
2849
+ b.element !== y ? (o.set(u, {
2850
+ key: u,
2842
2851
  element: y
2843
- }), c.appendChild(y)) : (o.set(p, b), c.appendChild(b.element));
2852
+ }), c.appendChild(y)) : (o.set(u, b), c.appendChild(b.element));
2844
2853
  } else {
2845
- const y = r(u, h);
2846
- o.set(p, {
2847
- key: p,
2854
+ const y = r(p, h);
2855
+ o.set(u, {
2856
+ key: u,
2848
2857
  element: y
2849
2858
  }), c.appendChild(y);
2850
2859
  }
2851
2860
  }
2852
- for (const [h, { element: u }] of l) m.has(h) || u.remove();
2861
+ for (const [h, { element: p }] of l) m.has(h) || p.remove();
2853
2862
  s.insertBefore(c, n), a.keyToItem = o;
2854
2863
  }
2855
2864
  function d(e, t, r) {
@@ -3406,10 +3415,10 @@ function cl(e, t, r) {
3406
3415
  console.warn(`formControl directive: no adapter registered for <${e.tagName.toLowerCase()}>`);
3407
3416
  return;
3408
3417
  }
3409
- const o = [], s = (p) => {
3410
- a.destroyed || l.setValue(e, p);
3411
- }, n = (p) => {
3412
- a.destroyed || l.setDisabled?.(e, p);
3418
+ const o = [], s = (u) => {
3419
+ a.destroyed || l.setValue(e, u);
3420
+ }, n = (u) => {
3421
+ a.destroyed || l.setDisabled?.(e, u);
3413
3422
  }, c = () => {
3414
3423
  a.destroyed || (e.classList.toggle("mf-valid", a.valid()), e.classList.toggle("mf-invalid", a.invalid()), e.classList.toggle("mf-dirty", a.dirty()), e.classList.toggle("mf-pristine", a.pristine()), e.classList.toggle("mf-touched", a.touched()), e.classList.toggle("mf-pending", a.pending()), e.classList.toggle("mf-disabled", a.disabled()));
3415
3424
  }, m = () => {
@@ -3418,17 +3427,17 @@ function cl(e, t, r) {
3418
3427
  e.removeAttribute("error");
3419
3428
  return;
3420
3429
  }
3421
- const p = a.getFirstErrorMessage();
3422
- p ? e.setAttribute("error", p) : e.removeAttribute("error");
3423
- }, h = (p) => {
3424
- const b = p.target;
3430
+ const u = a.getFirstErrorMessage();
3431
+ u ? e.setAttribute("error", u) : e.removeAttribute("error");
3432
+ }, h = (u) => {
3433
+ const b = u.target;
3425
3434
  (b === e || e.contains(b)) && (a.setValue(l.getValue(e)), a.markAsDirty());
3426
- }, u = () => {
3435
+ }, p = () => {
3427
3436
  a.markAsTouched();
3428
3437
  };
3429
- return s(a.value()), n(a.disabled()), c(), m(), o.push(a.value.subscribe((p) => s(p))), o.push(a.disabled.subscribe((p) => n(p))), o.push(a.state.subscribe(() => c())), o.push(a.state.subscribe(() => m())), e.addEventListener(l.inputEvent, h), e.addEventListener(l.blurEvent, u), e.setAttribute("data-form-control", ""), () => {
3430
- e.removeEventListener(l.inputEvent, h), e.removeEventListener(l.blurEvent, u), e.removeAttribute("data-form-control");
3431
- for (const p of o) p();
3438
+ return s(a.value()), n(a.disabled()), c(), m(), o.push(a.value.subscribe((u) => s(u))), o.push(a.disabled.subscribe((u) => n(u))), o.push(a.state.subscribe(() => c())), o.push(a.state.subscribe(() => m())), e.addEventListener(l.inputEvent, h), e.addEventListener(l.blurEvent, p), e.setAttribute("data-form-control", ""), () => {
3439
+ e.removeEventListener(l.inputEvent, h), e.removeEventListener(l.blurEvent, p), e.removeAttribute("data-form-control");
3440
+ for (const u of o) u();
3432
3441
  };
3433
3442
  }
3434
3443
  Se("formControl", cl);
@@ -3984,13 +3993,13 @@ function he(e, t, r = {}) {
3984
3993
  middlewareData: {}
3985
3994
  };
3986
3995
  for (const h of l) {
3987
- const u = h.fn(m);
3988
- u && (m = {
3996
+ const p = h.fn(m);
3997
+ p && (m = {
3989
3998
  ...m,
3990
- ...u
3991
- }, u.middlewareData && (m.middlewareData = {
3999
+ ...p
4000
+ }, p.middlewareData && (m.middlewareData = {
3992
4001
  ...m.middlewareData,
3993
- ...u.middlewareData
4002
+ ...p.middlewareData
3994
4003
  }));
3995
4004
  }
3996
4005
  return {
@@ -4118,10 +4127,10 @@ function ue(e = {}) {
4118
4127
  if (!yt(wt(a, l, s.floating, t), n)) return;
4119
4128
  const c = Cl(o), m = e.fallbackPlacements ?? [c];
4120
4129
  for (const h of m) {
4121
- const u = zl(s.reference, s.floating, h);
4122
- if (!yt(wt(u.x, u.y, s.floating, t), $e(h))) return {
4123
- x: u.x,
4124
- y: u.y,
4130
+ const p = zl(s.reference, s.floating, h);
4131
+ if (!yt(wt(p.x, p.y, s.floating, t), $e(h))) return {
4132
+ x: p.x,
4133
+ y: p.y,
4125
4134
  placement: h
4126
4135
  };
4127
4136
  }
@@ -4183,12 +4192,12 @@ function ge(e = {}) {
4183
4192
  };
4184
4193
  let m = o, h = s;
4185
4194
  if (a || r) {
4186
- const u = t, p = c.width - n.floating.width - t;
4187
- m = Math.max(u, Math.min(m, p));
4195
+ const p = t, u = c.width - n.floating.width - t;
4196
+ m = Math.max(p, Math.min(m, u));
4188
4197
  }
4189
4198
  if (a || r) {
4190
- const u = t, p = c.height - n.floating.height - t;
4191
- h = Math.max(u, Math.min(h, p));
4199
+ const p = t, u = c.height - n.floating.height - t;
4200
+ h = Math.max(p, Math.min(h, u));
4192
4201
  }
4193
4202
  return {
4194
4203
  x: m,
@@ -4203,19 +4212,19 @@ function la(e) {
4203
4212
  name: "arrow",
4204
4213
  fn(a) {
4205
4214
  const { rects: l, placement: o } = a, s = $e(o), n = t.getBoundingClientRect(), c = n.width, m = n.height;
4206
- let h, u;
4215
+ let h, p;
4207
4216
  if (s === "top" || s === "bottom") {
4208
4217
  h = l.reference.left + l.reference.width / 2 - a.x - c / 2;
4209
- const p = r, b = l.floating.width - c - r;
4210
- h = Math.max(p, Math.min(h, b));
4218
+ const u = r, b = l.floating.width - c - r;
4219
+ h = Math.max(u, Math.min(h, b));
4211
4220
  } else {
4212
- u = l.reference.top + l.reference.height / 2 - a.y - m / 2;
4213
- const p = r, b = l.floating.height - m - r;
4214
- u = Math.max(p, Math.min(u, b));
4221
+ p = l.reference.top + l.reference.height / 2 - a.y - m / 2;
4222
+ const u = r, b = l.floating.height - m - r;
4223
+ p = Math.max(u, Math.min(p, b));
4215
4224
  }
4216
4225
  return { middlewareData: { arrow: {
4217
4226
  x: h,
4218
- y: u,
4227
+ y: p,
4219
4228
  centerOffset: 0
4220
4229
  } } };
4221
4230
  }
@@ -4255,27 +4264,27 @@ function Gn(e) {
4255
4264
  function Tl(e, t = {}) {
4256
4265
  const { initialFocus: r = null, returnFocus: a = null, autoFocus: l = !0 } = t;
4257
4266
  let o = !1, s = null;
4258
- function n(u) {
4259
- if (u.key !== "Tab" || !o) return;
4260
- const p = Je(e);
4261
- if (p.length === 0) return;
4262
- const b = p[0], y = p[p.length - 1];
4263
- u.shiftKey ? document.activeElement === b && (u.preventDefault(), y.focus()) : document.activeElement === y && (u.preventDefault(), b.focus());
4267
+ function n(p) {
4268
+ if (p.key !== "Tab" || !o) return;
4269
+ const u = Je(e);
4270
+ if (u.length === 0) return;
4271
+ const b = u[0], y = u[u.length - 1];
4272
+ p.shiftKey ? document.activeElement === b && (p.preventDefault(), y.focus()) : document.activeElement === y && (p.preventDefault(), b.focus());
4264
4273
  }
4265
4274
  function c() {
4266
4275
  if (!o) {
4267
4276
  if (o = !0, s = document.activeElement, e.addEventListener("keydown", n), r) r.focus();
4268
4277
  else if (l) {
4269
- const u = oa(e);
4270
- u && u.focus();
4278
+ const p = oa(e);
4279
+ p && p.focus();
4271
4280
  }
4272
4281
  }
4273
4282
  }
4274
4283
  function m() {
4275
4284
  if (!o) return;
4276
4285
  o = !1, e.removeEventListener("keydown", n);
4277
- const u = a ?? s;
4278
- u && typeof u.focus == "function" && u.focus();
4286
+ const p = a ?? s;
4287
+ p && typeof p.focus == "function" && p.focus();
4279
4288
  }
4280
4289
  function h() {
4281
4290
  return o;
@@ -9117,15 +9126,15 @@ var qt = class {
9117
9126
  isDisabled: this.isDisabled(y)
9118
9127
  });
9119
9128
  }
9120
- const h = r === 11 ? 0 : r + 1, u = r === 11 ? t + 1 : t, p = n.length % 7;
9121
- if (p > 0) {
9122
- const b = 7 - p;
9129
+ const h = r === 11 ? 0 : r + 1, p = r === 11 ? t + 1 : t, u = n.length % 7;
9130
+ if (u > 0) {
9131
+ const b = 7 - u;
9123
9132
  for (let y = 1; y <= b; y++) {
9124
- const w = W(u, h, y);
9133
+ const w = W(p, h, y);
9125
9134
  n.push({
9126
9135
  date: y,
9127
9136
  month: h,
9128
- year: u,
9137
+ year: p,
9129
9138
  iso: w,
9130
9139
  isCurrentMonth: !1,
9131
9140
  isToday: w === s,
@@ -13980,13 +13989,13 @@ function fi(e, t) {
13980
13989
  return e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear() ? `${r} ${e.getDate()} – ${t.getDate()}, ${e.getFullYear()}` : e.getFullYear() === t.getFullYear() ? `${r} ${e.getDate()} – ${a} ${t.getDate()}, ${e.getFullYear()}` : `${r} ${e.getDate()}, ${e.getFullYear()} – ${a} ${t.getDate()}, ${t.getFullYear()}`;
13981
13990
  }
13982
13991
  function cr(e, t, r = 0) {
13983
- const a = new Date(e, t, 1).getDay(), l = new Date(e, t + 1, 0).getDate(), o = new Date(e, t, 0).getDate(), s = /* @__PURE__ */ new Date(), n = N(s.getFullYear(), s.getMonth(), s.getDate()), c = [], m = (a - r + 7) % 7, h = t === 0 ? 11 : t - 1, u = t === 0 ? e - 1 : e;
13992
+ const a = new Date(e, t, 1).getDay(), l = new Date(e, t + 1, 0).getDate(), o = new Date(e, t, 0).getDate(), s = /* @__PURE__ */ new Date(), n = N(s.getFullYear(), s.getMonth(), s.getDate()), c = [], m = (a - r + 7) % 7, h = t === 0 ? 11 : t - 1, p = t === 0 ? e - 1 : e;
13984
13993
  for (let w = m - 1; w >= 0; w--) {
13985
- const $ = o - w, k = N(u, h, $);
13994
+ const $ = o - w, k = N(p, h, $);
13986
13995
  c.push({
13987
13996
  date: $,
13988
13997
  month: h,
13989
- year: u,
13998
+ year: p,
13990
13999
  iso: k,
13991
14000
  isCurrentMonth: !1,
13992
14001
  isToday: k === n,
@@ -14005,8 +14014,8 @@ function cr(e, t, r = 0) {
14005
14014
  events: []
14006
14015
  });
14007
14016
  }
14008
- const p = Math.ceil(c.length / 7) * 7, b = t === 11 ? 0 : t + 1, y = t === 11 ? e + 1 : e;
14009
- for (let w = 1; c.length < p; w++) {
14017
+ const u = Math.ceil(c.length / 7) * 7, b = t === 11 ? 0 : t + 1, y = t === 11 ? e + 1 : e;
14018
+ for (let w = 1; c.length < u; w++) {
14010
14019
  const $ = N(y, b, w);
14011
14020
  c.push({
14012
14021
  date: w,
@@ -14054,14 +14063,14 @@ function ma(e) {
14054
14063
  const t = [...e].sort((n, c) => {
14055
14064
  const m = P(n.start), h = P(c.start);
14056
14065
  if (m !== h) return m - h;
14057
- const u = P(n.end) - m;
14058
- return P(c.end) - h - u;
14066
+ const p = P(n.end) - m;
14067
+ return P(c.end) - h - p;
14059
14068
  }), r = [], a = /* @__PURE__ */ new Map();
14060
14069
  for (const n of t) {
14061
14070
  const c = P(n.start), m = P(n.end);
14062
14071
  let h = !1;
14063
- for (let u = 0; u < r.length; u++) if (r[u][r[u].length - 1].end <= c) {
14064
- r[u].push({ end: m }), a.set(n.id, u), h = !0;
14072
+ for (let p = 0; p < r.length; p++) if (r[p][r[p].length - 1].end <= c) {
14073
+ r[p].push({ end: m }), a.set(n.id, p), h = !0;
14065
14074
  break;
14066
14075
  }
14067
14076
  h || (r.push([{ end: m }]), a.set(n.id, r.length - 1));
@@ -14072,8 +14081,8 @@ function ma(e) {
14072
14081
  const c = [n];
14073
14082
  o.add(n.id);
14074
14083
  let m = P(n.end), h = a.get(n.id) + 1;
14075
- for (const u of t)
14076
- o.has(u.id) || P(u.start) < m && (c.push(u), o.add(u.id), m = Math.max(m, P(u.end)), h = Math.max(h, a.get(u.id) + 1));
14084
+ for (const p of t)
14085
+ o.has(p.id) || P(p.start) < m && (c.push(p), o.add(p.id), m = Math.max(m, P(p.end)), h = Math.max(h, a.get(p.id) + 1));
14077
14086
  l.push({
14078
14087
  events: c,
14079
14088
  totalColumns: h
@@ -14081,13 +14090,13 @@ function ma(e) {
14081
14090
  }
14082
14091
  const s = [];
14083
14092
  for (const n of l) for (const c of n.events) {
14084
- const m = P(c.start), h = P(c.end), u = a.get(c.id), p = n.totalColumns;
14093
+ const m = P(c.start), h = P(c.end), p = a.get(c.id), u = n.totalColumns;
14085
14094
  s.push({
14086
14095
  event: c,
14087
14096
  gridRowStart: hr(m),
14088
14097
  gridRowEnd: hr(h),
14089
- left: u / p,
14090
- width: 1 / p
14098
+ left: p / u,
14099
+ width: 1 / u
14091
14100
  });
14092
14101
  }
14093
14102
  return s;
@@ -18077,9 +18086,9 @@ var wr = class {
18077
18086
  };
18078
18087
  }
18079
18088
  get pages() {
18080
- const t = Math.max(1, Number(this.totalPages)), r = Math.min(Math.max(1, Number(this.page)), t), a = Math.max(0, Number(this.siblings)), l = (m, h) => Array.from({ length: h - m + 1 }, (u, p) => ({
18089
+ const t = Math.max(1, Number(this.totalPages)), r = Math.min(Math.max(1, Number(this.page)), t), a = Math.max(0, Number(this.siblings)), l = (m, h) => Array.from({ length: h - m + 1 }, (p, u) => ({
18081
18090
  type: "page",
18082
- value: m + p
18091
+ value: m + u
18083
18092
  })), o = Math.max(r - a, 1), s = Math.min(r + a, t), n = o > 2, c = s < t - 1;
18084
18093
  return !n && !c ? l(1, t) : !n && c ? [
18085
18094
  ...l(1, Math.max(s, 3 + a)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melodicdev/components",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Themeable UI component library built on the Melodic Framework",
5
5
  "license": "MIT",
6
6
  "author": "Melodic Development",