@leeguoo/pwtk-network-debugger 1.2.49-beta.9 β 1.3.0
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 +40 -21
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/types/ui/panel.d.ts +7 -0
- package/types/ui/panel.d.ts.map +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -17896,6 +17896,9 @@ const _DebugPanel = class _DebugPanel {
|
|
|
17896
17896
|
this.webglBackgroundUpdateTimer = null;
|
|
17897
17897
|
this.boundHandlers = /* @__PURE__ */ new Map();
|
|
17898
17898
|
this.eventListeners = [];
|
|
17899
|
+
this.renderDebounceTimer = null;
|
|
17900
|
+
this.searchDebounceTimer = null;
|
|
17901
|
+
this.pendingRenderRequests = /* @__PURE__ */ new Set();
|
|
17899
17902
|
this.interceptor = interceptor;
|
|
17900
17903
|
const savedConfig = this.loadConfig();
|
|
17901
17904
|
this.config = {
|
|
@@ -17956,7 +17959,7 @@ const _DebugPanel = class _DebugPanel {
|
|
|
17956
17959
|
this.container.style.pointerEvents = "auto";
|
|
17957
17960
|
this.container.innerHTML = `
|
|
17958
17961
|
<div class="debugger-header">
|
|
17959
|
-
<div class="debugger-title">π PWTK θ§£ε―ε°ε·₯ε
· <span style="font-size: 10px; opacity: 0.7;">by Leo v${"1.
|
|
17962
|
+
<div class="debugger-title">π PWTK θ§£ε―ε°ε·₯ε
· <span style="font-size: 10px; opacity: 0.7;">by Leo v${"1.3.0"}</span></div>
|
|
17960
17963
|
<div class="debugger-controls">
|
|
17961
17964
|
<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>
|
|
17962
17965
|
<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>
|
|
@@ -18002,12 +18005,18 @@ const _DebugPanel = class _DebugPanel {
|
|
|
18002
18005
|
searchInput.addEventListener("input", (e2) => {
|
|
18003
18006
|
const query = e2.target.value;
|
|
18004
18007
|
this.searchQuery = query;
|
|
18005
|
-
this.filterRequests();
|
|
18006
18008
|
if (query) {
|
|
18007
18009
|
searchClearBtn.style.display = "block";
|
|
18008
18010
|
} else {
|
|
18009
18011
|
searchClearBtn.style.display = "none";
|
|
18010
18012
|
}
|
|
18013
|
+
if (this.searchDebounceTimer) {
|
|
18014
|
+
clearTimeout(this.searchDebounceTimer);
|
|
18015
|
+
}
|
|
18016
|
+
this.searchDebounceTimer = window.setTimeout(() => {
|
|
18017
|
+
this.filterRequests();
|
|
18018
|
+
this.searchDebounceTimer = null;
|
|
18019
|
+
}, 200);
|
|
18011
18020
|
});
|
|
18012
18021
|
searchClearBtn.addEventListener("click", () => {
|
|
18013
18022
|
searchInput.value = "";
|
|
@@ -18085,7 +18094,19 @@ const _DebugPanel = class _DebugPanel {
|
|
|
18085
18094
|
if (this.requestsCache.length > 100) {
|
|
18086
18095
|
this.requestsCache = this.requestsCache.slice(0, 100);
|
|
18087
18096
|
}
|
|
18088
|
-
this.
|
|
18097
|
+
this.scheduleRender();
|
|
18098
|
+
}
|
|
18099
|
+
/**
|
|
18100
|
+
* ι²ζζΈ²ζ - ιΏε
ι’ηΉηιζ°ζΈ²ζ
|
|
18101
|
+
*/
|
|
18102
|
+
scheduleRender() {
|
|
18103
|
+
if (this.renderDebounceTimer) {
|
|
18104
|
+
clearTimeout(this.renderDebounceTimer);
|
|
18105
|
+
}
|
|
18106
|
+
this.renderDebounceTimer = window.setTimeout(() => {
|
|
18107
|
+
this.renderRequests();
|
|
18108
|
+
this.renderDebounceTimer = null;
|
|
18109
|
+
}, 50);
|
|
18089
18110
|
}
|
|
18090
18111
|
filterRequests() {
|
|
18091
18112
|
if (!this.searchQuery) {
|
|
@@ -18150,25 +18171,15 @@ const _DebugPanel = class _DebugPanel {
|
|
|
18150
18171
|
return;
|
|
18151
18172
|
}
|
|
18152
18173
|
const applyItems = this.config.webgl?.applyToItems ?? false;
|
|
18174
|
+
const fragment = document.createDocumentFragment();
|
|
18153
18175
|
requestsToRender.forEach((request, index) => {
|
|
18154
18176
|
const item = this.createRequestItem(request);
|
|
18155
|
-
|
|
18156
|
-
if (this.webglManager) {
|
|
18157
|
-
|
|
18158
|
-
this.webglManager.disableForElement(layerId);
|
|
18159
|
-
if (applyItems) {
|
|
18160
|
-
requestAnimationFrame(() => {
|
|
18161
|
-
try {
|
|
18162
|
-
this.webglManager.enableForElement(item, layerId);
|
|
18163
|
-
} catch (error) {
|
|
18164
|
-
logger.debug(`Failed to enable WebGL for request item ${index}:`, error);
|
|
18165
|
-
}
|
|
18166
|
-
});
|
|
18167
|
-
} else {
|
|
18168
|
-
item.classList.add("webgl-fallback", "enhanced-css-glass");
|
|
18169
|
-
}
|
|
18177
|
+
fragment.appendChild(item);
|
|
18178
|
+
if (this.webglManager && applyItems) {
|
|
18179
|
+
item.classList.add("webgl-fallback", "enhanced-css-glass");
|
|
18170
18180
|
}
|
|
18171
18181
|
});
|
|
18182
|
+
listContainer.appendChild(fragment);
|
|
18172
18183
|
}
|
|
18173
18184
|
createRequestItem(request) {
|
|
18174
18185
|
const item = document.createElement("div");
|
|
@@ -18792,6 +18803,14 @@ Created by Leo (@leeguoo)`);
|
|
|
18792
18803
|
clearInterval(this.webglBackgroundUpdateTimer);
|
|
18793
18804
|
this.webglBackgroundUpdateTimer = null;
|
|
18794
18805
|
}
|
|
18806
|
+
if (this.renderDebounceTimer) {
|
|
18807
|
+
clearTimeout(this.renderDebounceTimer);
|
|
18808
|
+
this.renderDebounceTimer = null;
|
|
18809
|
+
}
|
|
18810
|
+
if (this.searchDebounceTimer) {
|
|
18811
|
+
clearTimeout(this.searchDebounceTimer);
|
|
18812
|
+
this.searchDebounceTimer = null;
|
|
18813
|
+
}
|
|
18795
18814
|
}
|
|
18796
18815
|
destroy() {
|
|
18797
18816
|
this.removeAllEventListeners();
|
|
@@ -19112,7 +19131,7 @@ class NetworkDebugger {
|
|
|
19112
19131
|
this.initialized = true;
|
|
19113
19132
|
logger.consoleDirect(`
|
|
19114
19133
|
ββββββββββββββββββββββββββββββββββββββββββ
|
|
19115
|
-
β π PWTK θ§£ε―ε°ε·₯ε
· v${"1.
|
|
19134
|
+
β π PWTK θ§£ε―ε°ε·₯ε
· v${"1.3.0"} β
|
|
19116
19135
|
β Created by Leo (@leeguoo) β
|
|
19117
19136
|
β ζζ―ζ―ζ: θ―·θη³» Leo β
|
|
19118
19137
|
β εδΊ«ζε‘: curl.bwg.leeguoo.com β
|
|
@@ -19173,7 +19192,7 @@ class NetworkDebugger {
|
|
|
19173
19192
|
}
|
|
19174
19193
|
async checkForUpdates() {
|
|
19175
19194
|
try {
|
|
19176
|
-
const currentVersion = "1.
|
|
19195
|
+
const currentVersion = "1.3.0";
|
|
19177
19196
|
logger.info(`[PWTK Update] Checking for updates... Current version: ${currentVersion}`);
|
|
19178
19197
|
const response = await fetch("https://registry.npmjs.org/@leeguoo/pwtk-network-debugger/latest");
|
|
19179
19198
|
const data = await response.json();
|
|
@@ -19193,7 +19212,7 @@ class NetworkDebugger {
|
|
|
19193
19212
|
logger.error("[PWTK Update] Failed to check for updates:", error);
|
|
19194
19213
|
return {
|
|
19195
19214
|
hasUpdate: false,
|
|
19196
|
-
currentVersion: "1.
|
|
19215
|
+
currentVersion: "1.3.0"
|
|
19197
19216
|
};
|
|
19198
19217
|
}
|
|
19199
19218
|
}
|