diff --git a/package-lock.json b/package-lock.json
index 18726de1..9a2c0fca 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -55,7 +55,6 @@
},
"devDependencies": {
"@douyinfe/vite-plugin-semi": "^2.74.0-alpha.6",
- "@so1ve/prettier-config": "^3.1.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.21",
"eslint": "8.57.0",
@@ -67,7 +66,7 @@
"postcss": "^8.5.3",
"prettier": "^3.0.0",
"tailwindcss": "^3",
- "vite": "5.1.0"
+ "vite": "5.4.21"
},
"engines": {
"node": ">=22.13.0",
@@ -197,13 +196,6 @@
"url": "https://github.com/sponsors/antfu"
}
},
- "node_modules/@astrojs/compiler": {
- "version": "2.13.1",
- "resolved": "https://registry.npmmirror.com/@astrojs/compiler/-/compiler-2.13.1.tgz",
- "integrity": "sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/@babel/code-frame": {
"version": "7.29.7",
"resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.29.7.tgz",
@@ -962,9 +954,9 @@
"license": "MIT"
},
"node_modules/@esbuild/aix-ppc64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz",
- "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
"cpu": [
"ppc64"
],
@@ -979,9 +971,9 @@
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.19.12.tgz",
- "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
+ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
"cpu": [
"arm"
],
@@ -996,9 +988,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz",
- "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
+ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
"cpu": [
"arm64"
],
@@ -1013,9 +1005,9 @@
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.19.12.tgz",
- "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
+ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
"cpu": [
"x64"
],
@@ -1030,9 +1022,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz",
- "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
+ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
"cpu": [
"arm64"
],
@@ -1047,9 +1039,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz",
- "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
+ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
"cpu": [
"x64"
],
@@ -1064,9 +1056,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz",
- "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
+ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
"cpu": [
"arm64"
],
@@ -1081,9 +1073,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz",
- "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
+ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
"cpu": [
"x64"
],
@@ -1098,9 +1090,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz",
- "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
+ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
"cpu": [
"arm"
],
@@ -1115,9 +1107,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz",
- "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
+ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
"cpu": [
"arm64"
],
@@ -1132,9 +1124,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz",
- "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
+ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
"cpu": [
"ia32"
],
@@ -1149,9 +1141,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz",
- "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
+ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
"cpu": [
"loong64"
],
@@ -1166,9 +1158,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz",
- "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
+ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
"cpu": [
"mips64el"
],
@@ -1183,9 +1175,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz",
- "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
+ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
"cpu": [
"ppc64"
],
@@ -1200,9 +1192,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz",
- "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
+ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
"cpu": [
"riscv64"
],
@@ -1217,9 +1209,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz",
- "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
+ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
"cpu": [
"s390x"
],
@@ -1234,9 +1226,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz",
- "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
+ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
"cpu": [
"x64"
],
@@ -1251,9 +1243,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz",
- "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
"cpu": [
"x64"
],
@@ -1268,9 +1260,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz",
- "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
+ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
"cpu": [
"x64"
],
@@ -1285,9 +1277,9 @@
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz",
- "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
+ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
"cpu": [
"x64"
],
@@ -1302,9 +1294,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz",
- "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
+ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
"cpu": [
"arm64"
],
@@ -1319,9 +1311,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz",
- "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
+ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
"cpu": [
"ia32"
],
@@ -1336,9 +1328,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz",
- "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
+ "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
"cpu": [
"x64"
],
@@ -3767,31 +3759,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/@so1ve/prettier-config": {
- "version": "3.26.0",
- "resolved": "https://registry.npmmirror.com/@so1ve/prettier-config/-/prettier-config-3.26.0.tgz",
- "integrity": "sha512-DWiWczVdwbolZy/BKlFqsWWLkxarGAhtcyoS7K2u6BUXBFZg6V+87laCvs/UC/kHiucx/IvZXdf3CQtZfoYxxw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@so1ve/prettier-plugin-toml": "3.26.0",
- "prettier-plugin-astro": "^0.14.1",
- "prettier-plugin-jsdoc": "^1.8.0"
- },
- "peerDependencies": {
- "prettier": "^3.7.4"
- }
- },
- "node_modules/@so1ve/prettier-plugin-toml": {
- "version": "3.26.0",
- "resolved": "https://registry.npmmirror.com/@so1ve/prettier-plugin-toml/-/prettier-plugin-toml-3.26.0.tgz",
- "integrity": "sha512-iFJpSndNdIMnzNKbdXXRqyA2rrLsVqePhX3m+ongWip3BFxmRpfW9pon2FTm7qsZrslu39wQ7wPvIuxbmXZe2g==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "prettier": "^3.7.4"
- }
- },
"node_modules/@splinetool/runtime": {
"version": "0.9.526",
"resolved": "https://registry.npmmirror.com/@splinetool/runtime/-/runtime-0.9.526.tgz",
@@ -6402,13 +6369,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/binary-searching": {
- "version": "2.0.5",
- "resolved": "https://registry.npmmirror.com/binary-searching/-/binary-searching-2.0.5.tgz",
- "integrity": "sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/brace-expansion": {
"version": "1.1.21",
"resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.21.tgz",
@@ -6852,16 +6812,6 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"license": "MIT"
},
- "node_modules/comment-parser": {
- "version": "1.4.9",
- "resolved": "https://registry.npmmirror.com/comment-parser/-/comment-parser-1.4.9.tgz",
- "integrity": "sha512-+2AvZKjJaNq9GQljm3tr0utwrig5BL+jgJGvz5rDpGKNIp+ojcRXWUwBbh/sGIi1QCprR6PsKFakub+w1v+4hQ==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 12.0.0"
- }
- },
"node_modules/compute-scroll-into-view": {
"version": "1.0.20",
"resolved": "https://registry.npmmirror.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz",
@@ -8195,9 +8145,9 @@
}
},
"node_modules/esbuild": {
- "version": "0.19.12",
- "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.19.12.tgz",
- "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==",
+ "version": "0.21.5",
+ "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz",
+ "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -8208,29 +8158,29 @@
"node": ">=12"
},
"optionalDependencies": {
- "@esbuild/aix-ppc64": "0.19.12",
- "@esbuild/android-arm": "0.19.12",
- "@esbuild/android-arm64": "0.19.12",
- "@esbuild/android-x64": "0.19.12",
- "@esbuild/darwin-arm64": "0.19.12",
- "@esbuild/darwin-x64": "0.19.12",
- "@esbuild/freebsd-arm64": "0.19.12",
- "@esbuild/freebsd-x64": "0.19.12",
- "@esbuild/linux-arm": "0.19.12",
- "@esbuild/linux-arm64": "0.19.12",
- "@esbuild/linux-ia32": "0.19.12",
- "@esbuild/linux-loong64": "0.19.12",
- "@esbuild/linux-mips64el": "0.19.12",
- "@esbuild/linux-ppc64": "0.19.12",
- "@esbuild/linux-riscv64": "0.19.12",
- "@esbuild/linux-s390x": "0.19.12",
- "@esbuild/linux-x64": "0.19.12",
- "@esbuild/netbsd-x64": "0.19.12",
- "@esbuild/openbsd-x64": "0.19.12",
- "@esbuild/sunos-x64": "0.19.12",
- "@esbuild/win32-arm64": "0.19.12",
- "@esbuild/win32-ia32": "0.19.12",
- "@esbuild/win32-x64": "0.19.12"
+ "@esbuild/aix-ppc64": "0.21.5",
+ "@esbuild/android-arm": "0.21.5",
+ "@esbuild/android-arm64": "0.21.5",
+ "@esbuild/android-x64": "0.21.5",
+ "@esbuild/darwin-arm64": "0.21.5",
+ "@esbuild/darwin-x64": "0.21.5",
+ "@esbuild/freebsd-arm64": "0.21.5",
+ "@esbuild/freebsd-x64": "0.21.5",
+ "@esbuild/linux-arm": "0.21.5",
+ "@esbuild/linux-arm64": "0.21.5",
+ "@esbuild/linux-ia32": "0.21.5",
+ "@esbuild/linux-loong64": "0.21.5",
+ "@esbuild/linux-mips64el": "0.21.5",
+ "@esbuild/linux-ppc64": "0.21.5",
+ "@esbuild/linux-riscv64": "0.21.5",
+ "@esbuild/linux-s390x": "0.21.5",
+ "@esbuild/linux-x64": "0.21.5",
+ "@esbuild/netbsd-x64": "0.21.5",
+ "@esbuild/openbsd-x64": "0.21.5",
+ "@esbuild/sunos-x64": "0.21.5",
+ "@esbuild/win32-arm64": "0.21.5",
+ "@esbuild/win32-ia32": "0.21.5",
+ "@esbuild/win32-x64": "0.21.5"
}
},
"node_modules/escalade": {
@@ -13635,39 +13585,6 @@
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
- "node_modules/prettier-plugin-astro": {
- "version": "0.14.1",
- "resolved": "https://registry.npmmirror.com/prettier-plugin-astro/-/prettier-plugin-astro-0.14.1.tgz",
- "integrity": "sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "@astrojs/compiler": "^2.9.1",
- "prettier": "^3.0.0",
- "sass-formatter": "^0.7.6"
- },
- "engines": {
- "node": "^14.15.0 || >=16.0.0"
- }
- },
- "node_modules/prettier-plugin-jsdoc": {
- "version": "1.8.1",
- "resolved": "https://registry.npmmirror.com/prettier-plugin-jsdoc/-/prettier-plugin-jsdoc-1.8.1.tgz",
- "integrity": "sha512-XuMqBWTc3b/8eCOe+OlZlFy9Z413a7WOmF4i5hDGtjbtIFOdvRrVtGjXR2Feye3TrLWhkkkHheNXPTyYKxw3nA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "binary-searching": "^2.0.5",
- "comment-parser": "^1.4.0",
- "mdast-util-from-markdown": "^2.0.0"
- },
- "engines": {
- "node": ">=14.13.1 || >=16.0.0"
- },
- "peerDependencies": {
- "prettier": "^3.0.0"
- }
- },
"node_modules/pretty-ms": {
"version": "9.3.1",
"resolved": "https://registry.npmmirror.com/pretty-ms/-/pretty-ms-9.3.1.tgz",
@@ -15616,13 +15533,6 @@
"integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",
"license": "BSD-3-Clause"
},
- "node_modules/s.color": {
- "version": "0.0.15",
- "resolved": "https://registry.npmmirror.com/s.color/-/s.color-0.0.15.tgz",
- "integrity": "sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/safe-array-concat": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/safe-array-concat/-/safe-array-concat-1.1.4.tgz",
@@ -15739,16 +15649,6 @@
"@parcel/watcher": "^2.4.1"
}
},
- "node_modules/sass-formatter": {
- "version": "0.7.9",
- "resolved": "https://registry.npmmirror.com/sass-formatter/-/sass-formatter-0.7.9.tgz",
- "integrity": "sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "suf-log": "^2.5.3"
- }
- },
"node_modules/sax": {
"version": "1.6.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.6.1.tgz",
@@ -16511,16 +16411,6 @@
"node": ">= 6"
}
},
- "node_modules/suf-log": {
- "version": "2.5.3",
- "resolved": "https://registry.npmmirror.com/suf-log/-/suf-log-2.5.3.tgz",
- "integrity": "sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "s.color": "0.0.15"
- }
- },
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
@@ -17347,15 +17237,15 @@
}
},
"node_modules/vite": {
- "version": "5.1.0",
- "resolved": "https://registry.npmmirror.com/vite/-/vite-5.1.0.tgz",
- "integrity": "sha512-STmSFzhY4ljuhz14bg9LkMTk3d98IO6DIArnTY6MeBwiD1Za2StcQtz7fzOUnRCqrHSD5+OS2reg4HOz1eoLnw==",
+ "version": "5.4.21",
+ "resolved": "https://registry.npmmirror.com/vite/-/vite-5.4.21.tgz",
+ "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "esbuild": "^0.19.3",
- "postcss": "^8.4.35",
- "rollup": "^4.2.0"
+ "esbuild": "^0.21.3",
+ "postcss": "^8.4.43",
+ "rollup": "^4.20.0"
},
"bin": {
"vite": "bin/vite.js"
@@ -17374,6 +17264,7 @@
"less": "*",
"lightningcss": "^1.21.0",
"sass": "*",
+ "sass-embedded": "*",
"stylus": "*",
"sugarss": "*",
"terser": "^5.4.0"
@@ -17391,6 +17282,9 @@
"sass": {
"optional": true
},
+ "sass-embedded": {
+ "optional": true
+ },
"stylus": {
"optional": true
},
diff --git a/package.json b/package.json
index 428d7122..e8c3da83 100644
--- a/package.json
+++ b/package.json
@@ -78,7 +78,6 @@
},
"devDependencies": {
"@douyinfe/vite-plugin-semi": "^2.74.0-alpha.6",
- "@so1ve/prettier-config": "^3.1.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.21",
"eslint": "8.57.0",
@@ -90,12 +89,17 @@
"postcss": "^8.5.3",
"prettier": "^3.0.0",
"tailwindcss": "^3",
- "vite": "5.1.0"
+ "vite": "5.4.21"
},
"proxy": "http://localhost:3000",
"engines": {
"node": ">=22.13.0",
"npm": ">=10"
},
- "packageManager": "npm@10.9.9"
+ "packageManager": "npm@10.9.9",
+ "overrides": {
+ "@douyinfe/vite-plugin-semi": {
+ "vite": "$vite"
+ }
+ }
}
diff --git a/src/components/common/LobeHubIcon.jsx b/src/components/common/LobeHubIcon.jsx
new file mode 100644
index 00000000..849ce7c1
--- /dev/null
+++ b/src/components/common/LobeHubIcon.jsx
@@ -0,0 +1,164 @@
+/*
+Copyright (C) 2025 QuantumNous
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .
+
+For commercial licensing, please contact support@quantumnous.com
+*/
+
+import React from 'react';
+import { Avatar } from '@douyinfe/semi-ui';
+import { Bot as FastGPT, Image as Jimeng } from 'lucide-react';
+import OpenAI from '@lobehub/icons/es/OpenAI';
+import Claude from '@lobehub/icons/es/Claude';
+import Gemini from '@lobehub/icons/es/Gemini';
+import Moonshot from '@lobehub/icons/es/Moonshot';
+import Zhipu from '@lobehub/icons/es/Zhipu';
+import Qwen from '@lobehub/icons/es/Qwen';
+import DeepSeek from '@lobehub/icons/es/DeepSeek';
+import Minimax from '@lobehub/icons/es/Minimax';
+import Wenxin from '@lobehub/icons/es/Wenxin';
+import Spark from '@lobehub/icons/es/Spark';
+import Midjourney from '@lobehub/icons/es/Midjourney';
+import Hunyuan from '@lobehub/icons/es/Hunyuan';
+import Cohere from '@lobehub/icons/es/Cohere';
+import Cloudflare from '@lobehub/icons/es/Cloudflare';
+import Ai360 from '@lobehub/icons/es/Ai360';
+import Yi from '@lobehub/icons/es/Yi';
+import Jina from '@lobehub/icons/es/Jina';
+import Mistral from '@lobehub/icons/es/Mistral';
+import XAI from '@lobehub/icons/es/XAI';
+import Ollama from '@lobehub/icons/es/Ollama';
+import Doubao from '@lobehub/icons/es/Doubao';
+import Suno from '@lobehub/icons/es/Suno';
+import Xinference from '@lobehub/icons/es/Xinference';
+import OpenRouter from '@lobehub/icons/es/OpenRouter';
+import Dify from '@lobehub/icons/es/Dify';
+import Coze from '@lobehub/icons/es/Coze';
+import SiliconCloud from '@lobehub/icons/es/SiliconCloud';
+import Kling from '@lobehub/icons/es/Kling';
+import Perplexity from '@lobehub/icons/es/Perplexity';
+import Replicate from '@lobehub/icons/es/Replicate';
+
+const LobeIconsMap = {
+ OpenAI,
+ Claude,
+ Gemini,
+ Moonshot,
+ Zhipu,
+ Qwen,
+ DeepSeek,
+ Minimax,
+ Wenxin,
+ Spark,
+ Midjourney,
+ Hunyuan,
+ Cohere,
+ Cloudflare,
+ Ai360,
+ Yi,
+ Jina,
+ Mistral,
+ XAI,
+ Ollama,
+ Doubao,
+ Suno,
+ Xinference,
+ OpenRouter,
+ Dify,
+ Coze,
+ SiliconCloud,
+ FastGPT,
+ Kling,
+ Jimeng,
+ Perplexity,
+ Replicate,
+};
+
+export default function LobeHubIcon({ iconName, size = 14 }) {
+ if (typeof iconName === 'string') iconName = iconName.trim();
+ // 如果没有图标名称,返回 Avatar
+ if (!iconName) {
+ return ?;
+ }
+
+ // 解析组件路径与点号链式属性
+ const segments = String(iconName).split('.');
+ const baseKey = segments[0];
+ const BaseIcon = LobeIconsMap[baseKey];
+
+ let IconComponent = undefined;
+ let propStartIndex = 1;
+
+ if (BaseIcon && segments.length > 1 && BaseIcon[segments[1]]) {
+ IconComponent = BaseIcon[segments[1]];
+ propStartIndex = 2;
+ } else {
+ IconComponent = LobeIconsMap[baseKey];
+ propStartIndex = 1;
+ }
+
+ // 失败兜底
+ if (
+ !IconComponent ||
+ (typeof IconComponent !== 'function' && typeof IconComponent !== 'object')
+ ) {
+ const firstLetter = String(iconName).charAt(0).toUpperCase();
+ return {firstLetter};
+ }
+
+ // 解析点号链式属性,形如:key={...}、key='...'、key="..."、key=123、key、key=true/false
+ const props = {};
+
+ const parseValue = (raw) => {
+ if (raw == null) return true;
+ let v = String(raw).trim();
+ // 去除一层花括号包裹
+ if (v.startsWith('{') && v.endsWith('}')) {
+ v = v.slice(1, -1).trim();
+ }
+ // 去除引号
+ if (
+ (v.startsWith('"') && v.endsWith('"')) ||
+ (v.startsWith("'") && v.endsWith("'"))
+ ) {
+ return v.slice(1, -1);
+ }
+ // 布尔
+ if (v === 'true') return true;
+ if (v === 'false') return false;
+ // 数字
+ if (/^-?\d+(?:\.\d+)?$/.test(v)) return Number(v);
+ // 其他原样返回字符串
+ return v;
+ };
+
+ for (let i = propStartIndex; i < segments.length; i++) {
+ const seg = segments[i];
+ if (!seg) continue;
+ const eqIdx = seg.indexOf('=');
+ if (eqIdx === -1) {
+ props[seg.trim()] = true;
+ continue;
+ }
+ const key = seg.slice(0, eqIdx).trim();
+ const valRaw = seg.slice(eqIdx + 1).trim();
+ props[key] = parseValue(valRaw);
+ }
+
+ // 兼容第二参数 size,若字符串中未显式指定 size,则使用函数入参
+ if (props.size == null && size != null) props.size = size;
+
+ return ;
+}
diff --git a/src/components/common/LobeHubIcon.test.js b/src/components/common/LobeHubIcon.test.js
new file mode 100644
index 00000000..ebb633e1
--- /dev/null
+++ b/src/components/common/LobeHubIcon.test.js
@@ -0,0 +1,85 @@
+/*
+Copyright (C) 2025 QuantumNous
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .
+
+For commercial licensing, please contact support@quantumnous.com
+*/
+
+import assert from 'node:assert/strict';
+import { readFile } from 'node:fs/promises';
+import { runInNewContext } from 'node:vm';
+import test from 'node:test';
+import React from 'react';
+import { transformWithEsbuild } from 'vite';
+
+const filename = new URL('./LobeHubIcon.jsx', import.meta.url);
+const { code } = await transformWithEsbuild(
+ await readFile(filename, 'utf8'),
+ filename.pathname,
+ { loader: 'jsx', format: 'cjs', jsx: 'transform', target: 'node22' },
+);
+const Mono = () => null;
+const Color = () => null;
+const Avatar = () => null;
+const module = { exports: {} };
+runInNewContext(code, {
+ module,
+ exports: module.exports,
+ require(name) {
+ if (name === 'react') return React;
+ if (name === '@douyinfe/semi-ui') return { Avatar: 'avatar' };
+ if (name === 'lucide-react') return { Bot: Mono, Image: Mono };
+ assert.ok(name.startsWith('@lobehub/icons/es/'), name);
+ return Object.assign(Mono, { Color, Avatar });
+ },
+});
+const render = module.exports.default;
+
+test('brand icon keeps the selected variant and configured props', () => {
+ const icon = render({
+ iconName: "OpenAI.Avatar.type={'platform'}.shape='square'.size=24",
+ size: 14,
+ });
+ assert.equal(icon.type, Avatar);
+ assert.equal(icon.props.type, 'platform');
+ assert.equal(icon.props.shape, 'square');
+ assert.equal(icon.props.size, 24);
+});
+
+test('brand icon preserves color and default size', () => {
+ const icon = render({ iconName: 'Claude.Color' });
+ assert.equal(icon.type, Color);
+ assert.equal(icon.props.size, 14);
+});
+
+test('empty and unknown brand names preserve the fallback avatar', () => {
+ for (const [iconName, letter] of [
+ [null, '?'],
+ ['', '?'],
+ ['UnknownBrand', 'U'],
+ ]) {
+ const icon = render({ iconName });
+ assert.equal(icon.type, 'avatar');
+ assert.equal(icon.props.children, letter);
+ }
+});
+
+test('base icons and lucide compatibility brands remain supported', () => {
+ for (const iconName of ['OpenAI', 'FastGPT', 'Jimeng']) {
+ const icon = render({ iconName, size: 20 });
+ assert.equal(icon.type, Mono);
+ assert.equal(icon.props.size, 20);
+ }
+});
diff --git a/src/components/layout/PageLayout.jsx b/src/components/layout/PageLayout.jsx
index 160587fc..ddcd375b 100644
--- a/src/components/layout/PageLayout.jsx
+++ b/src/components/layout/PageLayout.jsx
@@ -17,9 +17,7 @@ along with this program. If not, see .
For commercial licensing, please contact support@quantumnous.com
*/
-import HeaderBar from './headerbar';
import { Layout } from '@douyinfe/semi-ui';
-import SiderBar from './SiderBar';
import App from '../../App';
import { ToastContainer } from 'react-toastify';
import React, {
@@ -49,7 +47,11 @@ import { useLocation } from 'react-router-dom';
import { applyTheme, setPresetOverrides } from '../../helpers/theme';
// 用户问卷功能已禁用
// import UserSurveyModal from '../common/modals/UserSurveyModal';
-import NewUserGiftModal from '../common/modals/NewUserGiftModal';
+const HeaderBar = lazy(() => import('./headerbar'));
+const SiderBar = lazy(() => import('./SiderBar'));
+const NewUserGiftModal = lazy(
+ () => import('../common/modals/NewUserGiftModal'),
+);
// 懒加载客服浮窗组件 - 非核心功能,延迟加载
const CustomerServiceFloat = lazy(() => import('../customer-service'));
@@ -355,10 +357,12 @@ const PageLayout = () => {
zIndex: 100,
}}
>
- setDrawerOpen((prev) => !prev)}
- drawerOpen={drawerOpen}
- />
+
+ setDrawerOpen((prev) => !prev)}
+ drawerOpen={drawerOpen}
+ />
+
{/* 跑马灯公告 - 固定在导航栏正下方;认证页不展示(与 hasMarquee 的高度计算保持一致) */}
{!isAuthPage && }
@@ -406,12 +410,14 @@ const PageLayout = () => {
: undefined,
}}
>
- {
- if (isMobile) setDrawerOpen(false);
- }}
- />
+
+ {
+ if (isMobile) setDrawerOpen(false);
+ }}
+ />
+
)}
{
/> */}
{/* 新用户注册赠送额度弹窗 */}
- setShowGiftModal(false)}
- quota={giftQuota}
- />
+ {showGiftModal && (
+
+ setShowGiftModal(false)}
+ quota={giftQuota}
+ />
+
+ )}
);
};
diff --git a/src/components/table/usage-logs/modals/UsageLogsExportModal.jsx b/src/components/table/usage-logs/modals/UsageLogsExportModal.jsx
index 96459424..4f65229b 100644
--- a/src/components/table/usage-logs/modals/UsageLogsExportModal.jsx
+++ b/src/components/table/usage-logs/modals/UsageLogsExportModal.jsx
@@ -18,7 +18,6 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React, { useEffect, useMemo, useState } from 'react';
-import * as XLSX from 'xlsx';
import { Modal, Button, Checkbox, Radio, RadioGroup } from '@douyinfe/semi-ui';
import { CheckSquare, Eraser, FileSpreadsheet, X } from 'lucide-react';
import {
@@ -232,7 +231,7 @@ const UsageLogsExportModal = ({
// 不用可能过期的 logCount 来禁用按钮(避免编辑筛选未查询时被误禁用)
const pageNoData = scope === 'page' && pageCount === 0;
- const buildSheet = (rows, fields, header) => {
+ const buildSheet = (XLSX, rows, fields, header) => {
const aoa = [header, ...rows.map((r) => fields.map((f) => f.value(r, t)))];
const ws = XLSX.utils.aoa_to_sheet(aoa);
ws['!cols'] = fields.map((f) => ({ wch: f.width || 14 }));
@@ -267,10 +266,11 @@ const UsageLogsExportModal = ({
return;
}
const header = fields.map((f) => t(f.label));
+ const XLSX = await import('xlsx');
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(
wb,
- buildSheet(rows, fields, header),
+ buildSheet(XLSX, rows, fields, header),
t('消耗明细'),
);
XLSX.writeFile(wb, buildExportFilename());
diff --git a/src/helpers/render.jsx b/src/helpers/render.jsx
index c49b1702..e278c25c 100644
--- a/src/helpers/render.jsx
+++ b/src/helpers/render.jsx
@@ -17,81 +17,46 @@ along with this program. If not, see .
For commercial licensing, please contact support@quantumnous.com
*/
+import React, { lazy, Suspense } from 'react';
import i18next from 'i18next';
// React 18-compatible LobeHub icons lack these brands; use generic icons.
import { Lock, Bot as FastGPT, Image as Jimeng } from 'lucide-react';
-import { Modal, Tag, Typography, Avatar } from '@douyinfe/semi-ui';
+import { Modal, Tag, Typography } from '@douyinfe/semi-ui';
import { copy, getCurrencySymbol, showSuccess } from './utils';
import { visit } from 'unist-util-visit';
-import {
- OpenAI,
- Claude,
- Gemini,
- Moonshot,
- Zhipu,
- Qwen,
- DeepSeek,
- Minimax,
- Wenxin,
- Spark,
- Midjourney,
- Hunyuan,
- Cohere,
- Cloudflare,
- Ai360,
- Yi,
- Jina,
- Mistral,
- XAI,
- Ollama,
- Doubao,
- Suno,
- Xinference,
- OpenRouter,
- Dify,
- Coze,
- SiliconCloud,
- Kling,
- Perplexity,
- Replicate,
-} from '@lobehub/icons';
+import OpenAI from '@lobehub/icons/es/OpenAI/components/Mono';
+import Claude from '@lobehub/icons/es/Claude/components/Color';
+import Gemini from '@lobehub/icons/es/Gemini/components/Color';
+import Moonshot from '@lobehub/icons/es/Moonshot/components/Mono';
+import Zhipu from '@lobehub/icons/es/Zhipu/components/Color';
+import Qwen from '@lobehub/icons/es/Qwen/components/Color';
+import DeepSeek from '@lobehub/icons/es/DeepSeek/components/Color';
+import Minimax from '@lobehub/icons/es/Minimax/components/Color';
+import Wenxin from '@lobehub/icons/es/Wenxin/components/Color';
+import Spark from '@lobehub/icons/es/Spark/components/Color';
+import Midjourney from '@lobehub/icons/es/Midjourney/components/Mono';
+import Hunyuan from '@lobehub/icons/es/Hunyuan/components/Color';
+import Cohere from '@lobehub/icons/es/Cohere/components/Color';
+import Cloudflare from '@lobehub/icons/es/Cloudflare/components/Color';
+import Ai360 from '@lobehub/icons/es/Ai360/components/Color';
+import Yi from '@lobehub/icons/es/Yi/components/Color';
+import Jina from '@lobehub/icons/es/Jina/components/Mono';
+import Mistral from '@lobehub/icons/es/Mistral/components/Color';
+import XAI from '@lobehub/icons/es/XAI/components/Mono';
+import Ollama from '@lobehub/icons/es/Ollama/components/Mono';
+import Doubao from '@lobehub/icons/es/Doubao/components/Color';
+import Suno from '@lobehub/icons/es/Suno/components/Mono';
+import Xinference from '@lobehub/icons/es/Xinference/components/Color';
+import OpenRouter from '@lobehub/icons/es/OpenRouter/components/Mono';
+import Dify from '@lobehub/icons/es/Dify/components/Color';
+import Coze from '@lobehub/icons/es/Coze/components/Mono';
+import SiliconCloud from '@lobehub/icons/es/SiliconCloud/components/Color';
+import Kling from '@lobehub/icons/es/Kling/components/Color';
+import Perplexity from '@lobehub/icons/es/Perplexity/components/Color';
+import Replicate from '@lobehub/icons/es/Replicate/components/Mono';
-// 创建图标映射表,避免使用 import * 导致整个库被打包
-// 只包含实际在库中存在的图标
-const LobeIconsMap = {
- OpenAI,
- Claude,
- Gemini,
- Moonshot,
- Zhipu,
- Qwen,
- DeepSeek,
- Minimax,
- Wenxin,
- Spark,
- Midjourney,
- Hunyuan,
- Cohere,
- Cloudflare,
- Ai360,
- Yi,
- Jina,
- Mistral,
- XAI,
- Ollama,
- Doubao,
- Suno,
- Xinference,
- OpenRouter,
- Dify,
- Coze,
- SiliconCloud,
- FastGPT,
- Kling,
- Jimeng,
- Perplexity,
- Replicate,
-};
+// Full Avatar/Text/Combine variants are loaded only when configured icons render.
+const LobeHubIcon = lazy(() => import('../components/common/LobeHubIcon'));
import {
LayoutDashboard,
@@ -205,12 +170,12 @@ export const getModelCategories = (() => {
},
anthropic: {
label: 'Anthropic',
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('claude'),
},
gemini: {
label: 'Gemini',
- icon: ,
+ icon: ,
filter: (model) =>
model.model_name.toLowerCase().includes('gemini') ||
model.model_name.toLowerCase().includes('gemma') ||
@@ -230,7 +195,7 @@ export const getModelCategories = (() => {
},
zhipu: {
label: t('智谱'),
- icon: ,
+ icon: ,
filter: (model) =>
model.model_name.toLowerCase().includes('chatglm') ||
model.model_name.toLowerCase().includes('glm-') ||
@@ -239,29 +204,29 @@ export const getModelCategories = (() => {
},
qwen: {
label: t('通义千问'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('qwen'),
},
deepseek: {
label: 'DeepSeek',
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('deepseek'),
},
minimax: {
label: 'MiniMax',
- icon: ,
+ icon: ,
filter: (model) =>
model.model_name.toLowerCase().includes('abab') ||
model.model_name.toLowerCase().includes('minimax'),
},
baidu: {
label: t('文心一言'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('ernie'),
},
xunfei: {
label: t('讯飞星火'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('spark'),
},
midjourney: {
@@ -271,12 +236,12 @@ export const getModelCategories = (() => {
},
tencent: {
label: t('腾讯混元'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('hunyuan'),
},
cohere: {
label: 'Cohere',
- icon: ,
+ icon: ,
filter: (model) =>
model.model_name.toLowerCase().includes('command') ||
model.model_name.toLowerCase().includes('c4ai-') ||
@@ -284,12 +249,12 @@ export const getModelCategories = (() => {
},
cloudflare: {
label: 'Cloudflare',
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('@cf/'),
},
ai360: {
label: t('360智脑'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('360'),
},
jina: {
@@ -299,7 +264,7 @@ export const getModelCategories = (() => {
},
mistral: {
label: 'Mistral AI',
- icon: ,
+ icon: ,
filter: (model) =>
model.model_name.toLowerCase().includes('mistral') ||
model.model_name.toLowerCase().includes('codestral') ||
@@ -319,12 +284,12 @@ export const getModelCategories = (() => {
},
doubao: {
label: t('豆包'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('doubao'),
},
yi: {
label: t('零一万物'),
- icon: ,
+ icon: ,
filter: (model) => model.model_name.toLowerCase().includes('yi'),
},
};
@@ -355,64 +320,64 @@ export function getChannelIcon(channelType) {
return ;
case 14: // Anthropic Claude
case 33: // AWS Claude
- return ;
+ return ;
case 41: // Vertex AI
- return ;
+ return ;
case 34: // Cohere
- return ;
+ return ;
case 39: // Cloudflare
- return ;
+ return ;
case 43: // DeepSeek
- return ;
+ return ;
case 15: // 百度文心千帆
case 46: // 百度文心千帆V2
- return ;
+ return ;
case 17: // 阿里通义千问
- return ;
+ return ;
case 18: // 讯飞星火认知
- return ;
+ return ;
case 16: // 智谱 ChatGLM
case 26: // 智谱 GLM-4V
- return ;
+ return ;
case 24: // Google Gemini
case 11: // Google PaLM2
- return ;
+ return ;
case 47: // Xinference
- return ;
+ return ;
case 25: // Moonshot
return ;
case 27: // Perplexity
- return ;
+ return ;
case 20: // OpenRouter
return ;
case 19: // 360 智脑
- return ;
+ return ;
case 23: // 腾讯混元
- return ;
+ return ;
case 31: // 零一万物
- return ;
+ return ;
case 35: // MiniMax
- return ;
+ return ;
case 37: // Dify
- return ;
+ return ;
case 38: // Jina
return ;
case 40: // SiliconCloud
- return ;
+ return ;
case 42: // Mistral AI
- return ;
+ return ;
case 45: // 字节火山方舟、豆包通用
- return ;
+ return ;
case 48: // xAI
return ;
case 49: // Coze
return ;
case 50: // 可灵 Kling
- return ;
+ return ;
case 51: // 即梦 Jimeng
return ;
case 54: // 豆包视频 Doubao Video
- return ;
+ return ;
case 56: // Replicate
return ;
case 8: // 自定义渠道
@@ -436,80 +401,15 @@ export function getChannelIcon(channelType) {
* @returns {JSX.Element} - 对应的图标组件或 Avatar
*/
export function getLobeHubIcon(iconName, size = 14) {
- if (typeof iconName === 'string') iconName = iconName.trim();
- // 如果没有图标名称,返回 Avatar
- if (!iconName) {
- return ?;
- }
-
- // 解析组件路径与点号链式属性
- const segments = String(iconName).split('.');
- const baseKey = segments[0];
- const BaseIcon = LobeIconsMap[baseKey];
-
- let IconComponent = undefined;
- let propStartIndex = 1;
-
- if (BaseIcon && segments.length > 1 && BaseIcon[segments[1]]) {
- IconComponent = BaseIcon[segments[1]];
- propStartIndex = 2;
- } else {
- IconComponent = LobeIconsMap[baseKey];
- propStartIndex = 1;
- }
-
- // 失败兜底
- if (
- !IconComponent ||
- (typeof IconComponent !== 'function' && typeof IconComponent !== 'object')
- ) {
- const firstLetter = String(iconName).charAt(0).toUpperCase();
- return {firstLetter};
- }
-
- // 解析点号链式属性,形如:key={...}、key='...'、key="..."、key=123、key、key=true/false
- const props = {};
-
- const parseValue = (raw) => {
- if (raw == null) return true;
- let v = String(raw).trim();
- // 去除一层花括号包裹
- if (v.startsWith('{') && v.endsWith('}')) {
- v = v.slice(1, -1).trim();
- }
- // 去除引号
- if (
- (v.startsWith('"') && v.endsWith('"')) ||
- (v.startsWith("'") && v.endsWith("'"))
- ) {
- return v.slice(1, -1);
- }
- // 布尔
- if (v === 'true') return true;
- if (v === 'false') return false;
- // 数字
- if (/^-?\d+(?:\.\d+)?$/.test(v)) return Number(v);
- // 其他原样返回字符串
- return v;
- };
-
- for (let i = propStartIndex; i < segments.length; i++) {
- const seg = segments[i];
- if (!seg) continue;
- const eqIdx = seg.indexOf('=');
- if (eqIdx === -1) {
- props[seg.trim()] = true;
- continue;
- }
- const key = seg.slice(0, eqIdx).trim();
- const valRaw = seg.slice(eqIdx + 1).trim();
- props[key] = parseValue(valRaw);
- }
-
- // 兼容第二参数 size,若字符串中未显式指定 size,则使用函数入参
- if (props.size == null && size != null) props.size = size;
-
- return ;
+ return (
+
+ }
+ >
+
+
+ );
}
// 颜色列表
diff --git a/src/pages/Home/index.jsx b/src/pages/Home/index.jsx
index 17bcfd07..8cd73692 100644
--- a/src/pages/Home/index.jsx
+++ b/src/pages/Home/index.jsx
@@ -31,18 +31,16 @@ import { useActualTheme } from '../../context/Theme';
import { marked } from 'marked';
import { useTranslation } from 'react-i18next';
import { Link, useNavigate } from 'react-router-dom';
-import {
- Moonshot,
- OpenAI,
- Zhipu,
- Claude,
- Gemini,
- Wenxin,
- Spark,
- DeepSeek,
- Qwen,
- Midjourney,
-} from '@lobehub/icons';
+import Moonshot from '@lobehub/icons/es/Moonshot/components/Mono';
+import OpenAI from '@lobehub/icons/es/OpenAI/components/Mono';
+import Zhipu from '@lobehub/icons/es/Zhipu/components/Color';
+import Claude from '@lobehub/icons/es/Claude/components/Color';
+import Gemini from '@lobehub/icons/es/Gemini/components/Color';
+import Wenxin from '@lobehub/icons/es/Wenxin/components/Color';
+import Spark from '@lobehub/icons/es/Spark/components/Color';
+import DeepSeek from '@lobehub/icons/es/DeepSeek/components/Color';
+import Qwen from '@lobehub/icons/es/Qwen/components/Color';
+import Midjourney from '@lobehub/icons/es/Midjourney/components/Mono';
import {
Cpu,
Server,
@@ -299,15 +297,15 @@ const Home = () => {
// 模型列表
const modelIcons = [
{ Icon: OpenAI, name: 'OpenAI' },
- { Icon: Claude.Color, name: 'Claude' },
- { Icon: Gemini.Color, name: 'Gemini' },
+ { Icon: Claude, name: 'Claude' },
+ { Icon: Gemini, name: 'Gemini' },
{ Icon: Midjourney, name: 'Midjourney' },
- { Icon: Qwen.Color, name: 'Qwen' },
- { Icon: DeepSeek.Color, name: 'DeepSeek' },
- { Icon: Zhipu.Color, name: 'ChatGLM' },
+ { Icon: Qwen, name: 'Qwen' },
+ { Icon: DeepSeek, name: 'DeepSeek' },
+ { Icon: Zhipu, name: 'ChatGLM' },
{ Icon: Moonshot, name: 'Moonshot' },
- { Icon: Spark.Color, name: 'Spark' },
- { Icon: Wenxin.Color, name: 'Wenxin' },
+ { Icon: Spark, name: 'Spark' },
+ { Icon: Wenxin, name: 'Wenxin' },
];
// Enterprise Style CSS
@@ -498,10 +496,10 @@ const Home = () => {
-
+
-
+
diff --git a/src/pages/Organization/OrgLogs.jsx b/src/pages/Organization/OrgLogs.jsx
index 245b119a..a0ce4095 100644
--- a/src/pages/Organization/OrgLogs.jsx
+++ b/src/pages/Organization/OrgLogs.jsx
@@ -18,7 +18,6 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React, { useEffect, useState, useMemo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
-import * as XLSX from 'xlsx';
import {
RefreshCw,
Receipt,
@@ -161,7 +160,7 @@ const EXPORT_FIELDS = [
];
// 将选中字段组装成一个 worksheet(含表头、列宽)
-function buildWorksheet(rows, fields, header) {
+function buildWorksheet(XLSX, rows, fields, header) {
const aoa = [header, ...rows.map((r) => fields.map((f) => f.value(r)))];
const ws = XLSX.utils.aoa_to_sheet(aoa);
ws['!cols'] = fields.map((f) => ({ wch: f.width || 14 }));
@@ -455,6 +454,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
}
const header = fields.map((f) => t(f.label));
+ const XLSX = await import('xlsx');
const wb = XLSX.utils.book_new();
if (exportMode === 'perUser') {
@@ -535,7 +535,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
);
for (const { name, rows } of groups.values()) {
- const ws = buildWorksheet(rows, fields, header);
+ const ws = buildWorksheet(XLSX, rows, fields, header);
XLSX.utils.book_append_sheet(
wb,
ws,
@@ -544,7 +544,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
}
} else {
// 汇总:所有记录放在一个 sheet 页
- const ws = buildWorksheet(allLogs, fields, header);
+ const ws = buildWorksheet(XLSX, allLogs, fields, header);
XLSX.utils.book_append_sheet(
wb,
ws,
diff --git a/tests/environment.test.js b/tests/environment.test.js
index c1ed7138..22915a21 100644
--- a/tests/environment.test.js
+++ b/tests/environment.test.js
@@ -20,6 +20,7 @@ For commercial licensing, please contact support@quantumnous.com
import assert from 'node:assert/strict';
import { mkdtemp, readFile, writeFile, rm } from 'node:fs/promises';
import path from 'node:path';
+import { createServer as createHttpServer } from 'node:http';
import { fileURLToPath } from 'node:url';
import test from 'node:test';
import { loadConfigFromFile, loadEnv, createServer } from 'vite';
@@ -123,6 +124,7 @@ test('checked-in defaults preserve same-origin behavior and disable analytics',
test('development server transforms the HTML and runtime configuration modules', async () => {
const server = await createServer({
root,
+ cacheDir: path.join(root, '.cache/vite-environment-test'),
server: { middlewareMode: true },
optimizeDeps: { noDiscovery: true, include: [] },
});
@@ -144,3 +146,46 @@ test('development server transforms the HTML and runtime configuration modules',
await server.close();
}
});
+
+test('Vite proxies API requests on Node 22 without DEP0060', async () => {
+ const upstream = createHttpServer((request, response) => {
+ response.setHeader('Content-Type', 'application/json');
+ response.end(JSON.stringify({ path: request.url }));
+ });
+ await new Promise((resolve) => upstream.listen(0, '127.0.0.1', resolve));
+ const warnings = [];
+ const onWarning = (warning) => warnings.push(warning.code);
+ process.on('warning', onWarning);
+ let server;
+ try {
+ server = await createServer({
+ configFile: false,
+ root,
+ cacheDir: path.join(root, '.cache/vite-proxy-test'),
+ optimizeDeps: { noDiscovery: true, include: [] },
+ server: {
+ host: '127.0.0.1',
+ port: 0,
+ proxy: {
+ '/api': {
+ target: `http://127.0.0.1:${upstream.address().port}`,
+ changeOrigin: true,
+ },
+ },
+ },
+ });
+ await server.listen();
+ const response = await fetch(
+ `http://127.0.0.1:${server.httpServer.address().port}/api/status`,
+ { headers: { Connection: 'close' } },
+ );
+ assert.equal(response.status, 200);
+ assert.deepEqual(await response.json(), { path: '/api/status' });
+ await new Promise((resolve) => setImmediate(resolve));
+ assert.ok(!warnings.includes('DEP0060'));
+ } finally {
+ process.off('warning', onWarning);
+ await server?.close();
+ await new Promise((resolve) => upstream.close(resolve));
+ }
+});
diff --git a/vite.config.js b/vite.config.js
index 056e32d2..f493c5be 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -38,61 +38,6 @@ const DEV_PROXY_TARGET = 'http://134.175.227.134:13000';
*/
const JSX_IN_JS_RE = /src\/.*\.js$/;
-/**
- * 手动分包规则,数组顺序即匹配优先级:首个命中的分组拥有该模块。
- *
- * 每条规则只负责把 node_modules 下的第三方库归入固定 chunk;
- * 未命中的模块返回 undefined,仍交回 Rollup 的默认分包策略。
- */
-const VENDOR_CHUNK_RULES = [
- // React 运行时核心
- ['react-core', ['react/', 'react-dom/', 'react-router-dom/', 'scheduler/']],
- // Semi UI:图标与组件分开,避免图标变动连带组件 chunk 失效
- ['semi-icons', ['@douyinfe/semi-icons']],
- ['semi-ui', ['@douyinfe/semi-ui', '@douyinfe/semi-foundation']],
- // 图表库,体积较大
- ['vchart', ['@visactor/']],
- // Mermaid 及其布局引擎,体积最大
- ['mermaid', ['mermaid/', 'dagre-d3', 'cytoscape', 'elkjs']],
- // Markdown 渲染链路
- ['markdown', ['react-markdown/', 'remark-', 'rehype-', 'unified/', 'unist-']],
- // KaTeX 数学公式
- ['katex', ['katex/']],
- // 代码高亮
- ['highlight', ['highlight.js/']],
- // 图标库
- ['lobe-icons', ['@lobehub/icons']],
- ['lucide-icons', ['lucide-react/']],
- // 国际化
- ['i18n', ['i18next', 'react-i18next/']],
- // 基础工具库
- ['utils', ['axios/', 'dayjs/', 'clsx/']],
- // 独立的 React 生态第三方组件
- [
- 'react-components',
- [
- 'react-dropzone/',
- 'react-toastify/',
- 'react-telegram-login/',
- 'react-turnstile/',
- ],
- ],
- // 二维码生成
- ['qrcode', ['qrcode']],
-];
-
-/**
- * 解析模块应归属的第三方 chunk。
- *
- * @param {string} id 模块的绝对路径
- * @returns {string | undefined} chunk 名;无匹配时返回 undefined
- */
-function resolveVendorChunk(id) {
- return VENDOR_CHUNK_RULES.find(([, packages]) =>
- packages.some((name) => id.includes(`node_modules/${name}`)),
- )?.[0];
-}
-
/**
* 让 JSX_IN_JS_RE 命中的 .js 按 JSX 语法解析。
*
@@ -175,8 +120,6 @@ export default defineConfig(({ mode }) => {
analyticsPlugin(env),
],
optimizeDeps: {
- // 强制重新预构建,避免依赖变更后命中陈旧的依赖缓存
- force: true,
esbuildOptions: {
loader: {
'.js': 'jsx',
@@ -195,18 +138,12 @@ export default defineConfig(({ mode }) => {
target: 'es2015',
// 生产环境不需要 sourcemap
sourcemap: false,
- // esbuild 压缩选项:移除调试语句与版权注释
- esbuild: {
- drop: ['console', 'debugger'],
- legalComments: 'none',
- },
rollupOptions: {
output: {
// 文件名带内容 hash,便于浏览器长期缓存与增量更新
chunkFileNames: 'assets/[name]-[hash].js',
entryFileNames: 'assets/[name]-[hash].js',
assetFileNames: 'assets/[name]-[hash].[ext]',
- manualChunks: resolveVendorChunk,
},
},
},