@thednp/shorty 2.0.0-alpha12 → 2.0.0-alpha14

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.
package/dist/shorty.mjs CHANGED
@@ -163,7 +163,8 @@ const mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.b
163
163
  t.classList.add(...e);
164
164
  }, On = (t, ...e) => {
165
165
  t.classList.remove(...e);
166
- }, In = (t, e) => t.classList.contains(e), { body: zn } = document, { documentElement: xn } = document, Vn = (t) => Array.from(t), v = (t) => t != null && typeof t == "object" || !1, i = (t) => v(t) && typeof t.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, u = (t) => i(t) && t.nodeType === 1 || !1, b = /* @__PURE__ */ new Map(), O = {
166
+ }, In = (t, e) => t.classList.contains(e), { body: zn } = document, { documentElement: xn } = document, Vn = (t) => Array.from(t), v = (t) => t != null && typeof t == "object" || !1, i = (t) => v(t) && typeof t.nodeType == "number" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some((e) => t.nodeType === e) || !1, u = (t) => i(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), O = {
167
+ data: E,
167
168
  /**
168
169
  * Sets web components data.
169
170
  *
@@ -174,7 +175,7 @@ const mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.b
174
175
  set: (t, e, n) => {
175
176
  if (!u(t))
176
177
  return;
177
- b.has(e) || b.set(e, /* @__PURE__ */ new Map()), b.get(e).set(t, n);
178
+ E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);
178
179
  },
179
180
  /**
180
181
  * Returns all instances for specified component.
@@ -182,7 +183,7 @@ const mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.b
182
183
  * @param component the component's name or a unique key
183
184
  * @returns all the component instances
184
185
  */
185
- getAllFor: (t) => b.get(t) || null,
186
+ getAllFor: (t) => E.get(t) || null,
186
187
  /**
187
188
  * Returns the instance associated with the target.
188
189
  *
@@ -204,7 +205,7 @@ const mn = L, x = /(iPhone|iPod|iPad)/, gn = A ? A.brands.some((t) => x.test(t.b
204
205
  */
205
206
  remove: (t, e) => {
206
207
  const n = O.getAllFor(e);
207
- !n || !u(t) || (n.delete(t), n.size === 0 && b.delete(e));
208
+ !n || !u(t) || (n.delete(t), n.size === 0 && E.delete(e));
208
209
  }
209
210
  }, Bn = (t, e) => O.get(t, e), N = (t) => typeof t == "string" || !1, W = (t) => v(t) && t.constructor.name === "Window" || !1, R = (t) => i(t) && t.nodeType === 9 || !1, d = (t) => W(t) ? t.document : R(t) ? t : i(t) ? t.ownerDocument : window.document, k = (t, ...e) => Object.assign(t, ...e), Zt = (t) => {
210
211
  if (!t)
@@ -406,17 +407,20 @@ T(t), re = (t) => {
406
407
  };
407
408
  };
408
409
  let B = 0, H = 0;
409
- const E = /* @__PURE__ */ new Map(), ae = (t, e) => {
410
+ const b = /* @__PURE__ */ new Map(), ae = (t, e) => {
410
411
  let n = e ? B : H;
411
412
  if (e) {
412
- const o = ae(t), s = E.get(o) || /* @__PURE__ */ new Map();
413
- E.has(o) || E.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), B += 1) : n = s.get(e);
413
+ const o = ae(t), s = b.get(o) || /* @__PURE__ */ new Map();
414
+ b.has(o) || b.set(o, s), I(s) && !s.has(e) ? (s.set(e, n), B += 1) : n = s.get(e);
414
415
  } else {
415
416
  const o = t.id || t;
416
- E.has(o) ? n = E.get(o) : (E.set(o, n), H += 1);
417
+ b.has(o) ? n = b.get(o) : (b.set(o, n), H += 1);
417
418
  }
418
419
  return n;
419
- }, so = (t) => t ? R(t) ? t.defaultView : i(t) ? t?.ownerDocument?.defaultView : t : window, ie = (t) => Array.isArray(t) || !1, co = (t) => i(t) && t.nodeName === "CANVAS" || !1, ue = (t) => u(t) && !!t.shadowRoot || !1, ro = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, ao = (t) => {
420
+ }, so = (t) => {
421
+ var e;
422
+ return t ? R(t) ? t.defaultView : i(t) ? (e = t == null ? void 0 : t.ownerDocument) == null ? void 0 : e.defaultView : t : window;
423
+ }, ie = (t) => Array.isArray(t) || !1, co = (t) => i(t) && t.nodeName === "CANVAS" || !1, ue = (t) => u(t) && !!t.shadowRoot || !1, ro = (t) => i(t) && [1, 2, 3, 4, 5, 6, 7, 8].some((e) => t.nodeType === e) || !1, ao = (t) => {
420
424
  if (!i(t))
421
425
  return !1;
422
426
  const { top: e, bottom: n } = h(t), { clientHeight: o } = T(t);
@@ -438,7 +442,7 @@ const E = /* @__PURE__ */ new Map(), ae = (t, e) => {
438
442
  }, go = (t) => v(t) && t.constructor.name === "WeakMap" || !1, vo = (t) => i(t) && ["SVG", "Image", "Video", "Canvas"].some((e) => t.constructor.name.includes(e)) || !1, Eo = (t) => v(t) && t.constructor.name === "NodeList" || !1, bo = (t) => T(t).dir === "rtl", ho = (t) => i(t) && t.constructor.name.includes("SVG") || !1, yo = (t) => i(t) && ["TABLE", "TD", "TH"].includes(t.nodeName) || !1, le = (t, e) => t ? t.closest(e) || // break out of `ShadowRoot`
439
443
  le(t.getRootNode().host, e) : null, wo = (t, e) => u(t) ? t : (i(e) ? e : d()).querySelector(t), de = (t, e) => (i(e) ? e : d()).getElementsByTagName(t), Ao = (t) => [...de("*", t)].filter(ue), So = (t, e) => d(e).getElementById(t) || null, Mo = (t, e) => (i(e) ? e : d()).querySelectorAll(t), No = (t, e) => (e && i(e) ? e : d()).getElementsByClassName(
440
444
  t
441
- ), ko = (t, e) => t.matches(e), To = "2.0.0alpha12";
445
+ ), ko = (t, e) => t.matches(e), To = "2.0.0alpha14";
442
446
  export {
443
447
  Vn as ArrayFrom,
444
448
  P as DOMContentLoadedEvent,