@aparte/core 1.1.1 → 1.1.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aparte-launcher.d.ts","sourceRoot":"","sources":["../../../src/components/launcher/aparte-launcher.ts"],"names":[],"mappings":"AAMA,kEAAkE;AAClE,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,mLAAmL;IACnL,KAAK,EAAE,OAAO,CAAC;CAClB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC3C,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,OAAO,CAAkC;IACjD;;;;;;OAMG;IACH,OAAO,CAAC,WAAW,CAAiC;IACpD;;;;;OAKG;IACH,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,SAAS,CAAwB;IAEzC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAS;IAEvB,wBAAwB;IACxB,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,OAAO,EAEtB;IAED,mFAAmF;IACnF,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,iBAAiB,IAAI,IAAI;
|
|
1
|
+
{"version":3,"file":"aparte-launcher.d.ts","sourceRoot":"","sources":["../../../src/components/launcher/aparte-launcher.ts"],"names":[],"mappings":"AAMA,kEAAkE;AAClE,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,mLAAmL;IACnL,KAAK,EAAE,OAAO,CAAC;CAClB;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBAAa,cAAe,SAA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/dist/index.js
CHANGED
|
@@ -10496,11 +10496,15 @@ class AparteLauncher extends HTMLElement {
|
|
|
10496
10496
|
connectedCallback() {
|
|
10497
10497
|
if (!this.classList.contains("aparte-launcher")) this.classList.add("aparte-launcher");
|
|
10498
10498
|
if (!this._button) {
|
|
10499
|
-
|
|
10499
|
+
const drawn = this.querySelector(":scope > button.aparte-launcher__button");
|
|
10500
|
+
this._button = drawn instanceof HTMLButtonElement ? drawn : document.createElement("button");
|
|
10500
10501
|
this._button.type = "button";
|
|
10501
10502
|
this._button.addEventListener("click", this._onButtonClick);
|
|
10502
10503
|
}
|
|
10503
|
-
this.
|
|
10504
|
+
for (const stale of this.querySelectorAll(":scope > .aparte-launcher__button")) {
|
|
10505
|
+
if (stale !== this._button) stale.remove();
|
|
10506
|
+
}
|
|
10507
|
+
if (this._button.parentNode !== this) this.appendChild(this._button);
|
|
10504
10508
|
if (typeof MutationObserver === "function") {
|
|
10505
10509
|
this._childWatch ??= new MutationObserver(() => this._keepButton());
|
|
10506
10510
|
this._childWatch.observe(this, { childList: true });
|