ma-icons 0.3.9 → 0.3.11

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.
@@ -282,7 +282,7 @@ w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[O("elementProper
282
282
  * Copyright 2017 Google LLC
283
283
  * SPDX-License-Identifier: BSD-3-Clause
284
284
  */
285
- const U = globalThis, j = U.trustedTypes, Y = j ? j.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ht = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, at = "?" + m, vt = `<${at}>`, S = document, T = () => S.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, bt = (r) => K(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", B = `[
285
+ const U = globalThis, L = U.trustedTypes, Y = L ? L.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ht = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, at = "?" + m, vt = `<${at}>`, S = document, T = () => S.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, bt = (r) => K(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", B = `[
286
286
  \f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, tt = /-->/g, et = />/g, A = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
287
287
  \f\r"'\`<>=]|("|')|))|$)`, "g"), st = /'/g, it = /"/g, lt = /^(?:script|style|textarea|title)$/i, St = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), E = St(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), rt = /* @__PURE__ */ new WeakMap(), v = S.createTreeWalker(S, 129);
288
288
  function ct(r, t) {
@@ -315,12 +315,12 @@ class N {
315
315
  if (i.nodeType === 1) {
316
316
  if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(ht)) {
317
317
  const f = p[o++], y = i.getAttribute(l).split(m), k = /([.?@])?(.*)/.exec(f);
318
- h.push({ type: 1, index: n, name: k[2], strings: y, ctor: k[1] === "." ? Pt : k[1] === "?" ? Ct : k[1] === "@" ? xt : L }), i.removeAttribute(l);
318
+ h.push({ type: 1, index: n, name: k[2], strings: y, ctor: k[1] === "." ? Pt : k[1] === "?" ? Ct : k[1] === "@" ? xt : j }), i.removeAttribute(l);
319
319
  } else l.startsWith(m) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
320
320
  if (lt.test(i.tagName)) {
321
321
  const l = i.textContent.split(m), f = l.length - 1;
322
322
  if (f > 0) {
323
- i.textContent = j ? j.emptyScript : "";
323
+ i.textContent = L ? L.emptyScript : "";
324
324
  for (let y = 0; y < f; y++) i.append(l[y], T()), v.nextNode(), h.push({ type: 2, index: ++n });
325
325
  i.append(l[f], T());
326
326
  }
@@ -436,7 +436,7 @@ class R {
436
436
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
437
437
  }
438
438
  }
439
- class L {
439
+ class j {
440
440
  get tagName() {
441
441
  return this.element.tagName;
442
442
  }
@@ -461,7 +461,7 @@ class L {
461
461
  t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
462
462
  }
463
463
  }
464
- class Pt extends L {
464
+ class Pt extends j {
465
465
  constructor() {
466
466
  super(...arguments), this.type = 3;
467
467
  }
@@ -469,7 +469,7 @@ class Pt extends L {
469
469
  this.element[this.name] = t === d ? void 0 : t;
470
470
  }
471
471
  }
472
- class Ct extends L {
472
+ class Ct extends j {
473
473
  constructor() {
474
474
  super(...arguments), this.type = 4;
475
475
  }
@@ -477,7 +477,7 @@ class Ct extends L {
477
477
  this.element.toggleAttribute(this.name, !!t && t !== d);
478
478
  }
479
479
  }
480
- class xt extends L {
480
+ class xt extends j {
481
481
  constructor(t, e, s, i, n) {
482
482
  super(t, e, s, i, n), this.type = 5;
483
483
  }
@@ -620,7 +620,7 @@ let u = class extends M {
620
620
  ` : E`${r}`;
621
621
  }
622
622
  async modifySvg() {
623
- const t = await (await fetch("../icons/" + (this.download ? "download" : this.name) + ".svg")).text(), e = new DOMParser().parseFromString(t, "image/svg+xml"), s = e.querySelector("svg");
623
+ const t = await (await fetch(new URL("../icons/" + (this.download ? "download" : this.name) + ".svg"))).text(), e = new DOMParser().parseFromString(t, "image/svg+xml"), s = e.querySelector("svg");
624
624
  if (!s) return "";
625
625
  s == null || s.setAttribute("width", this.size), s == null || s.setAttribute("height", this.size), s == null || s.setAttribute("fill", "none"), e.querySelectorAll("[stroke]").forEach((i) => i.setAttribute("stroke", this.href ? "hsl(0deg 0% 0% / calc(100% * 3/8))" : this.color)), e.querySelectorAll("[stroke-width]").forEach((i) => i.setAttribute("stroke-width", this.weight)), this.svg = s == null ? void 0 : s.outerHTML;
626
626
  }
@@ -679,7 +679,7 @@ $([
679
679
  u = $([
680
680
  Mt("ma-icon")
681
681
  ], u);
682
- const jt = [
682
+ const Lt = [
683
683
  "add-circle",
684
684
  "bottom-left",
685
685
  "bottom-right",
@@ -727,5 +727,5 @@ const jt = [
727
727
  "youtube"
728
728
  ];
729
729
  export {
730
- jt as names
730
+ Lt as names
731
731
  };
@@ -32,7 +32,7 @@ var MaIcons=function(I){"use strict";/**
32
32
  <a download=${this.download} href=${this.href} class="${this.styled?"styled":""}">
33
33
  ${this.leading?w`${r}&thinsp;`:""}<slot></slot>${this.leading?"":w`&thinsp;${r}`}
34
34
  </a>
35
- `:w`${r}`}async modifySvg(){const t=await(await fetch("../icons/"+(this.download?"download":this.name)+".svg")).text(),e=new DOMParser().parseFromString(t,"image/svg+xml"),s=e.querySelector("svg");if(!s)return"";s==null||s.setAttribute("width",this.size),s==null||s.setAttribute("height",this.size),s==null||s.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(i=>i.setAttribute("stroke",this.href?"hsl(0deg 0% 0% / calc(100% * 3/8))":this.color)),e.querySelectorAll("[stroke-width]").forEach(i=>i.setAttribute("stroke-width",this.weight)),this.svg=s==null?void 0:s.outerHTML}};u.styles=ut`
35
+ `:w`${r}`}async modifySvg(){const t=await(await fetch(new URL("../icons/"+(this.download?"download":this.name)+".svg"))).text(),e=new DOMParser().parseFromString(t,"image/svg+xml"),s=e.querySelector("svg");if(!s)return"";s==null||s.setAttribute("width",this.size),s==null||s.setAttribute("height",this.size),s==null||s.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(i=>i.setAttribute("stroke",this.href?"hsl(0deg 0% 0% / calc(100% * 3/8))":this.color)),e.querySelectorAll("[stroke-width]").forEach(i=>i.setAttribute("stroke-width",this.weight)),this.svg=s==null?void 0:s.outerHTML}};u.styles=ut`
36
36
  svg {
37
37
  display: block;
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ma-icons",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "Ma Icons by Taavi Rübenhagen",
5
5
  "type": "module",
6
6
  "main": "dist/ma-icons.iife.js",