@leeguoo/pwtk-network-debugger 1.2.49-beta.6 β 1.2.49-beta.7
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/index.cjs.js +1 -1
- package/dist/index.esm.js +78 -48
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/types/ui/panel.d.ts.map +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -17978,7 +17978,7 @@ const _DebugPanel = class _DebugPanel {
|
|
|
17978
17978
|
this.container.style.pointerEvents = "auto";
|
|
17979
17979
|
this.container.innerHTML = `
|
|
17980
17980
|
<div class="debugger-header">
|
|
17981
|
-
<div class="debugger-title">π PWTK θ§£ε―ε°ε·₯ε
· <span style="font-size: 10px; opacity: 0.7;">by Leo v${"1.2.49-beta.
|
|
17981
|
+
<div class="debugger-title">π PWTK θ§£ε―ε°ε·₯ε
· <span style="font-size: 10px; opacity: 0.7;">by Leo v${"1.2.49-beta.7"}</span></div>
|
|
17982
17982
|
<div class="debugger-controls">
|
|
17983
17983
|
<button class="debugger-btn" data-action="clear" title="ζΈ
η©Ί"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg></button>
|
|
17984
17984
|
<button class="debugger-btn" data-action="export" title="ε―ΌεΊ"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg></button>
|
|
@@ -18579,15 +18579,26 @@ Created by Leo (@leeguoo)`);
|
|
|
18579
18579
|
this.hostElement.style.display = "none";
|
|
18580
18580
|
this.config.isClosed = true;
|
|
18581
18581
|
this.saveConfig();
|
|
18582
|
-
this.createReopenButton()
|
|
18582
|
+
this.createReopenButton().catch((error) => {
|
|
18583
|
+
console.error("[PWTK] Failed to create reopen button:", error);
|
|
18584
|
+
this.createFallbackButton();
|
|
18585
|
+
});
|
|
18583
18586
|
}
|
|
18584
18587
|
async createReopenButton() {
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18588
|
+
try {
|
|
18589
|
+
this.removeReopenButton();
|
|
18590
|
+
const timeout = new Promise(
|
|
18591
|
+
(_, reject) => setTimeout(() => reject(new Error("Timeout waiting for liquid glass")), 3e3)
|
|
18592
|
+
);
|
|
18593
|
+
await Promise.race([liquidGlassPromise, timeout]);
|
|
18594
|
+
if (typeof window !== "undefined" && window.Button) {
|
|
18595
|
+
this.createGlassButton();
|
|
18596
|
+
} else {
|
|
18597
|
+
console.warn("[PWTK] Button class not available, using fallback");
|
|
18598
|
+
this.createFallbackButton();
|
|
18599
|
+
}
|
|
18600
|
+
} catch (error) {
|
|
18601
|
+
console.warn("[PWTK] Error creating glass button, using fallback:", error);
|
|
18591
18602
|
this.createFallbackButton();
|
|
18592
18603
|
}
|
|
18593
18604
|
}
|
|
@@ -18659,39 +18670,48 @@ Created by Leo (@leeguoo)`);
|
|
|
18659
18670
|
}
|
|
18660
18671
|
}
|
|
18661
18672
|
createFallbackButton() {
|
|
18662
|
-
|
|
18663
|
-
|
|
18664
|
-
|
|
18665
|
-
|
|
18666
|
-
|
|
18667
|
-
|
|
18668
|
-
|
|
18669
|
-
|
|
18670
|
-
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18673
|
+
try {
|
|
18674
|
+
const existingBtn = document.getElementById("network-debugger-reopen-btn");
|
|
18675
|
+
if (existingBtn) {
|
|
18676
|
+
existingBtn.remove();
|
|
18677
|
+
}
|
|
18678
|
+
const btn = document.createElement("button");
|
|
18679
|
+
btn.id = "network-debugger-reopen-btn";
|
|
18680
|
+
btn.innerText = "ζεΌ PWTK";
|
|
18681
|
+
btn.title = "ζεΌθ°θ―ι’ζΏ (ε―ζε¨)";
|
|
18682
|
+
btn.style.cssText = `
|
|
18683
|
+
position: fixed;
|
|
18684
|
+
z-index: 999999;
|
|
18685
|
+
background: rgba(255, 255, 255, 0.1);
|
|
18686
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
18687
|
+
border-radius: 12px;
|
|
18688
|
+
color: white;
|
|
18689
|
+
font-size: 14px;
|
|
18690
|
+
font-weight: 600;
|
|
18691
|
+
padding: 10px 20px;
|
|
18692
|
+
cursor: pointer;
|
|
18693
|
+
backdrop-filter: blur(10px);
|
|
18694
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
18695
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
18696
|
+
`;
|
|
18697
|
+
const pos = this.config.position || "bottom-right";
|
|
18698
|
+
if (pos.includes("bottom")) {
|
|
18699
|
+
btn.style.bottom = "20px";
|
|
18700
|
+
} else {
|
|
18701
|
+
btn.style.top = "20px";
|
|
18702
|
+
}
|
|
18703
|
+
if (pos.includes("right")) {
|
|
18704
|
+
btn.style.right = "20px";
|
|
18705
|
+
} else {
|
|
18706
|
+
btn.style.left = "20px";
|
|
18707
|
+
}
|
|
18708
|
+
btn.onclick = () => this.show();
|
|
18709
|
+
this.addDragFunctionality(btn);
|
|
18710
|
+
document.body.appendChild(btn);
|
|
18711
|
+
logger.debug("[PWTK] Fallback button created successfully");
|
|
18712
|
+
} catch (error) {
|
|
18713
|
+
console.error("[PWTK] Failed to create fallback button:", error);
|
|
18690
18714
|
}
|
|
18691
|
-
btn.onclick = () => this.show();
|
|
18692
|
-
this.addDragFunctionality(btn);
|
|
18693
|
-
document.body.appendChild(btn);
|
|
18694
|
-
logger.warn("[PWTK] Fallback button created");
|
|
18695
18715
|
}
|
|
18696
18716
|
addDragFunctionality(element) {
|
|
18697
18717
|
let isDragging = false;
|
|
@@ -18742,11 +18762,21 @@ Created by Leo (@leeguoo)`);
|
|
|
18742
18762
|
};
|
|
18743
18763
|
}
|
|
18744
18764
|
removeReopenButton() {
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
|
|
18765
|
+
try {
|
|
18766
|
+
const btn = document.getElementById("network-debugger-reopen-btn");
|
|
18767
|
+
if (btn) {
|
|
18768
|
+
btn.remove();
|
|
18769
|
+
logger.debug("[PWTK] Reopen button removed from DOM");
|
|
18770
|
+
}
|
|
18771
|
+
if (this.reopenButton) {
|
|
18772
|
+
if (typeof this.reopenButton.destroy === "function") {
|
|
18773
|
+
this.reopenButton.destroy();
|
|
18774
|
+
}
|
|
18775
|
+
this.reopenButton = null;
|
|
18776
|
+
logger.debug("[PWTK] Reopen button reference cleared");
|
|
18777
|
+
}
|
|
18778
|
+
} catch (error) {
|
|
18779
|
+
console.error("[PWTK] Error removing reopen button:", error);
|
|
18750
18780
|
}
|
|
18751
18781
|
}
|
|
18752
18782
|
destroy() {
|
|
@@ -19067,7 +19097,7 @@ class NetworkDebugger {
|
|
|
19067
19097
|
this.initialized = true;
|
|
19068
19098
|
logger.consoleDirect(`
|
|
19069
19099
|
ββββββββββββββββββββββββββββββββββββββββββ
|
|
19070
|
-
β π PWTK θ§£ε―ε°ε·₯ε
· v${"1.2.49-beta.
|
|
19100
|
+
β π PWTK θ§£ε―ε°ε·₯ε
· v${"1.2.49-beta.7"} β
|
|
19071
19101
|
β Created by Leo (@leeguoo) β
|
|
19072
19102
|
β ζζ―ζ―ζ: θ―·θη³» Leo β
|
|
19073
19103
|
β εδΊ«ζε‘: curl.bwg.leeguoo.com β
|
|
@@ -19128,7 +19158,7 @@ class NetworkDebugger {
|
|
|
19128
19158
|
}
|
|
19129
19159
|
async checkForUpdates() {
|
|
19130
19160
|
try {
|
|
19131
|
-
const currentVersion = "1.2.49-beta.
|
|
19161
|
+
const currentVersion = "1.2.49-beta.7";
|
|
19132
19162
|
logger.info(`[PWTK Update] Checking for updates... Current version: ${currentVersion}`);
|
|
19133
19163
|
const response = await fetch("https://registry.npmjs.org/@leeguoo/pwtk-network-debugger/latest");
|
|
19134
19164
|
const data = await response.json();
|
|
@@ -19148,7 +19178,7 @@ class NetworkDebugger {
|
|
|
19148
19178
|
logger.error("[PWTK Update] Failed to check for updates:", error);
|
|
19149
19179
|
return {
|
|
19150
19180
|
hasUpdate: false,
|
|
19151
|
-
currentVersion: "1.2.49-beta.
|
|
19181
|
+
currentVersion: "1.2.49-beta.7"
|
|
19152
19182
|
};
|
|
19153
19183
|
}
|
|
19154
19184
|
}
|