@leeguoo/pwtk-network-debugger 1.2.28 β 1.2.29
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 +3 -3
- package/dist/index.esm.js +21 -56
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8127,12 +8127,11 @@ const _DebugPanel = class _DebugPanel {
|
|
|
8127
8127
|
this.container.className = `${this.config.position} ${this.config.minimized ? "minimized" : ""}`;
|
|
8128
8128
|
this.container.innerHTML = `
|
|
8129
8129
|
<div class="debugger-header">
|
|
8130
|
-
<div class="debugger-title">π
|
|
8130
|
+
<div class="debugger-title">π PWTK θ§£ε―ε°ε·₯ε
· <span style="font-size: 10px; opacity: 0.7;">by Leo</span></div>
|
|
8131
8131
|
<div class="debugger-controls">
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
<button class="debugger-btn" data-action="
|
|
8135
|
-
${!this.config.minimized ? '<button class="debugger-btn" data-action="fullscreen" title="ε
¨ε±"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg></button>' : ""}
|
|
8132
|
+
<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>
|
|
8133
|
+
<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>
|
|
8134
|
+
<button class="debugger-btn" data-action="fullscreen" title="ε
¨ε±"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg></button>
|
|
8136
8135
|
<button class="debugger-btn" data-action="close" title="ε
³ι"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></button>
|
|
8137
8136
|
</div>
|
|
8138
8137
|
</div>
|
|
@@ -8226,9 +8225,6 @@ const _DebugPanel = class _DebugPanel {
|
|
|
8226
8225
|
case "export":
|
|
8227
8226
|
this.exportData();
|
|
8228
8227
|
break;
|
|
8229
|
-
case "minimize":
|
|
8230
|
-
this.toggleMinimize();
|
|
8231
|
-
break;
|
|
8232
8228
|
case "fullscreen":
|
|
8233
8229
|
this.toggleFullscreen();
|
|
8234
8230
|
break;
|
|
@@ -8513,54 +8509,23 @@ Created by Leo (@leeguoo)`);
|
|
|
8513
8509
|
alert("εδΊ«ε€±θ΄₯οΌθ―·η¨ειθ―");
|
|
8514
8510
|
}
|
|
8515
8511
|
}
|
|
8516
|
-
toggleMinimize() {
|
|
8517
|
-
this.config.minimized = !this.config.minimized;
|
|
8518
|
-
this.container.classList.toggle("minimized", this.config.minimized);
|
|
8519
|
-
const header = this.container.querySelector(".debugger-header");
|
|
8520
|
-
if (header) {
|
|
8521
|
-
header.innerHTML = `
|
|
8522
|
-
<div class="debugger-title">π ${this.config.minimized ? "PWTK" : "PWTK θ§£ε―ε°ε·₯ε
·"} <span style="font-size: 10px; opacity: 0.7;">by Leo</span></div>
|
|
8523
|
-
<div class="debugger-controls">
|
|
8524
|
-
${!this.config.minimized ? '<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>' : ""}
|
|
8525
|
-
${!this.config.minimized ? '<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>' : ""}
|
|
8526
|
-
<button class="debugger-btn" data-action="minimize" title="${this.config.minimized ? "ε±εΌ" : "ζε°ε"}"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="${this.config.minimized ? "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" : "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}"/></svg></button>
|
|
8527
|
-
${!this.config.minimized ? '<button class="debugger-btn" data-action="fullscreen" title="ε
¨ε±"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg></button>' : ""}
|
|
8528
|
-
<button class="debugger-btn" data-action="close" title="ε
³ι"><svg class="debugger-icon" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg></button>
|
|
8529
|
-
</div>
|
|
8530
|
-
`;
|
|
8531
|
-
const controls = header.querySelector(".debugger-controls");
|
|
8532
|
-
controls.addEventListener("click", (e) => {
|
|
8533
|
-
e.stopPropagation();
|
|
8534
|
-
let target = e.target;
|
|
8535
|
-
while (target && target !== controls) {
|
|
8536
|
-
if (target.dataset?.action) break;
|
|
8537
|
-
target = target.parentElement;
|
|
8538
|
-
}
|
|
8539
|
-
const action = target?.dataset?.action;
|
|
8540
|
-
if (!action) return;
|
|
8541
|
-
switch (action) {
|
|
8542
|
-
case "clear":
|
|
8543
|
-
this.clearRequests();
|
|
8544
|
-
break;
|
|
8545
|
-
case "export":
|
|
8546
|
-
this.exportData();
|
|
8547
|
-
break;
|
|
8548
|
-
case "minimize":
|
|
8549
|
-
this.toggleMinimize();
|
|
8550
|
-
break;
|
|
8551
|
-
case "fullscreen":
|
|
8552
|
-
this.toggleFullscreen();
|
|
8553
|
-
break;
|
|
8554
|
-
case "close":
|
|
8555
|
-
this.hide();
|
|
8556
|
-
break;
|
|
8557
|
-
}
|
|
8558
|
-
});
|
|
8559
|
-
}
|
|
8560
|
-
this.saveConfig();
|
|
8561
|
-
}
|
|
8562
8512
|
toggleFullscreen() {
|
|
8563
|
-
this.container.classList.
|
|
8513
|
+
if (this.container.classList.contains("fullscreen")) {
|
|
8514
|
+
this.container.classList.remove("fullscreen");
|
|
8515
|
+
this.container.style.top = "";
|
|
8516
|
+
this.container.style.left = "";
|
|
8517
|
+
this.container.style.width = "";
|
|
8518
|
+
this.container.style.height = "";
|
|
8519
|
+
this.loadPosition();
|
|
8520
|
+
} else {
|
|
8521
|
+
this.container.classList.add("fullscreen");
|
|
8522
|
+
this.container.style.top = "0";
|
|
8523
|
+
this.container.style.left = "0";
|
|
8524
|
+
this.container.style.width = "100vw";
|
|
8525
|
+
this.container.style.height = "100vh";
|
|
8526
|
+
this.container.style.right = "auto";
|
|
8527
|
+
this.container.style.bottom = "auto";
|
|
8528
|
+
}
|
|
8564
8529
|
}
|
|
8565
8530
|
handleToolAction(tool) {
|
|
8566
8531
|
const textarea = this.container.querySelector(".tools-content textarea");
|
|
@@ -9032,7 +8997,7 @@ class NetworkDebugger {
|
|
|
9032
8997
|
this.initialized = true;
|
|
9033
8998
|
logger.consoleDirect(`
|
|
9034
8999
|
ββββββββββββββββββββββββββββββββββββββββββ
|
|
9035
|
-
β π PWTK θ§£ε―ε°ε·₯ε
· v1.2.
|
|
9000
|
+
β π PWTK θ§£ε―ε°ε·₯ε
· v1.2.29 β
|
|
9036
9001
|
β Created by Leo (@leeguoo) β
|
|
9037
9002
|
β ζζ―ζ―ζ: θ―·θη³» Leo β
|
|
9038
9003
|
β εδΊ«ζε‘: curl.bwg.leeguoo.com β
|