@leeguoo/pwtk-network-debugger 1.2.49-beta.4 → 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.esm.js CHANGED
@@ -7890,26 +7890,9 @@ const styles = `
7890
7890
  backdrop-filter: blur(10px) brightness(1.1);
7891
7891
  -webkit-backdrop-filter: blur(10px) brightness(1.1);
7892
7892
 
7893
- /* 多层背景 - 模拟 Liquid Glass */
7894
- background:
7895
- /* 动态光效层 */
7896
- linear-gradient(
7897
- 105deg,
7898
- transparent 35%,
7899
- rgba(255, 255, 255, 0.25) 45%,
7900
- rgba(255, 255, 255, 0.35) 50%,
7901
- rgba(255, 255, 255, 0.25) 55%,
7902
- transparent 65%
7903
- ),
7904
- /* 基础玻璃层 */
7905
- linear-gradient(
7906
- 135deg,
7907
- rgba(255, 255, 255, 0.8),
7908
- rgba(255, 255, 255, 0.6)
7909
- );
7910
-
7911
- background-size: 300% 100%, 100% 100%;
7912
- border: 1px solid rgba(255, 255, 255, 0.2);
7893
+ /* 背景极简化,避免遮挡文本 */
7894
+ background: rgba(255, 255, 255, 0.35);
7895
+ border: 1px solid rgba(255, 255, 255, 0.28);
7913
7896
  border-radius: 16px;
7914
7897
  padding: 16px;
7915
7898
  cursor: default;
@@ -8060,7 +8043,7 @@ const styles = `
8060
8043
  margin: 0 8px;
8061
8044
  word-break: break-all;
8062
8045
  white-space: normal;
8063
- color: rgba(60, 60, 67, 0.9);
8046
+ color: rgba(20, 20, 33, 0.98);
8064
8047
  font-size: 11px;
8065
8048
  line-height: 1.3;
8066
8049
  }
@@ -8246,7 +8229,7 @@ const styles = `
8246
8229
  }
8247
8230
 
8248
8231
  .headers-table td {
8249
- color: rgba(60, 60, 67, 0.8);
8232
+ color: rgba(20, 20, 33, 0.85);
8250
8233
  }
8251
8234
 
8252
8235
  .decrypted-badge {
@@ -17830,7 +17813,6 @@ const _WebGLManager = class _WebGLManager {
17830
17813
  preset: this.config.preset
17831
17814
  });
17832
17815
  this.scene.startAnimation();
17833
- this.scene.updateBackgrounds();
17834
17816
  console.log(`✨ WebGL liquid glass enabled for element: ${layerId}`);
17835
17817
  return true;
17836
17818
  } catch (error) {
@@ -17946,13 +17928,17 @@ const _DebugPanel = class _DebugPanel {
17946
17928
  webgl: {
17947
17929
  enabled: true,
17948
17930
  quality: "medium",
17949
- preset: "normal"
17931
+ preset: "normal",
17932
+ applyToItems: false
17950
17933
  },
17951
17934
  ...savedConfig,
17952
17935
  // 先应用保存的配置
17953
17936
  ...config
17954
17937
  // 再应用传入的配置(优先级最高)
17955
17938
  };
17939
+ if (this.config.webgl && this.config.webgl.applyToItems === void 0) {
17940
+ this.config.webgl.applyToItems = false;
17941
+ }
17956
17942
  this.createPanel();
17957
17943
  this.bindEvents();
17958
17944
  this.startListening();
@@ -17992,7 +17978,7 @@ const _DebugPanel = class _DebugPanel {
17992
17978
  this.container.style.pointerEvents = "auto";
17993
17979
  this.container.innerHTML = `
17994
17980
  <div class="debugger-header">
17995
- <div class="debugger-title">🔓 PWTK 解密小工具 <span style="font-size: 10px; opacity: 0.7;">by Leo v${"1.2.49-beta.4"}</span></div>
17981
+ <div class="debugger-title">🔓 PWTK 解密小工具 <span style="font-size: 10px; opacity: 0.7;">by Leo v${"1.2.49-beta.6"}</span></div>
17996
17982
  <div class="debugger-controls">
17997
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>
17998
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>
@@ -18182,19 +18168,24 @@ const _DebugPanel = class _DebugPanel {
18182
18168
  listContainer.appendChild(emptyMessage);
18183
18169
  return;
18184
18170
  }
18171
+ const applyItems = this.config.webgl?.applyToItems ?? false;
18185
18172
  requestsToRender.forEach((request, index) => {
18186
18173
  const item = this.createRequestItem(request);
18187
18174
  listContainer.appendChild(item);
18188
18175
  if (this.webglManager) {
18189
18176
  const layerId = `request-item-${index}`;
18190
18177
  this.webglManager.disableForElement(layerId);
18191
- requestAnimationFrame(() => {
18192
- try {
18193
- this.webglManager.enableForElement(item, layerId);
18194
- } catch (error) {
18195
- logger.debug(`Failed to enable WebGL for request item ${index}:`, error);
18196
- }
18197
- });
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
+ }
18198
18189
  }
18199
18190
  });
18200
18191
  }
@@ -18661,7 +18652,7 @@ Created by Leo (@leeguoo)`);
18661
18652
  }
18662
18653
  this.addDragFunctionality(glassButton.element);
18663
18654
  this.reopenButton = glassButton;
18664
- console.log("[PWTK] Glass button created successfully");
18655
+ logger.debug("[PWTK] Glass button created successfully");
18665
18656
  } catch (error) {
18666
18657
  console.error("[PWTK] Failed to create glass button:", error);
18667
18658
  this.createFallbackButton();
@@ -18700,7 +18691,7 @@ Created by Leo (@leeguoo)`);
18700
18691
  btn.onclick = () => this.show();
18701
18692
  this.addDragFunctionality(btn);
18702
18693
  document.body.appendChild(btn);
18703
- console.log("[PWTK] Fallback button created");
18694
+ logger.warn("[PWTK] Fallback button created");
18704
18695
  }
18705
18696
  addDragFunctionality(element) {
18706
18697
  let isDragging = false;
@@ -18804,7 +18795,13 @@ Created by Leo (@leeguoo)`);
18804
18795
  position: this.config.position,
18805
18796
  theme: this.config.theme,
18806
18797
  minimized: this.config.minimized,
18807
- 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
+ }
18808
18805
  };
18809
18806
  localStorage.setItem(_DebugPanel.STORAGE_KEY, JSON.stringify(configToSave));
18810
18807
  logger.debug("配置已保存:", configToSave);
@@ -18921,7 +18918,16 @@ Created by Leo (@leeguoo)`);
18921
18918
  * 更新 WebGL 配置
18922
18919
  */
18923
18920
  updateWebGLConfig(config) {
18924
- if (!this.webglManager) return;
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
+ }
18925
18931
  if (config.quality) {
18926
18932
  this.config.webgl.quality = config.quality;
18927
18933
  this.webglManager.setQuality(config.quality);
@@ -18932,6 +18938,15 @@ Created by Leo (@leeguoo)`);
18932
18938
  this.webglManager.setPreset(config.preset);
18933
18939
  logger.debug(`WebGL preset updated to: ${config.preset}`);
18934
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
+ }
18935
18950
  this.saveConfig();
18936
18951
  }
18937
18952
  /**
@@ -18939,7 +18954,7 @@ Created by Leo (@leeguoo)`);
18939
18954
  */
18940
18955
  toggleWebGL(enabled) {
18941
18956
  if (!this.config.webgl) {
18942
- this.config.webgl = { enabled: true, quality: "medium", preset: "normal" };
18957
+ this.config.webgl = { enabled: true, quality: "medium", preset: "normal", applyToItems: false };
18943
18958
  }
18944
18959
  this.config.webgl.enabled = enabled;
18945
18960
  this.saveConfig();
@@ -19052,7 +19067,7 @@ class NetworkDebugger {
19052
19067
  this.initialized = true;
19053
19068
  logger.consoleDirect(`
19054
19069
  ╔════════════════════════════════════════╗
19055
- ║ 🔓 PWTK 解密小工具 v${"1.2.49-beta.4"} ║
19070
+ ║ 🔓 PWTK 解密小工具 v${"1.2.49-beta.6"} ║
19056
19071
  ║ Created by Leo (@leeguoo) ║
19057
19072
  ║ 技术支持: 请联系 Leo ║
19058
19073
  ║ 分享服务: curl.bwg.leeguoo.com ║
@@ -19113,7 +19128,7 @@ class NetworkDebugger {
19113
19128
  }
19114
19129
  async checkForUpdates() {
19115
19130
  try {
19116
- const currentVersion = "1.2.49-beta.4";
19131
+ const currentVersion = "1.2.49-beta.6";
19117
19132
  logger.info(`[PWTK Update] Checking for updates... Current version: ${currentVersion}`);
19118
19133
  const response = await fetch("https://registry.npmjs.org/@leeguoo/pwtk-network-debugger/latest");
19119
19134
  const data = await response.json();
@@ -19133,7 +19148,7 @@ class NetworkDebugger {
19133
19148
  logger.error("[PWTK Update] Failed to check for updates:", error);
19134
19149
  return {
19135
19150
  hasUpdate: false,
19136
- currentVersion: "1.2.49-beta.4"
19151
+ currentVersion: "1.2.49-beta.6"
19137
19152
  };
19138
19153
  }
19139
19154
  }