@leeguoo/pwtk-network-debugger 1.2.49-beta.2 → 1.2.49-beta.3
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/demo/webgl-preview.html +325 -0
- package/dist/button-DfB5OFDC.mjs +542 -0
- package/dist/button-KhTUWDu8.js +1 -0
- package/dist/container-00gbUmcM.js +1 -0
- package/dist/container-DZOQFeJd.mjs +585 -0
- package/dist/index.cjs.js +23 -3
- package/dist/index.esm.js +9886 -502
- package/dist/index.js +23 -3
- package/dist/pwtk-network-debugger.css +1 -0
- package/package.json +10 -3
- package/scripts/serve-demo.mjs +122 -0
- package/types/core/interceptor.d.ts +27 -0
- package/types/core/interceptor.d.ts.map +1 -1
- package/types/core/wasmLoader.d.ts.map +1 -1
- package/types/index.d.ts +30 -0
- package/types/index.d.ts.map +1 -1
- package/types/types.d.ts +5 -1
- package/types/types.d.ts.map +1 -1
- package/types/ui/panel.d.ts +77 -13
- package/types/ui/panel.d.ts.map +1 -1
- package/types/ui/styles.d.ts +1 -1
- package/types/ui/styles.d.ts.map +1 -1
- package/types/utils/curlParser.d.ts.map +1 -1
- package/types/utils/encryption.d.ts.map +1 -1
- package/types/utils/logger.d.ts +35 -0
- package/types/utils/logger.d.ts.map +1 -0
- package/types/utils/share.d.ts +30 -0
- package/types/utils/share.d.ts.map +1 -0
- package/types/webgl/core/renderer.d.ts +66 -0
- package/types/webgl/core/renderer.d.ts.map +1 -0
- package/types/webgl/core/scene.d.ts +65 -0
- package/types/webgl/core/scene.d.ts.map +1 -0
- package/types/webgl/effects/liquid.d.ts +41 -0
- package/types/webgl/effects/liquid.d.ts.map +1 -0
- package/types/webgl/index.d.ts +15 -0
- package/types/webgl/index.d.ts.map +1 -0
- package/types/webgl/manager.d.ts +38 -0
- package/types/webgl/manager.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.glass-container{position:relative;display:flex;align-items:center;justify-content:center;gap:20px;padding:10px;box-sizing:border-box}.glass-container-circle{aspect-ratio:1 / 1;flex-shrink:0;flex-grow:0}.glass-container-pill{flex-shrink:0;flex-grow:0}.glass-button{position:relative;box-shadow:0 25px 50px #00000040;cursor:pointer;pointer-events:auto;flex-shrink:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.glass-button-circle{aspect-ratio:1 / 1;flex-shrink:0;flex-grow:0}.glass-button-text{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:1;pointer-events:none;font-weight:400;color:#fff;font-family:system-ui,-apple-system,sans-serif;white-space:nowrap}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leeguoo/pwtk-network-debugger",
|
|
3
|
-
"version": "1.2.49-beta.
|
|
3
|
+
"version": "1.2.49-beta.3",
|
|
4
4
|
"description": "PWTK 解密小工具 - 网络请求拦截、自动解密、分享功能 (Created by Leo)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
10
|
"types",
|
|
11
|
+
"demo",
|
|
12
|
+
"scripts",
|
|
11
13
|
"README.md",
|
|
12
14
|
"LICENSE"
|
|
13
15
|
],
|
|
@@ -16,7 +18,8 @@
|
|
|
16
18
|
"build": "vite build",
|
|
17
19
|
"build:types": "tsc --declaration --emitDeclarationOnly --outDir types --skipLibCheck",
|
|
18
20
|
"preview": "vite preview",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
21
|
+
"prepublishOnly": "npm run build",
|
|
22
|
+
"demo": "npm run build && node scripts/serve-demo.mjs"
|
|
20
23
|
},
|
|
21
24
|
"keywords": [
|
|
22
25
|
"pwtk",
|
|
@@ -42,11 +45,15 @@
|
|
|
42
45
|
"homepage": "https://github.com/leeguoo/pwtk-network-debugger#readme",
|
|
43
46
|
"dependencies": {
|
|
44
47
|
"crypto-js": "^4.2.0",
|
|
45
|
-
"
|
|
48
|
+
"gl-matrix": "^3.4.3",
|
|
49
|
+
"html2canvas": "^1.4.1",
|
|
50
|
+
"pako": "^2.1.0",
|
|
51
|
+
"three": "^0.161.0"
|
|
46
52
|
},
|
|
47
53
|
"devDependencies": {
|
|
48
54
|
"@types/crypto-js": "^4.2.2",
|
|
49
55
|
"@types/pako": "^2.0.4",
|
|
56
|
+
"@types/three": "^0.161.2",
|
|
50
57
|
"terser": "^5.44.0",
|
|
51
58
|
"typescript": "~5.8.3",
|
|
52
59
|
"vite": "^7.1.2"
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { createServer } from 'node:http'
|
|
2
|
+
import { stat } from 'node:fs/promises'
|
|
3
|
+
import { createReadStream } from 'node:fs'
|
|
4
|
+
import { extname, join, resolve } from 'node:path'
|
|
5
|
+
import { fileURLToPath } from 'node:url'
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
8
|
+
const __dirname = resolve(__filename, '..')
|
|
9
|
+
const pkgRoot = resolve(__dirname, '..')
|
|
10
|
+
let port = parseInt(process.env.PORT || '4173', 10)
|
|
11
|
+
|
|
12
|
+
const mimeTypes = {
|
|
13
|
+
'.html': 'text/html; charset=utf-8',
|
|
14
|
+
'.js': 'application/javascript; charset=utf-8',
|
|
15
|
+
'.mjs': 'application/javascript; charset=utf-8',
|
|
16
|
+
'.css': 'text/css; charset=utf-8',
|
|
17
|
+
'.json': 'application/json; charset=utf-8',
|
|
18
|
+
'.png': 'image/png',
|
|
19
|
+
'.jpg': 'image/jpeg',
|
|
20
|
+
'.jpeg': 'image/jpeg',
|
|
21
|
+
'.gif': 'image/gif',
|
|
22
|
+
'.svg': 'image/svg+xml',
|
|
23
|
+
'.ico': 'image/x-icon',
|
|
24
|
+
'.woff': 'font/woff',
|
|
25
|
+
'.woff2': 'font/woff2'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const defaultFile = '/demo/webgl-preview.html'
|
|
29
|
+
|
|
30
|
+
function sanitizePath(urlPath) {
|
|
31
|
+
const sanitized = urlPath.split('?')[0].split('#')[0]
|
|
32
|
+
return sanitized.replace(/\.\./g, '')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function sendFile(res, filePath) {
|
|
36
|
+
const extension = extname(filePath)
|
|
37
|
+
const contentType = mimeTypes[extension] || 'application/octet-stream'
|
|
38
|
+
res.writeHead(200, { 'Content-Type': contentType })
|
|
39
|
+
createReadStream(filePath).pipe(res)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function handleRequest(req, res) {
|
|
43
|
+
if (!req.url) {
|
|
44
|
+
res.writeHead(400)
|
|
45
|
+
res.end('Bad Request')
|
|
46
|
+
return
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let urlPath = sanitizePath(req.url)
|
|
50
|
+
if (urlPath === '/' || urlPath === '') {
|
|
51
|
+
urlPath = defaultFile
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const filePath = resolve(pkgRoot, `.${urlPath}`)
|
|
55
|
+
|
|
56
|
+
if (!filePath.startsWith(pkgRoot)) {
|
|
57
|
+
res.writeHead(403)
|
|
58
|
+
res.end('Forbidden')
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
try {
|
|
63
|
+
const fileStat = await stat(filePath)
|
|
64
|
+
if (fileStat.isDirectory()) {
|
|
65
|
+
const indexPath = join(filePath, 'index.html')
|
|
66
|
+
await sendFile(res, indexPath)
|
|
67
|
+
return
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
await sendFile(res, filePath)
|
|
71
|
+
} catch (error) {
|
|
72
|
+
if (urlPath !== defaultFile && extname(urlPath) === '') {
|
|
73
|
+
// 尝试作为 HTML 回退
|
|
74
|
+
try {
|
|
75
|
+
await sendFile(res, resolve(pkgRoot, defaultFile))
|
|
76
|
+
return
|
|
77
|
+
} catch {
|
|
78
|
+
// ignore and fall through
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
res.writeHead(404)
|
|
82
|
+
res.end('Not Found')
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
let currentPort = port
|
|
87
|
+
|
|
88
|
+
function startServer() {
|
|
89
|
+
const server = createServer((req, res) => {
|
|
90
|
+
handleRequest(req, res).catch((error) => {
|
|
91
|
+
console.error('[demo-server] Unexpected error:', error)
|
|
92
|
+
res.writeHead(500)
|
|
93
|
+
res.end('Internal Server Error')
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
server.listen(currentPort, () => {
|
|
98
|
+
const url = `http://localhost:${currentPort}${defaultFile}`
|
|
99
|
+
console.log('──────────────────────────────────────────────')
|
|
100
|
+
console.log(' PWTK Network Debugger Demo Server 已启动')
|
|
101
|
+
console.log(` 本地预览地址: ${url}`)
|
|
102
|
+
console.log(' 目标目录: packages/network-debugger')
|
|
103
|
+
console.log(' 按 Ctrl+C 结束服务器')
|
|
104
|
+
console.log('──────────────────────────────────────────────')
|
|
105
|
+
}).on('error', (err) => {
|
|
106
|
+
if (err.code === 'EADDRINUSE') {
|
|
107
|
+
console.log(`Port ${currentPort} is in use, trying next port...`);
|
|
108
|
+
currentPort++;
|
|
109
|
+
// Optionally, set a limit for retries
|
|
110
|
+
if (currentPort > port + 10) {
|
|
111
|
+
console.error('No free ports found within range.');
|
|
112
|
+
process.exit(1);
|
|
113
|
+
}
|
|
114
|
+
startServer(); // Try again with the next port
|
|
115
|
+
} else {
|
|
116
|
+
console.error('[demo-server] Server error:', err);
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
startServer();
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PWTK Network Debugger - 网络拦截器
|
|
3
|
+
* Created by Leo (@leeguoo)
|
|
4
|
+
* 如需技术支持请联系 Leo
|
|
5
|
+
*/
|
|
1
6
|
export interface RequestData {
|
|
2
7
|
id: string;
|
|
3
8
|
url: string;
|
|
@@ -18,17 +23,39 @@ export declare class NetworkInterceptor {
|
|
|
18
23
|
private requests;
|
|
19
24
|
private listeners;
|
|
20
25
|
private decryptConfig;
|
|
26
|
+
private keyCache;
|
|
27
|
+
private readonly KEY_CACHE_TTL;
|
|
21
28
|
constructor();
|
|
22
29
|
enableDecryption(config?: {
|
|
23
30
|
keyExtractor?: (headers: Record<string, string>) => string;
|
|
24
31
|
slkExtractor?: (headers: Record<string, string>) => string;
|
|
32
|
+
autoFetchKeys?: boolean;
|
|
33
|
+
keyApiUrl?: string;
|
|
25
34
|
}): void;
|
|
26
35
|
addListener(listener: (request: RequestData) => void): void;
|
|
27
36
|
removeListener(listener: (request: RequestData) => void): void;
|
|
28
37
|
getRequests(): RequestData[];
|
|
29
38
|
clearRequests(): void;
|
|
39
|
+
/**
|
|
40
|
+
* 检查缓存的密钥是否仍然有效
|
|
41
|
+
*/
|
|
42
|
+
private isKeyCacheValid;
|
|
43
|
+
/**
|
|
44
|
+
* 从缓存获取密钥
|
|
45
|
+
*/
|
|
46
|
+
private getCachedKey;
|
|
47
|
+
/**
|
|
48
|
+
* 缓存密钥
|
|
49
|
+
*/
|
|
50
|
+
private setCachedKey;
|
|
51
|
+
/**
|
|
52
|
+
* 清理过期的缓存
|
|
53
|
+
*/
|
|
54
|
+
private cleanExpiredCache;
|
|
30
55
|
private generateRequestId;
|
|
56
|
+
private isInternalUrl;
|
|
31
57
|
private notifyListeners;
|
|
58
|
+
private extractUrlParams;
|
|
32
59
|
private tryDecrypt;
|
|
33
60
|
private interceptXHR;
|
|
34
61
|
private interceptFetch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../../src/core/interceptor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../../src/core/interceptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM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E;IAI5B,aAAa;IAIpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,OAAO,CAAC,YAAY;IAKpB;;OAEG;IACH,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,gBAAgB;YA2BV,UAAU;IA2JxB,OAAO,CAAC,YAAY;IAgLpB,OAAO,CAAC,cAAc;CAgKvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasmLoader.d.ts","sourceRoot":"","sources":["../../src/core/wasmLoader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wasmLoader.d.ts","sourceRoot":"","sources":["../../src/core/wasmLoader.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAQ;IAEV,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkJzE,OAAO,CAAC,UAAU;IAoBX,QAAQ,IAAI,OAAO;IAInB,SAAS,IAAI,OAAO;IAKpB,kBAAkB,IAAI,OAAO;IAI7B,kBAAkB,IAAI,OAAO;CAGrC"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PWTK 解密小工具
|
|
3
|
+
* Created by Leo (@leeguoo)
|
|
4
|
+
* 如需技术支持请联系 Leo
|
|
5
|
+
* 分享服务: curl.bwg.leeguoo.com
|
|
6
|
+
*/
|
|
1
7
|
import { NetworkInterceptor } from './core/interceptor';
|
|
2
8
|
import { WasmLoader } from './core/wasmLoader';
|
|
3
9
|
import { DebugPanel, PanelConfig } from './ui/panel';
|
|
10
|
+
import './liquid-glass/glass.css';
|
|
11
|
+
export declare const liquidGlassPromise: Promise<void>;
|
|
4
12
|
export interface NetworkDebuggerConfig extends PanelConfig {
|
|
5
13
|
autoStart?: boolean;
|
|
6
14
|
wasm?: {
|
|
@@ -12,12 +20,18 @@ export interface NetworkDebuggerConfig extends PanelConfig {
|
|
|
12
20
|
enabled?: boolean;
|
|
13
21
|
keyExtractor?: (headers: Record<string, string>) => string;
|
|
14
22
|
slkExtractor?: (headers: Record<string, string>) => string;
|
|
23
|
+
autoFetchKeys?: boolean;
|
|
24
|
+
keyApiUrl?: string;
|
|
15
25
|
};
|
|
16
26
|
filter?: {
|
|
17
27
|
urls?: string[];
|
|
18
28
|
ignoreUrls?: string[];
|
|
19
29
|
methods?: string[];
|
|
20
30
|
};
|
|
31
|
+
log?: {
|
|
32
|
+
toBrowserConsole?: boolean;
|
|
33
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
34
|
+
};
|
|
21
35
|
}
|
|
22
36
|
declare class NetworkDebugger {
|
|
23
37
|
private interceptor;
|
|
@@ -34,6 +48,13 @@ declare class NetworkDebugger {
|
|
|
34
48
|
exportData(): any;
|
|
35
49
|
isWasmLoaded(): boolean;
|
|
36
50
|
isInitialized(): boolean;
|
|
51
|
+
checkForUpdates(): Promise<{
|
|
52
|
+
hasUpdate: boolean;
|
|
53
|
+
latestVersion?: string;
|
|
54
|
+
currentVersion: string;
|
|
55
|
+
}>;
|
|
56
|
+
autoUpdate(reloadPage?: boolean): Promise<boolean>;
|
|
57
|
+
private compareVersions;
|
|
37
58
|
static create(config?: NetworkDebuggerConfig): Promise<NetworkDebugger>;
|
|
38
59
|
private createPanel;
|
|
39
60
|
private defaultKeyExtractor;
|
|
@@ -45,6 +66,15 @@ declare const NetworkDebuggerGlobal: {
|
|
|
45
66
|
hide(): void;
|
|
46
67
|
destroy(): void;
|
|
47
68
|
getInstance(): NetworkDebugger | null;
|
|
69
|
+
checkForUpdates(): Promise<{
|
|
70
|
+
hasUpdate: boolean;
|
|
71
|
+
latestVersion?: string;
|
|
72
|
+
currentVersion: string;
|
|
73
|
+
} | {
|
|
74
|
+
hasUpdate: boolean;
|
|
75
|
+
currentVersion: string;
|
|
76
|
+
}>;
|
|
77
|
+
autoUpdate(reloadPage?: boolean): Promise<boolean>;
|
|
48
78
|
};
|
|
49
79
|
export default NetworkDebuggerGlobal;
|
|
50
80
|
export { NetworkDebugger, NetworkInterceptor, DebugPanel, WasmLoader };
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAWpD,OAAO,0BAA0B,CAAA;AAwBjC,eAAO,MAAM,kBAAkB,eAAoB,CAAA;AAKnD,MAAM,WAAW,qBAAsB,SAAQ,WAAW;IAExD,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IAGD,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK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AC,eAAe,CAAC;IAK9E,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,mBAAmB;CAI5B;AAMD,QAAA,MAAM,qBAAqB;kBACL,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;YAgB5D,IAAI;YAIJ,IAAI;eAID,IAAI;mBAQA,eAAe,GAAG,IAAI;;mBA7LgB,OAAO;wBAAkB,MAAM;wBAAkB,MAAM;;;;;sCAqMtE,OAAO,CAAC,OAAO,CAAC;CAGvD,CAAA;AAaD,eAAe,qBAAqB,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,CAAA;AACtE,YAAY,EAAE,WAAW,EAAE,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -26,8 +26,12 @@ export interface PanelConfig {
|
|
|
26
26
|
minimized?: boolean;
|
|
27
27
|
showConsole?: boolean;
|
|
28
28
|
}
|
|
29
|
-
export interface NetworkDebuggerConfig
|
|
29
|
+
export interface NetworkDebuggerConfig {
|
|
30
30
|
autoStart?: boolean;
|
|
31
|
+
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
32
|
+
theme?: 'dark' | 'light';
|
|
33
|
+
minimized?: boolean;
|
|
34
|
+
showConsole?: boolean;
|
|
31
35
|
wasm?: {
|
|
32
36
|
enabled?: boolean;
|
|
33
37
|
wasmUrl?: string;
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,WAAW,CAAC,EAAE,GAAG,CAAA;IACjB,YAAY,CA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KAC3D,CAAA;IACD,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;QACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;QACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KACnB,CAAA;CACF;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB,MAAM,EAAE,qBAAqB,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,eAAe,CAAC,EAAE,GAAG,CAAA;QACrB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;QAC/C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;QAC/C,EAAE,CAAC,EAAE,GAAG,CAAA;KACT;CACF"}
|
package/types/ui/panel.d.ts
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PWTK Network Debugger - 调试面板
|
|
3
|
+
* Created by Leo (@leeguoo)
|
|
4
|
+
* 如需技术支持请联系 Leo
|
|
5
|
+
*/
|
|
1
6
|
import { NetworkInterceptor } from '../core/interceptor';
|
|
2
7
|
export interface PanelConfig {
|
|
3
8
|
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
4
9
|
theme?: 'dark' | 'light';
|
|
5
10
|
minimized?: boolean;
|
|
6
11
|
showConsole?: boolean;
|
|
12
|
+
isClosed?: boolean;
|
|
13
|
+
webgl?: {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
quality?: 'low' | 'medium' | 'high';
|
|
16
|
+
preset?: 'subtle' | 'normal' | 'dramatic' | 'psychedelic' | 'ios26';
|
|
17
|
+
};
|
|
7
18
|
}
|
|
8
19
|
export declare class DebugPanel {
|
|
20
|
+
private hostElement;
|
|
21
|
+
private shadowRoot;
|
|
9
22
|
private container;
|
|
10
23
|
private networkTab;
|
|
11
|
-
private consoleTab;
|
|
12
|
-
private consoleContent;
|
|
13
24
|
private interceptor;
|
|
14
25
|
private config;
|
|
15
26
|
private isDragging;
|
|
16
27
|
private isResizing;
|
|
17
28
|
private dragStart;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
29
|
+
private resizeTimeout;
|
|
30
|
+
private resizeDirection;
|
|
20
31
|
private requestsCache;
|
|
32
|
+
private webglManager;
|
|
33
|
+
private reopenButton;
|
|
34
|
+
private webglBackgroundUpdateTimer;
|
|
35
|
+
private static readonly STORAGE_KEY;
|
|
21
36
|
constructor(interceptor: NetworkInterceptor, config?: PanelConfig);
|
|
37
|
+
private exposeDebugAPI;
|
|
22
38
|
private createPanel;
|
|
23
39
|
private addResizeHandles;
|
|
24
40
|
private bindEvents;
|
|
@@ -30,24 +46,72 @@ export declare class DebugPanel {
|
|
|
30
46
|
private formatData;
|
|
31
47
|
private getStatusClass;
|
|
32
48
|
private truncateUrl;
|
|
33
|
-
private switchTab;
|
|
34
49
|
private clearRequests;
|
|
35
50
|
private exportData;
|
|
36
|
-
private
|
|
51
|
+
private shareRequest;
|
|
52
|
+
private generateApiCurl;
|
|
37
53
|
private toggleFullscreen;
|
|
38
|
-
private handleToolAction;
|
|
39
|
-
private handleParseCurl;
|
|
40
|
-
private exportHAR;
|
|
41
|
-
private handleCorsTest;
|
|
42
|
-
private handleDecryptTest;
|
|
43
|
-
private executeConsoleCommand;
|
|
44
|
-
private logToConsole;
|
|
45
54
|
private startDrag;
|
|
46
55
|
private startResize;
|
|
47
56
|
private handleMouseMove;
|
|
48
57
|
private handleMouseUp;
|
|
58
|
+
private handleWindowResize;
|
|
59
|
+
private adjustPositionForWindowResize;
|
|
49
60
|
show(): void;
|
|
50
61
|
hide(): void;
|
|
62
|
+
private createReopenButton;
|
|
63
|
+
private createGlassButton;
|
|
64
|
+
private createFallbackButton;
|
|
65
|
+
private addDragFunctionality;
|
|
66
|
+
private removeReopenButton;
|
|
51
67
|
destroy(): void;
|
|
68
|
+
/**
|
|
69
|
+
* 日志输出方法 - 供 logger 调用
|
|
70
|
+
*/
|
|
71
|
+
logToConsole(message: string, type?: 'log' | 'warn' | 'error'): void;
|
|
72
|
+
/**
|
|
73
|
+
* 从 localStorage 加载配置
|
|
74
|
+
*/
|
|
75
|
+
private loadConfig;
|
|
76
|
+
/**
|
|
77
|
+
* 保存配置到 localStorage
|
|
78
|
+
*/
|
|
79
|
+
private saveConfig;
|
|
80
|
+
/**
|
|
81
|
+
* 加载保存的位置
|
|
82
|
+
*/
|
|
83
|
+
private loadPosition;
|
|
84
|
+
/**
|
|
85
|
+
* 保存当前位置
|
|
86
|
+
*/
|
|
87
|
+
private savePosition;
|
|
88
|
+
/**
|
|
89
|
+
* 初始化 WebGL 液体玻璃效果
|
|
90
|
+
*/
|
|
91
|
+
private initializeWebGL;
|
|
92
|
+
/**
|
|
93
|
+
* 为请求项启用 WebGL 效果
|
|
94
|
+
*/
|
|
95
|
+
private enableWebGLForRequestItems;
|
|
96
|
+
private scheduleWebGLBackgroundUpdate;
|
|
97
|
+
/**
|
|
98
|
+
* 更新 WebGL 配置
|
|
99
|
+
*/
|
|
100
|
+
updateWebGLConfig(config: {
|
|
101
|
+
quality?: 'low' | 'medium' | 'high';
|
|
102
|
+
preset?: 'subtle' | 'normal' | 'dramatic' | 'psychedelic' | 'ios26';
|
|
103
|
+
}): void;
|
|
104
|
+
/**
|
|
105
|
+
* 切换 WebGL 效果
|
|
106
|
+
*/
|
|
107
|
+
toggleWebGL(enabled: boolean): void;
|
|
108
|
+
/**
|
|
109
|
+
* 获取 WebGL 状态
|
|
110
|
+
*/
|
|
111
|
+
getWebGLStatus(): {
|
|
112
|
+
supported: boolean;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
active: boolean;
|
|
115
|
+
};
|
|
52
116
|
}
|
|
53
117
|
//# sourceMappingURL=panel.d.ts.map
|
package/types/ui/panel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/ui/panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAe,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/ui/panel.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAe,MAAM,qBAAqB,CAAA;AAYrE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAA;IACpE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;QACnC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,OAAO,CAAA;KACpE,CAAA;CACF;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAiB;IACpC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,SAAS,CAAiB;IAClC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;OAEG;IACH,OAAO,CAAC,YAAY;IA6BpB;;OAEG;IACH,OAAO,CAAC,YAAY;IAmBpB;;OAEG;YACW,eAAe;IAsC7B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAalC,OAAO,CAAC,6BAA6B;IAarC;;OAEG;IACI,iBAAiB,CAAC,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,OAAO,CAAA;KAAE;IAmB7I;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,OAAO;IAiBnC;;OAEG;IACI,cAAc,IAAI;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE;CAQnF"}
|
package/types/ui/styles.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const styles = "\n/* NetworkDebugger \u6837\u5F0F */\n#network-debugger-panel {\n position: fixed;\n z-index: 999999;\n background: #1a1a1a;\n color: #ffffff;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 8px;\n overflow: hidden;\n max-width: 90vw;\n max-height: 80vh;\n transition: all 0.3s ease;\n}\n\n#network-debugger-panel.minimized {\n height: 40px !important;\n overflow: hidden;\n}\n\n#network-debugger-panel.bottom-right {\n bottom: 20px;\n right: 20px;\n width: 400px;\n height: 300px;\n}\n\n#network-debugger-panel.bottom-left {\n bottom: 20px;\n left: 20px;\n width: 400px;\n height: 300px;\n}\n\n#network-debugger-panel.top-right {\n top: 20px;\n right: 20px;\n width: 400px;\n height: 300px;\n}\n\n#network-debugger-panel.top-left {\n top: 20px;\n left: 20px;\n width: 400px;\n height: 300px;\n}\n\n#network-debugger-panel.fullscreen {\n top: 0;\n left: 0;\n width: 100vw !important;\n height: 100vh !important;\n border-radius: 0;\n}\n\n.debugger-header {\n background: #333;\n padding: 8px 12px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: move;\n user-select: none;\n border-bottom: 1px solid #444;\n}\n\n.debugger-title {\n font-weight: bold;\n color: #4CAF50;\n font-size: 14px;\n}\n\n.debugger-controls {\n display: flex;\n gap: 8px;\n}\n\n.debugger-btn {\n background: none;\n border: none;\n color: #fff;\n padding: 4px 8px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 12px;\n transition: background-color 0.2s;\n}\n\n.debugger-btn:hover {\n background: #555;\n}\n\n.debugger-btn.active {\n background: #4CAF50;\n color: #000;\n}\n\n.debugger-content {\n height: calc(100% - 40px);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.debugger-tabs {\n display: flex;\n background: #2a2a2a;\n border-bottom: 1px solid #444;\n}\n\n.debugger-tab {\n padding: 8px 16px;\n cursor: pointer;\n border: none;\n background: none;\n color: #ccc;\n font-size: 12px;\n transition: all 0.2s;\n border-bottom: 2px solid transparent;\n}\n\n.debugger-tab:hover {\n color: #fff;\n background: #3a3a3a;\n}\n\n.debugger-tab.active {\n color: #4CAF50;\n border-bottom-color: #4CAF50;\n background: #333;\n}\n\n.debugger-panel-content {\n flex: 1;\n overflow: auto;\n padding: 12px;\n}\n\n.request-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.request-item {\n background: #2a2a2a;\n border: 1px solid #444;\n border-radius: 6px;\n padding: 10px;\n cursor: pointer;\n transition: all 0.2s;\n}\n\n.request-item:hover {\n background: #333;\n border-color: #666;\n}\n\n.request-item.expanded {\n background: #333;\n border-color: #4CAF50;\n}\n\n.request-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.request-method {\n padding: 2px 8px;\n border-radius: 4px;\n font-weight: bold;\n font-size: 10px;\n text-transform: uppercase;\n min-width: 40px;\n text-align: center;\n}\n\n.method-get { background: #4CAF50; color: #000; }\n.method-post { background: #2196F3; color: #fff; }\n.method-put { background: #FF9800; color: #000; }\n.method-delete { background: #F44336; color: #fff; }\n.method-patch { background: #9C27B0; color: #fff; }\n\n.request-url {\n flex: 1;\n margin: 0 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: #fff;\n font-size: 11px;\n}\n\n.request-status {\n padding: 2px 8px;\n border-radius: 4px;\n font-size: 10px;\n min-width: 35px;\n text-align: center;\n}\n\n.status-2xx { background: #4CAF50; color: #000; }\n.status-3xx { background: #FF9800; color: #000; }\n.status-4xx { background: #F44336; color: #fff; }\n.status-5xx { background: #9C27B0; color: #fff; }\n.status-error { background: #F44336; color: #fff; }\n\n.request-info {\n display: flex;\n justify-content: space-between;\n font-size: 10px;\n color: #999;\n}\n\n.request-details {\n margin-top: 12px;\n border-top: 1px solid #444;\n padding-top: 12px;\n display: none;\n}\n\n.request-item.expanded .request-details {\n display: block;\n}\n\n.detail-section {\n margin-bottom: 16px;\n}\n\n.detail-title {\n font-weight: bold;\n color: #4CAF50;\n margin-bottom: 8px;\n font-size: 11px;\n text-transform: uppercase;\n border-bottom: 1px solid #444;\n padding-bottom: 4px;\n}\n\n.detail-content {\n background: #222;\n padding: 8px;\n border-radius: 4px;\n max-height: 200px;\n overflow: auto;\n}\n\n.json-content {\n white-space: pre-wrap;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 11px;\n line-height: 1.4;\n}\n\n.headers-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 10px;\n}\n\n.headers-table th,\n.headers-table td {\n padding: 4px 8px;\n text-align: left;\n border-bottom: 1px solid #444;\n}\n\n.headers-table th {\n background: #333;\n color: #4CAF50;\n font-weight: bold;\n}\n\n.headers-table td {\n color: #ccc;\n}\n\n.decrypted-badge {\n background: #4CAF50;\n color: #000;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 9px;\n margin-left: 8px;\n font-weight: bold;\n}\n\n.error-badge {\n background: #F44336;\n color: #fff;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 9px;\n margin-left: 8px;\n font-weight: bold;\n}\n\n.console-content {\n background: #000;\n color: #0f0;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 11px;\n line-height: 1.4;\n height: 100%;\n overflow: auto;\n padding: 8px;\n}\n\n.console-input {\n display: flex;\n align-items: center;\n background: #333;\n padding: 8px;\n border-top: 1px solid #444;\n}\n\n.console-prompt {\n color: #4CAF50;\n margin-right: 8px;\n font-weight: bold;\n}\n\n.console-cmd {\n flex: 1;\n background: none;\n border: none;\n color: #fff;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 12px;\n outline: none;\n}\n\n.tools-section {\n padding: 12px;\n background: #2a2a2a;\n border-bottom: 1px solid #444;\n}\n\n.tool-buttons {\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.tool-btn {\n padding: 6px 12px;\n background: #4CAF50;\n color: #000;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 11px;\n font-weight: bold;\n transition: background-color 0.2s;\n}\n\n.tool-btn:hover {\n background: #45a049;\n}\n\n.tool-btn:disabled {\n background: #666;\n color: #999;\n cursor: not-allowed;\n}\n\n@media (max-width: 600px) {\n #network-debugger-panel.bottom-right,\n #network-debugger-panel.bottom-left,\n #network-debugger-panel.top-right,\n #network-debugger-panel.top-left {\n width: calc(100vw - 20px) !important;\n left: 10px !important;\n right: auto !important;\n }\n}\n\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n\n::-webkit-scrollbar-track {\n background: #333;\n}\n\n::-webkit-scrollbar-thumb {\n background: #666;\n border-radius: 3px;\n}\n\n::-webkit-scrollbar-thumb:hover {\n background: #888;\n}\n\n.resize-handle {\n position: absolute;\n background: transparent;\n}\n\n.resize-handle.n {\n top: -3px;\n left: 0;\n right: 0;\n height: 6px;\n cursor: ns-resize;\n}\n\n.resize-handle.s {\n bottom: -3px;\n left: 0;\n right: 0;\n height: 6px;\n cursor: ns-resize;\n}\n\n.resize-handle.e {\n top: 0;\n right: -3px;\n bottom: 0;\n width: 6px;\n cursor: ew-resize;\n}\n\n.resize-handle.w {\n top: 0;\n left: -3px;\n bottom: 0;\n width: 6px;\n cursor: ew-resize;\n}\n\n.resize-handle.ne {\n top: -3px;\n right: -3px;\n width: 12px;\n height: 12px;\n cursor: ne-resize;\n}\n\n.resize-handle.nw {\n top: -3px;\n left: -3px;\n width: 12px;\n height: 12px;\n cursor: nw-resize;\n}\n\n.resize-handle.se {\n bottom: -3px;\n right: -3px;\n width: 12px;\n height: 12px;\n cursor: se-resize;\n}\n\n.resize-handle.sw {\n bottom: -3px;\n left: -3px;\n width: 12px;\n height: 12px;\n cursor: sw-resize;\n}\n";
|
|
1
|
+
export declare const styles = "\n/* iOS 26 Liquid Glass NetworkDebugger \u6837\u5F0F */\n:root {\n --liquid-glass-primary: rgba(255, 255, 255, 0.15);\n --liquid-glass-secondary: rgba(255, 255, 255, 0.08);\n --liquid-glass-border: rgba(255, 255, 255, 0.18);\n --liquid-glass-shadow: rgba(31, 38, 135, 0.37);\n --liquid-glass-highlight: rgba(255, 255, 255, 0.25);\n --liquid-glass-dark: rgba(13, 17, 23, 0.75);\n}\n\n#network-debugger-panel {\n position: fixed;\n z-index: 999999;\n \n /* \u5F3A\u5236 GPU \u52A0\u901F\u548C 3D \u53D8\u6362 */\n transform: translate3d(0, 0, 0);\n will-change: transform, backdrop-filter;\n \n /* iOS 26 Liquid Glass \u6838\u5FC3\u6548\u679C - \u589E\u5F3A\u7248 */\n backdrop-filter: blur(25px) saturate(200%) brightness(1.05) !important;\n -webkit-backdrop-filter: blur(25px) saturate(200%) brightness(1.05) !important;\n \n /* iOS \u6D45\u8272\u6BDB\u73BB\u7483\u80CC\u666F */\n background: rgba(245, 245, 247, 0.8);\n background-image: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.5) 0%,\n rgba(255, 255, 255, 0.25) 100%\n );\n \n /* \u73BB\u7483\u8FB9\u6846 */\n border: 1px solid rgba(255, 255, 255, 0.25);\n \n /* \u591A\u5C42\u9634\u5F71\u521B\u5EFA\u6DF1\u5EA6 */\n box-shadow: \n 0 10px 40px rgba(31, 38, 135, 0.4),\n inset 0 2px 4px rgba(255, 255, 255, 0.3),\n inset 0 -2px 4px rgba(0, 0, 0, 0.12);\n \n border-radius: 20px;\n color: #ffffff;\n font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Monaco', 'Menlo', monospace;\n font-size: 12px;\n overflow: hidden;\n max-width: 90vw;\n max-height: 80vh;\n \n /* \u6027\u80FD\u4F18\u5316 */\n transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* \u4E3B\u9762\u677F\u7684\u955C\u9762\u53CD\u5C04\u6548\u679C */\n#network-debugger-panel::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.3) 0%,\n rgba(255, 255, 255, 0.05) 50%,\n transparent 100%\n );\n pointer-events: none;\n z-index: 1;\n}\n\n/* \u955C\u9762\u9AD8\u5149\u6548\u679C */\n#network-debugger-panel::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: radial-gradient(\n circle at 30% 30%,\n rgba(255, 255, 255, 0.2),\n transparent 70%\n );\n pointer-events: none;\n z-index: 1;\n}\n\n#network-debugger-panel.minimized {\n /* iOS \u63A7\u5236\u4E2D\u5FC3\u98CE\u683C\u7684\u5706\u89D2\u77E9\u5F62 */\n height: 48px !important;\n width: 220px !important;\n max-width: 220px !important;\n border-radius: 24px !important;\n overflow: hidden;\n \n /* \u5F3A\u5236 GPU \u52A0\u901F\u548C 3D \u53D8\u6362 */\n transform: translate3d(0, 0, 0) !important;\n will-change: transform, backdrop-filter !important;\n \n /* \u771F\u6B63\u7684 iOS Liquid Glass \u6548\u679C - \u52A0\u5F3A\u7248 */\n background: \n /* \u9876\u90E8\u9AD8\u5149 */\n linear-gradient(180deg, \n rgba(255, 255, 255, 0.5) 0%, \n rgba(255, 255, 255, 0.1) 35%),\n /* \u4E3B\u73BB\u7483\u5C42 */\n radial-gradient(ellipse at top, \n rgba(255, 255, 255, 0.35), \n rgba(255, 255, 255, 0.12)),\n /* iOS \u6D45\u8272\u57FA\u5E95 */\n rgba(245, 245, 247, 0.85) !important;\n \n /* \u589E\u5F3A\u6BDB\u73BB\u7483\u6548\u679C */\n backdrop-filter: blur(40px) saturate(220%) brightness(1.1) !important;\n -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(1.1) !important;\n \n /* iOS \u98CE\u683C\u8FB9\u7F18\u5149\u6548 - \u589E\u5F3A\u7248 */\n box-shadow: \n /* \u5916\u53D1\u5149 */\n 0 0 0 0.5px rgba(255, 255, 255, 0.7) !important,\n /* \u5185\u9634\u5F71\u521B\u5EFA\u73BB\u7483\u539A\u5EA6 */\n inset 0 1px 0 0 rgba(255, 255, 255, 0.7) !important,\n inset 0 -1px 0 0 rgba(0, 0, 0, 0.2) !important,\n /* \u6DF1\u5EA6\u9634\u5F71 */\n 0 15px 40px rgba(0, 0, 0, 0.3) !important,\n 0 4px 10px rgba(0, 0, 0, 0.2) !important;\n \n /* \u5E73\u6ED1\u8FC7\u6E21 */\n transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;\n}\n\n#network-debugger-panel.minimized .debugger-content {\n display: none;\n}\n\n#network-debugger-panel.minimized .resize-handle {\n display: none;\n}\n\n#network-debugger-panel.fullscreen .resize-handle {\n display: none;\n}\n\n#network-debugger-panel.fullscreen {\n backdrop-filter: blur(25px) saturate(200%);\n -webkit-backdrop-filter: blur(25px) saturate(200%);\n}\n\n#network-debugger-panel.bottom-right {\n bottom: 20px;\n right: 20px;\n width: 600px;\n height: 500px;\n}\n\n#network-debugger-panel.bottom-left {\n bottom: 20px;\n left: 20px;\n width: 600px;\n height: 500px;\n}\n\n#network-debugger-panel.top-right {\n top: 20px;\n right: 20px;\n width: 600px;\n height: 500px;\n}\n\n#network-debugger-panel.top-left {\n top: 20px;\n left: 20px;\n width: 600px;\n height: 500px;\n}\n\n#network-debugger-panel.fullscreen {\n top: 0;\n left: 0;\n width: 100vw !important;\n height: 100vh !important;\n border-radius: 0;\n}\n\n.debugger-header {\n /* \u5934\u90E8 Liquid Glass \u6548\u679C */\n backdrop-filter: blur(15px) brightness(1.1);\n -webkit-backdrop-filter: blur(15px) brightness(1.1);\n \n /* \u591A\u5C42\u80CC\u666F\u6548\u679C */\n background: \n /* \u9876\u90E8\u9AD8\u5149 */\n linear-gradient(180deg, \n rgba(255, 255, 255, 0.8) 0%, \n rgba(255, 255, 255, 0.4) 60%),\n /* \u57FA\u7840\u73BB\u7483\u5C42 */\n linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.6),\n rgba(255, 255, 255, 0.4)\n );\n \n border: 1px solid rgba(255, 255, 255, 0.2);\n border-bottom: 1px solid rgba(255, 255, 255, 0.15);\n \n padding: 12px 16px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: move;\n user-select: none;\n position: relative;\n z-index: 2;\n \n /* iOS \u98CE\u683C\u5706\u89D2 */\n border-radius: 20px 20px 0 0;\n \n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.debugger-header:hover {\n backdrop-filter: blur(18px) brightness(1.15);\n -webkit-backdrop-filter: blur(18px) brightness(1.15);\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.15),\n rgba(255, 255, 255, 0.08)\n );\n}\n\n.debugger-title {\n font-weight: 600;\n color: rgba(60, 60, 67, 0.9);\n font-size: 15px;\n text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n\n.debugger-controls {\n display: flex;\n gap: 10px;\n position: relative;\n z-index: 3;\n}\n\n.debugger-btn {\n /* \u6309\u94AE\u6BDB\u73BB\u7483\u6548\u679C\u4F46\u4FDD\u8BC1\u53EF\u89C1\u6027 */\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.7),\n rgba(255, 255, 255, 0.5)\n );\n border: 1px solid rgba(0, 0, 0, 0.08);\n color: rgba(60, 60, 67, 0.9);\n text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n padding: 6px 12px;\n border-radius: 12px;\n cursor: pointer;\n font-size: 11px;\n font-weight: 600;\n \n /* \u6309\u94AE\u9634\u5F71 */\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.1),\n inset 0 1px 0 rgba(255, 255, 255, 0.25);\n \n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n transform: translateZ(0);\n}\n\n.debugger-btn:hover {\n backdrop-filter: blur(12px);\n -webkit-backdrop-filter: blur(12px);\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.2),\n rgba(255, 255, 255, 0.12)\n );\n transform: scale(1.05) translateZ(5px);\n box-shadow: \n 0 4px 16px rgba(0, 0, 0, 0.15),\n inset 0 1px 0 rgba(255, 255, 255, 0.3);\n}\n\n.debugger-btn:active {\n transform: scale(0.98);\n transition: transform 0.1s;\n}\n\n.debugger-btn.active {\n background: linear-gradient(135deg, #007AFF, #5856D6);\n color: #ffffff;\n box-shadow: \n 0 4px 16px rgba(0, 122, 255, 0.25),\n inset 0 1px 0 rgba(255, 255, 255, 0.3);\n backdrop-filter: blur(12px);\n}\n\n.debugger-icon {\n width: 16px;\n height: 16px;\n vertical-align: middle;\n filter: \n brightness(0.8) \n drop-shadow(0 1px 2px rgba(255, 255, 255, 0.8));\n color: rgba(60, 60, 67, 0.8);\n}\n\n.debugger-content {\n height: calc(100% - 60px);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\n/* \u79FB\u9664\u6807\u7B7E\u9875\u76F8\u5173\u6837\u5F0F - \u53EA\u4FDD\u7559\u7F51\u7EDC\u9762\u677F */\n\n.debugger-panel-content {\n flex: 1;\n overflow: auto;\n padding: 12px;\n}\n\n.request-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n position: relative;\n z-index: 2;\n}\n\n.request-item {\n /* \u8BF7\u6C42\u9879\u6BDB\u73BB\u7483\u6548\u679C\u52A0\u52A8\u6001\u5149\u6548 */\n position: relative;\n backdrop-filter: blur(10px) brightness(1.1);\n -webkit-backdrop-filter: blur(10px) brightness(1.1);\n \n /* \u591A\u5C42\u80CC\u666F - \u6A21\u62DF Liquid Glass */\n background: \n /* \u52A8\u6001\u5149\u6548\u5C42 */\n linear-gradient(\n 105deg,\n transparent 35%,\n rgba(255, 255, 255, 0.25) 45%,\n rgba(255, 255, 255, 0.35) 50%,\n rgba(255, 255, 255, 0.25) 55%,\n transparent 65%\n ),\n /* \u57FA\u7840\u73BB\u7483\u5C42 */\n linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.8),\n rgba(255, 255, 255, 0.6)\n );\n \n background-size: 300% 100%, 100% 100%;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 16px;\n padding: 16px;\n cursor: pointer;\n \n /* \u6DF1\u5EA6\u9634\u5F71\u548C\u73BB\u7483\u6548\u679C */\n box-shadow: \n 0 4px 16px rgba(31, 38, 135, 0.2),\n inset 0 1px 2px rgba(255, 255, 255, 0.15),\n inset 0 -1px 1px rgba(0, 0, 0, 0.05);\n \n /* \u6D41\u4F53\u52A8\u753B\u548C\u5149\u6548 */\n transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;\n transform: translateZ(0);\n animation: none;\n}\n\n/* \u6A21\u62DF\u6298\u5C04\u6548\u679C\u7684\u4F2A\u5143\u7D20 */\n.request-item::before {\n content: '';\n position: absolute;\n inset: -1px;\n border-radius: inherit;\n background: radial-gradient(\n circle at var(--mouse-x, 30%) var(--mouse-y, 30%),\n rgba(255, 255, 255, 0.4) 0%,\n rgba(255, 255, 255, 0.1) 30%,\n transparent 70%\n );\n opacity: 0;\n transition: opacity 0.4s ease;\n pointer-events: none;\n mix-blend-mode: overlay;\n z-index: 1;\n}\n\n/* \u9AD8\u5149\u6548\u679C\u4F2A\u5143\u7D20 */\n.request-item::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 40%;\n border-radius: 16px 16px 0 0;\n background: linear-gradient(\n 180deg,\n rgba(255, 255, 255, 0.2) 0%,\n transparent 100%\n );\n pointer-events: none;\n z-index: 1;\n}\n\n.request-item:hover {\n backdrop-filter: blur(15px) brightness(1.2);\n -webkit-backdrop-filter: blur(15px) brightness(1.2);\n \n /* \u589E\u5F3A hover \u65F6\u7684\u5149\u6548 - \u79FB\u9664\u4F1A\u5BFC\u81F4\u6296\u52A8\u7684\u6548\u679C */\n background: \n linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.2),\n rgba(255, 255, 255, 0.12)\n );\n \n /* \u79FB\u9664 transform \u548C animation \u907F\u514D\u6296\u52A8 */\n transition: background 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;\n \n box-shadow: \n 0 8px 24px rgba(31, 38, 135, 0.25),\n inset 0 2px 4px rgba(255, 255, 255, 0.25),\n inset 0 -2px 2px rgba(0, 0, 0, 0.08);\n}\n\n/* \u6FC0\u6D3B\u6298\u5C04\u6548\u679C */\n.request-item:hover::before {\n opacity: 1;\n}\n\n.request-item.expanded {\n backdrop-filter: blur(18px) brightness(1.2);\n -webkit-backdrop-filter: blur(18px) brightness(1.2);\n background: linear-gradient(\n 135deg,\n rgba(0, 122, 255, 0.08),\n rgba(255, 255, 255, 0.05)\n );\n border-color: rgba(0, 122, 255, 0.2);\n box-shadow: \n 0 8px 32px rgba(0, 0, 0, 0.15),\n inset 0 2px 4px rgba(255, 255, 255, 0.15);\n}\n\n.request-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.request-method {\n /* \u65B9\u6CD5\u6807\u7B7E\u6BDB\u73BB\u7483\u6548\u679C */\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n padding: 4px 10px;\n border-radius: 10px;\n font-weight: 600;\n font-size: 10px;\n text-transform: uppercase;\n min-width: 45px;\n text-align: center;\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.1),\n inset 0 1px 0 rgba(255, 255, 255, 0.25);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.method-get { \n background: linear-gradient(135deg, #4CAF50, #45a049);\n color: #ffffff;\n box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);\n}\n.method-post { \n background: linear-gradient(135deg, #2196F3, #1976D2);\n color: #ffffff;\n box-shadow: 0 0 15px rgba(33, 150, 243, 0.4);\n}\n.method-put { \n background: linear-gradient(135deg, #FF9800, #F57C00);\n color: #ffffff;\n box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);\n}\n.method-delete { \n background: linear-gradient(135deg, #F44336, #D32F2F);\n color: #ffffff;\n box-shadow: 0 0 15px rgba(244, 67, 54, 0.4);\n}\n.method-patch { \n background: linear-gradient(135deg, #9C27B0, #7B1FA2);\n color: #ffffff;\n box-shadow: 0 0 15px rgba(156, 39, 176, 0.4);\n}\n\n.request-url {\n flex: 1;\n margin: 0 8px;\n word-break: break-all;\n white-space: normal;\n color: rgba(60, 60, 67, 0.9);\n font-size: 11px;\n line-height: 1.3;\n}\n\n.request-status {\n /* \u72B6\u6001\u7801\u6807\u7B7E\u6BDB\u73BB\u7483\u6548\u679C */\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n padding: 4px 10px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: 600;\n min-width: 40px;\n text-align: center;\n border: 1px solid rgba(255, 255, 255, 0.2);\n box-shadow: \n 0 2px 8px rgba(0, 0, 0, 0.1),\n inset 0 1px 0 rgba(255, 255, 255, 0.25);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.status-2xx { \n background: linear-gradient(135deg, #4CAF50, #45a049);\n color: #ffffff;\n box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);\n}\n.status-3xx { \n background: linear-gradient(135deg, #FF9800, #F57C00);\n color: #ffffff;\n box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);\n}\n.status-4xx { \n background: linear-gradient(135deg, #F44336, #D32F2F);\n color: #ffffff;\n box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);\n}\n.status-5xx { \n background: linear-gradient(135deg, #9C27B0, #7B1FA2);\n color: #ffffff;\n box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);\n}\n.status-error { \n background: linear-gradient(135deg, #F44336, #D32F2F);\n color: #ffffff;\n box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);\n}\n\n.request-info {\n display: flex;\n justify-content: space-between;\n font-size: 10px;\n color: rgba(60, 60, 67, 0.7);\n}\n\n.request-details {\n margin-top: 12px;\n border-top: 1px solid rgba(60, 60, 67, 0.2);\n padding-top: 12px;\n display: none;\n}\n\n/* \u9ED8\u8BA4\u6298\u53E0headers */\n.request-details .detail-section.collapsible {\n /* \u9ED8\u8BA4\u6298\u53E0\u72B6\u6001 */\n}\n\n.request-details .detail-section.collapsible:not(.expanded) .detail-content {\n display: none;\n}\n\n.request-details .detail-section.collapsible:not(.expanded) .collapse-icon {\n transform: rotate(-90deg);\n}\n\n.request-item.expanded .request-details {\n display: block;\n}\n\n.detail-section {\n margin-bottom: 16px;\n}\n\n.detail-title {\n font-weight: bold;\n color: #4CAF50;\n margin-bottom: 8px;\n font-size: 11px;\n text-transform: uppercase;\n border-bottom: 1px solid rgba(60, 60, 67, 0.2);\n padding-bottom: 4px;\n}\n\n.detail-title.highlight {\n color: #FFD700;\n font-size: 12px;\n background: rgba(255, 215, 0, 0.1);\n padding: 6px 8px;\n border-radius: 4px;\n border-bottom: 2px solid #FFD700;\n}\n\n.detail-title.clickable {\n cursor: pointer;\n user-select: none;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.detail-title.clickable:hover {\n background: rgba(76, 175, 80, 0.1);\n}\n\n.collapse-icon {\n display: inline-block;\n transition: transform 0.2s;\n font-size: 10px;\n}\n\n.detail-section.collapsible {\n position: relative;\n}\n\n.detail-section.collapsible.collapsed .detail-content {\n display: none;\n}\n\n.detail-section.collapsible.collapsed .collapse-icon {\n transform: rotate(-90deg);\n}\n\n.detail-content {\n /* \u8BE6\u60C5\u5185\u5BB9\u6BDB\u73BB\u7483\u6548\u679C - \u6D45\u8272\u4E3B\u9898 */\n backdrop-filter: blur(8px) brightness(1.1);\n -webkit-backdrop-filter: blur(8px) brightness(1.1);\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.6),\n rgba(255, 255, 255, 0.4)\n );\n border: 1px solid rgba(60, 60, 67, 0.2);\n padding: 16px;\n border-radius: 12px;\n max-height: 400px;\n min-height: 300px;\n overflow: auto;\n \n /* \u5185\u90E8\u9634\u5F71 */\n box-shadow: \n inset 0 2px 4px rgba(0, 0, 0, 0.05),\n inset 0 -1px 2px rgba(255, 255, 255, 0.15);\n \n /* \u5E73\u6ED1\u6EDA\u52A8 */\n scroll-behavior: smooth;\n}\n\n.json-content {\n white-space: pre-wrap;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 11px;\n line-height: 1.4;\n color: rgba(60, 60, 67, 0.9);\n}\n\n.headers-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 10px;\n}\n\n.headers-table th,\n.headers-table td {\n padding: 4px 8px;\n text-align: left;\n border-bottom: 1px solid rgba(60, 60, 67, 0.2);\n}\n\n.headers-table th {\n background: rgba(255, 255, 255, 0.3);\n color: #4CAF50;\n font-weight: bold;\n}\n\n.headers-table td {\n color: rgba(60, 60, 67, 0.8);\n}\n\n.decrypted-badge {\n background: #4CAF50;\n color: #000;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 9px;\n margin-left: 8px;\n font-weight: bold;\n}\n\n.error-badge {\n background: #F44336;\n color: #fff;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 9px;\n margin-left: 8px;\n font-weight: bold;\n}\n\n.share-btn {\n /* \u5206\u4EAB\u6309\u94AE\u6BDB\u73BB\u7483\u6548\u679C */\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n background: linear-gradient(135deg, #2196F3, #1976D2);\n color: #ffffff;\n border: 1px solid rgba(33, 150, 243, 0.3);\n padding: 6px 12px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: 500;\n margin-left: 8px;\n cursor: pointer;\n white-space: nowrap;\n \n box-shadow: \n 0 2px 8px rgba(33, 150, 243, 0.3),\n inset 0 1px 0 rgba(255, 255, 255, 0.2);\n \n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n transform: translateZ(0);\n}\n\n.share-btn:hover {\n background: linear-gradient(135deg, #1976D2, #1565C0);\n transform: scale(1.05) translateZ(5px);\n box-shadow: \n 0 4px 16px rgba(33, 150, 243, 0.4),\n inset 0 1px 0 rgba(255, 255, 255, 0.3);\n}\n\n.share-btn:active {\n transform: scale(0.98);\n transition: transform 0.1s;\n}\n\n.api-curl-btn {\n /* API Curl \u6309\u94AE\u6BDB\u73BB\u7483\u6548\u679C */\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n background: linear-gradient(135deg, #4CAF50, #45a049);\n color: #ffffff;\n border: 1px solid rgba(76, 175, 80, 0.3);\n padding: 6px 12px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: 500;\n margin-left: 8px;\n cursor: pointer;\n white-space: nowrap;\n \n box-shadow: \n 0 2px 8px rgba(76, 175, 80, 0.3),\n inset 0 1px 0 rgba(255, 255, 255, 0.2);\n \n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n transform: translateZ(0);\n}\n\n.api-curl-btn:hover {\n background: linear-gradient(135deg, #45a049, #388E3C);\n transform: scale(1.05) translateZ(5px);\n box-shadow: \n 0 4px 16px rgba(76, 175, 80, 0.4),\n inset 0 1px 0 rgba(255, 255, 255, 0.3);\n}\n\n.api-curl-btn:active {\n transform: scale(0.98);\n transition: transform 0.1s;\n}\n\n.console-content {\n background: #000;\n color: #0f0;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 11px;\n line-height: 1.4;\n height: 100%;\n overflow: auto;\n padding: 8px;\n}\n\n.console-input {\n display: flex;\n align-items: center;\n background: #333;\n padding: 8px;\n border-top: 1px solid #444;\n}\n\n.console-prompt {\n color: #4CAF50;\n margin-right: 8px;\n font-weight: bold;\n}\n\n.console-cmd {\n flex: 1;\n background: none;\n border: none;\n color: #fff;\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 12px;\n outline: none;\n}\n\n.tools-section {\n padding: 12px;\n background: #2a2a2a;\n border-bottom: 1px solid #444;\n}\n\n.tool-buttons {\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.tool-btn {\n padding: 6px 12px;\n background: #4CAF50;\n color: #000;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 11px;\n font-weight: bold;\n transition: background-color 0.2s;\n}\n\n.tool-btn:hover {\n background: #45a049;\n}\n\n.tool-btn:disabled {\n background: #666;\n color: #999;\n cursor: not-allowed;\n}\n\n/* \u52A8\u6001\u5149\u6548\u52A8\u753B - \u6A21\u62DF Shader \u6548\u679C */\n@keyframes liquid-shimmer {\n 0% {\n background-position: -300% center;\n transform: translateX(-10px);\n }\n 50% {\n transform: translateX(0);\n }\n 100% {\n background-position: 300% center;\n transform: translateX(10px);\n }\n}\n\n@keyframes liquid-refraction {\n 0%, 100% {\n transform: scale(1) perspective(1000px) rotateY(0deg);\n filter: blur(0px);\n }\n 25% {\n transform: scale(1.01) perspective(1000px) rotateY(0.5deg);\n filter: blur(0.5px);\n }\n 75% {\n transform: scale(0.99) perspective(1000px) rotateY(-0.5deg);\n filter: blur(0.3px);\n }\n}\n\n@keyframes liquid-expand {\n 0% { \n opacity: 0;\n transform: scale(0.95) translateY(-10px);\n backdrop-filter: blur(5px);\n }\n 50% { \n opacity: 0.7;\n transform: scale(1.02) translateY(-2px);\n backdrop-filter: blur(12px);\n }\n 100% { \n opacity: 1;\n transform: scale(1) translateY(0);\n backdrop-filter: blur(8px);\n }\n}\n\n@keyframes liquid-glow {\n 0%, 100% { \n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);\n }\n 50% { \n box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);\n }\n}\n\n.expanding {\n animation: liquid-expand 0.4s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.request-item.expanded {\n animation: liquid-glow 2s ease-in-out infinite;\n}\n\n/* \u79FB\u52A8\u7AEF\u54CD\u5E94\u5F0F */\n@media (max-width: 768px) {\n #network-debugger-panel.bottom-right,\n #network-debugger-panel.bottom-left,\n #network-debugger-panel.top-right,\n #network-debugger-panel.top-left {\n width: calc(100vw - 20px) !important;\n left: 10px !important;\n right: auto !important;\n /* \u79FB\u52A8\u7AEF\u6E05\u6670\u6BDB\u73BB\u7483 */\n backdrop-filter: blur(15px) saturate(150%);\n -webkit-backdrop-filter: blur(15px) saturate(150%);\n }\n \n .request-item {\n padding: 12px;\n border-radius: 12px;\n }\n \n .debugger-header {\n padding: 10px 12px;\n }\n \n .debugger-controls {\n gap: 6px;\n }\n \n .debugger-btn {\n padding: 4px 8px;\n font-size: 10px;\n }\n \n /* \u6700\u5C0F\u5316\u65F6\u4E0D\u5E94\u7528\u5168\u5BBD\uFF0C\u4FDD\u6301\u5C0F\u5C3A\u5BF8 */\n #network-debugger-panel.minimized {\n width: 180px !important;\n max-width: 180px !important;\n height: 40px !important;\n }\n}\n\n@media (max-width: 480px) {\n .request-header {\n flex-direction: column;\n gap: 8px;\n align-items: stretch;\n }\n \n .request-method,\n .request-status {\n align-self: flex-start;\n }\n \n .share-btn,\n .api-curl-btn {\n margin-left: 0;\n margin-top: 4px;\n }\n}\n\n/* iOS 26 \u98CE\u683C\u6EDA\u52A8\u6761 */\n#network-debugger-panel ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n#network-debugger-panel ::-webkit-scrollbar-track {\n background: rgba(255, 255, 255, 0.05);\n border-radius: 4px;\n backdrop-filter: blur(5px);\n}\n\n#network-debugger-panel ::-webkit-scrollbar-thumb {\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.2),\n rgba(255, 255, 255, 0.1)\n );\n border-radius: 4px;\n border: 1px solid rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(10px);\n transition: all 0.3s ease;\n}\n\n#network-debugger-panel ::-webkit-scrollbar-thumb:hover {\n background: linear-gradient(\n 135deg,\n rgba(255, 255, 255, 0.3),\n rgba(255, 255, 255, 0.15)\n );\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);\n}\n\n.resize-handle {\n position: absolute;\n background: transparent;\n}\n\n.resize-handle.n {\n top: -3px;\n left: 0;\n right: 0;\n height: 6px;\n cursor: ns-resize;\n}\n\n.resize-handle.s {\n bottom: -3px;\n left: 0;\n right: 0;\n height: 6px;\n cursor: ns-resize;\n}\n\n.resize-handle.e {\n top: 0;\n right: -3px;\n bottom: 0;\n width: 6px;\n cursor: ew-resize;\n}\n\n.resize-handle.w {\n top: 0;\n left: -3px;\n bottom: 0;\n width: 6px;\n cursor: ew-resize;\n}\n\n.resize-handle.ne {\n top: -3px;\n right: -3px;\n width: 12px;\n height: 12px;\n cursor: ne-resize;\n}\n\n.resize-handle.nw {\n top: -3px;\n left: -3px;\n width: 12px;\n height: 12px;\n cursor: nw-resize;\n}\n\n.resize-handle.se {\n bottom: -3px;\n right: -3px;\n width: 12px;\n height: 12px;\n cursor: se-resize;\n}\n\n.resize-handle.sw {\n bottom: -3px;\n left: -3px;\n width: 12px;\n height: 12px;\n cursor: sw-resize;\n}\n\n.debugger-reopen-btn {\n position: fixed;\n z-index: 999999;\n background: #4CAF50;\n color: #000;\n border: none;\n padding: 8px 10px;\n border-radius: 16px;\n font-weight: bold;\n font-size: 12px;\n box-shadow: 0 4px 12px rgba(0,0,0,0.25);\n cursor: pointer;\n}\n\n.debugger-reopen-btn:hover {\n filter: brightness(0.95);\n}\n";
|
|
2
2
|
//# sourceMappingURL=styles.d.ts.map
|
package/types/ui/styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,skyBAwkClB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curlParser.d.ts","sourceRoot":"","sources":["../../src/utils/curlParser.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"curlParser.d.ts","sourceRoot":"","sources":["../../src/utils/curlParser.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CA+DzD;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAE3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../src/utils/encryption.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../src/utils/encryption.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;QAC/C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;KAChD;CACF;AAGD,wBAAgB,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,CAiHnE;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM,CAazC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PWTK Network Debugger - 日志管理器
|
|
3
|
+
* Created by Leo (@leeguoo)
|
|
4
|
+
*
|
|
5
|
+
* 将所有调试日志重定向到调试面板,避免污染浏览器控制台
|
|
6
|
+
*/
|
|
7
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
8
|
+
export type LogType = 'log' | 'warn' | 'error';
|
|
9
|
+
interface LoggerConfig {
|
|
10
|
+
enableBrowserConsole?: boolean;
|
|
11
|
+
logLevel?: LogLevel;
|
|
12
|
+
}
|
|
13
|
+
declare class Logger {
|
|
14
|
+
private panel;
|
|
15
|
+
private enableBrowserConsole;
|
|
16
|
+
private logLevel;
|
|
17
|
+
private buffer;
|
|
18
|
+
private maxBufferSize;
|
|
19
|
+
constructor();
|
|
20
|
+
configure(config: LoggerConfig): void;
|
|
21
|
+
setPanel(panel: any): void;
|
|
22
|
+
private flushBuffer;
|
|
23
|
+
private shouldLog;
|
|
24
|
+
private formatMessage;
|
|
25
|
+
private output;
|
|
26
|
+
debug(message: string, ...args: any[]): void;
|
|
27
|
+
log(message: string, ...args: any[]): void;
|
|
28
|
+
info(message: string, ...args: any[]): void;
|
|
29
|
+
warn(message: string, ...args: any[]): void;
|
|
30
|
+
error(message: string, ...args: any[]): void;
|
|
31
|
+
consoleDirect(message: string, ...args: any[]): void;
|
|
32
|
+
}
|
|
33
|
+
export declare const logger: Logger;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAC1D,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAE9C,UAAU,YAAY;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED,cAAM,MAAM;IACV,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,oBAAoB,CAAQ;IACpC,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,MAAM,CAAiE;IAC/E,OAAO,CAAC,aAAa,CAAM;;IAQ3B,SAAS,CAAC,MAAM,EAAE,YAAY;IAS9B,QAAQ,CAAC,KAAK,EAAE,GAAG;IAMnB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,MAAM;IAkBd,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMrC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMnC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMpC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAMpC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;IAOrC,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE;CAG9C;AAGD,eAAO,MAAM,MAAM,QAAe,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PWTK Network Debugger - 分享功能
|
|
3
|
+
* Created by Leo (@leeguoo)
|
|
4
|
+
* 如需技术支持请联系 Leo
|
|
5
|
+
*/
|
|
6
|
+
import { RequestData } from '../core/interceptor';
|
|
7
|
+
/**
|
|
8
|
+
* 创建分享链接
|
|
9
|
+
* @param requestData 请求数据
|
|
10
|
+
* @returns 分享链接
|
|
11
|
+
*/
|
|
12
|
+
export declare function createShareLink(requestData: RequestData): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* 复制文本到剪贴板
|
|
15
|
+
* @param text 要复制的文本
|
|
16
|
+
*/
|
|
17
|
+
export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* 格式化请求数据为 cURL 命令
|
|
20
|
+
* @param requestData 请求数据
|
|
21
|
+
* @returns cURL 命令字符串
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatAsCurl(requestData: RequestData): string;
|
|
24
|
+
/**
|
|
25
|
+
* 格式化请求数据为 API cURL 命令(针对 httpmisonote.com API)
|
|
26
|
+
* @param requestData 请求数据
|
|
27
|
+
* @returns API cURL 命令字符串
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatAsApiCurl(requestData: RequestData): string;
|
|
30
|
+
//# sourceMappingURL=share.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../src/utils/share.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGjD;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAmF/E;AAWD;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAqBpE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAwB7D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAiGhE"}
|