@leeguoo/pwtk-network-debugger 1.2.49-beta.5 → 1.2.49-beta.6
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 +48 -16
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/types/ui/panel.d.ts +2 -0
- package/types/ui/panel.d.ts.map +1 -1
- package/types/webgl/manager.d.ts.map +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -17813,7 +17813,6 @@ const _WebGLManager = class _WebGLManager {
|
|
|
17813
17813
|
preset: this.config.preset
|
|
17814
17814
|
});
|
|
17815
17815
|
this.scene.startAnimation();
|
|
17816
|
-
this.scene.updateBackgrounds();
|
|
17817
17816
|
console.log(`✨ WebGL liquid glass enabled for element: ${layerId}`);
|
|
17818
17817
|
return true;
|
|
17819
17818
|
} catch (error) {
|
|
@@ -17929,13 +17928,17 @@ const _DebugPanel = class _DebugPanel {
|
|
|
17929
17928
|
webgl: {
|
|
17930
17929
|
enabled: true,
|
|
17931
17930
|
quality: "medium",
|
|
17932
|
-
preset: "normal"
|
|
17931
|
+
preset: "normal",
|
|
17932
|
+
applyToItems: false
|
|
17933
17933
|
},
|
|
17934
17934
|
...savedConfig,
|
|
17935
17935
|
// 先应用保存的配置
|
|
17936
17936
|
...config
|
|
17937
17937
|
// 再应用传入的配置(优先级最高)
|
|
17938
17938
|
};
|
|
17939
|
+
if (this.config.webgl && this.config.webgl.applyToItems === void 0) {
|
|
17940
|
+
this.config.webgl.applyToItems = false;
|
|
17941
|
+
}
|
|
17939
17942
|
this.createPanel();
|
|
17940
17943
|
this.bindEvents();
|
|
17941
17944
|
this.startListening();
|
|
@@ -17975,7 +17978,7 @@ const _DebugPanel = class _DebugPanel {
|
|
|
17975
17978
|
this.container.style.pointerEvents = "auto";
|
|
17976
17979
|
this.container.innerHTML = `
|
|
17977
17980
|
<div class="debugger-header">
|
|
17978
|
-
<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.6"}</span></div>
|
|
17979
17982
|
<div class="debugger-controls">
|
|
17980
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>
|
|
17981
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>
|
|
@@ -18165,19 +18168,24 @@ const _DebugPanel = class _DebugPanel {
|
|
|
18165
18168
|
listContainer.appendChild(emptyMessage);
|
|
18166
18169
|
return;
|
|
18167
18170
|
}
|
|
18171
|
+
const applyItems = this.config.webgl?.applyToItems ?? false;
|
|
18168
18172
|
requestsToRender.forEach((request, index) => {
|
|
18169
18173
|
const item = this.createRequestItem(request);
|
|
18170
18174
|
listContainer.appendChild(item);
|
|
18171
18175
|
if (this.webglManager) {
|
|
18172
18176
|
const layerId = `request-item-${index}`;
|
|
18173
18177
|
this.webglManager.disableForElement(layerId);
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
|
|
18180
|
-
|
|
18178
|
+
if (applyItems) {
|
|
18179
|
+
requestAnimationFrame(() => {
|
|
18180
|
+
try {
|
|
18181
|
+
this.webglManager.enableForElement(item, layerId);
|
|
18182
|
+
} catch (error) {
|
|
18183
|
+
logger.debug(`Failed to enable WebGL for request item ${index}:`, error);
|
|
18184
|
+
}
|
|
18185
|
+
});
|
|
18186
|
+
} else {
|
|
18187
|
+
item.classList.add("webgl-fallback", "enhanced-css-glass");
|
|
18188
|
+
}
|
|
18181
18189
|
}
|
|
18182
18190
|
});
|
|
18183
18191
|
}
|
|
@@ -18787,7 +18795,13 @@ Created by Leo (@leeguoo)`);
|
|
|
18787
18795
|
position: this.config.position,
|
|
18788
18796
|
theme: this.config.theme,
|
|
18789
18797
|
minimized: this.config.minimized,
|
|
18790
|
-
isClosed: this.config.isClosed
|
|
18798
|
+
isClosed: this.config.isClosed,
|
|
18799
|
+
webgl: {
|
|
18800
|
+
enabled: this.config.webgl?.enabled,
|
|
18801
|
+
quality: this.config.webgl?.quality,
|
|
18802
|
+
preset: this.config.webgl?.preset,
|
|
18803
|
+
applyToItems: this.config.webgl?.applyToItems
|
|
18804
|
+
}
|
|
18791
18805
|
};
|
|
18792
18806
|
localStorage.setItem(_DebugPanel.STORAGE_KEY, JSON.stringify(configToSave));
|
|
18793
18807
|
logger.debug("配置已保存:", configToSave);
|
|
@@ -18904,7 +18918,16 @@ Created by Leo (@leeguoo)`);
|
|
|
18904
18918
|
* 更新 WebGL 配置
|
|
18905
18919
|
*/
|
|
18906
18920
|
updateWebGLConfig(config) {
|
|
18907
|
-
if (!this.
|
|
18921
|
+
if (!this.config.webgl) {
|
|
18922
|
+
this.config.webgl = { enabled: true, quality: "medium", preset: "normal", applyToItems: false };
|
|
18923
|
+
}
|
|
18924
|
+
if (!this.webglManager) {
|
|
18925
|
+
if (config.quality) this.config.webgl.quality = config.quality;
|
|
18926
|
+
if (config.preset) this.config.webgl.preset = config.preset;
|
|
18927
|
+
if (config.applyToItems !== void 0) this.config.webgl.applyToItems = config.applyToItems;
|
|
18928
|
+
this.saveConfig();
|
|
18929
|
+
return;
|
|
18930
|
+
}
|
|
18908
18931
|
if (config.quality) {
|
|
18909
18932
|
this.config.webgl.quality = config.quality;
|
|
18910
18933
|
this.webglManager.setQuality(config.quality);
|
|
@@ -18915,6 +18938,15 @@ Created by Leo (@leeguoo)`);
|
|
|
18915
18938
|
this.webglManager.setPreset(config.preset);
|
|
18916
18939
|
logger.debug(`WebGL preset updated to: ${config.preset}`);
|
|
18917
18940
|
}
|
|
18941
|
+
if (config.applyToItems !== void 0) {
|
|
18942
|
+
this.config.webgl.applyToItems = config.applyToItems;
|
|
18943
|
+
if (!config.applyToItems) {
|
|
18944
|
+
this.requestsCache.forEach((_, index) => {
|
|
18945
|
+
this.webglManager?.disableForElement(`request-item-${index}`);
|
|
18946
|
+
});
|
|
18947
|
+
}
|
|
18948
|
+
this.renderRequests();
|
|
18949
|
+
}
|
|
18918
18950
|
this.saveConfig();
|
|
18919
18951
|
}
|
|
18920
18952
|
/**
|
|
@@ -18922,7 +18954,7 @@ Created by Leo (@leeguoo)`);
|
|
|
18922
18954
|
*/
|
|
18923
18955
|
toggleWebGL(enabled) {
|
|
18924
18956
|
if (!this.config.webgl) {
|
|
18925
|
-
this.config.webgl = { enabled: true, quality: "medium", preset: "normal" };
|
|
18957
|
+
this.config.webgl = { enabled: true, quality: "medium", preset: "normal", applyToItems: false };
|
|
18926
18958
|
}
|
|
18927
18959
|
this.config.webgl.enabled = enabled;
|
|
18928
18960
|
this.saveConfig();
|
|
@@ -19035,7 +19067,7 @@ class NetworkDebugger {
|
|
|
19035
19067
|
this.initialized = true;
|
|
19036
19068
|
logger.consoleDirect(`
|
|
19037
19069
|
╔════════════════════════════════════════╗
|
|
19038
|
-
║ 🔓 PWTK 解密小工具 v${"1.2.49-beta.
|
|
19070
|
+
║ 🔓 PWTK 解密小工具 v${"1.2.49-beta.6"} ║
|
|
19039
19071
|
║ Created by Leo (@leeguoo) ║
|
|
19040
19072
|
║ 技术支持: 请联系 Leo ║
|
|
19041
19073
|
║ 分享服务: curl.bwg.leeguoo.com ║
|
|
@@ -19096,7 +19128,7 @@ class NetworkDebugger {
|
|
|
19096
19128
|
}
|
|
19097
19129
|
async checkForUpdates() {
|
|
19098
19130
|
try {
|
|
19099
|
-
const currentVersion = "1.2.49-beta.
|
|
19131
|
+
const currentVersion = "1.2.49-beta.6";
|
|
19100
19132
|
logger.info(`[PWTK Update] Checking for updates... Current version: ${currentVersion}`);
|
|
19101
19133
|
const response = await fetch("https://registry.npmjs.org/@leeguoo/pwtk-network-debugger/latest");
|
|
19102
19134
|
const data = await response.json();
|
|
@@ -19116,7 +19148,7 @@ class NetworkDebugger {
|
|
|
19116
19148
|
logger.error("[PWTK Update] Failed to check for updates:", error);
|
|
19117
19149
|
return {
|
|
19118
19150
|
hasUpdate: false,
|
|
19119
|
-
currentVersion: "1.2.49-beta.
|
|
19151
|
+
currentVersion: "1.2.49-beta.6"
|
|
19120
19152
|
};
|
|
19121
19153
|
}
|
|
19122
19154
|
}
|