Compare commits

...

2 Commits

8 changed files with 247 additions and 112 deletions

View File

@ -1,13 +0,0 @@
# README.md
# Changelog.md
# CONTRIBUTING.md
.changelog_backups
pnpm-lock.yaml
src-tauri/target/
src-tauri/gen/
target
Cargo.lock
.github/workflows/*.lock.yml

View File

@ -1,5 +0,0 @@
{
"semi": false,
"singleQuote": true,
"plugins": ["prettier-plugin-toml"]
}

46
biome.json Normal file
View File

@ -0,0 +1,46 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "off"
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "asNeeded"
}
},
"files": {
"includes": [
"**",
"!dist",
"!node_modules",
"!src-tauri/target",
"!src-tauri/gen",
"!target",
"!Cargo.lock",
"!pnpm-lock.yaml",
"!README.md",
"!Changelog.md",
"!CONTRIBUTING.md",
"!.changelog_backups",
"!.github/workflows/*.lock.yml"
]
}
}

View File

@ -26,8 +26,8 @@
"publish-version": "node scripts/publish-version.mjs",
"lint": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache src",
"lint:fix": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache --fix src",
"format": "prettier --write .",
"format:check": "prettier --check .",
"format": "biome format --write .",
"format:check": "biome format .",
"i18n:check": "node scripts/cleanup-unused-i18n.mjs",
"i18n:format": "node scripts/cleanup-unused-i18n.mjs --align --apply",
"i18n:types": "node scripts/generate-i18n-keys.mjs",
@ -81,6 +81,7 @@
},
"devDependencies": {
"@actions/github": "^9.0.0",
"@biomejs/biome": "^2.4.10",
"@eslint-react/eslint-plugin": "^4.0.0",
"@eslint/js": "^10.0.1",
"@tauri-apps/cli": "2.10.1",
@ -92,8 +93,9 @@
"@types/validator": "^13.15.10",
"@vitejs/plugin-legacy": "^8.0.0",
"@vitejs/plugin-react": "^6.0.1",
"axios": "^1.13.6",
"adm-zip": "^0.5.16",
"axios": "^1.13.6",
"babel-plugin-react-compiler": "^1.0.0",
"cli-color": "^2.0.4",
"commander": "^14.0.3",
"cross-env": "^10.1.0",
@ -111,8 +113,6 @@
"jiti": "^2.6.1",
"lint-staged": "^16.4.0",
"node-fetch": "^3.3.2",
"prettier": "^3.8.1",
"prettier-plugin-toml": "^2.0.6",
"sass": "^1.98.0",
"tar": "^7.5.12",
"terser": "^5.46.1",
@ -122,12 +122,12 @@
"vite-plugin-svgr": "^5.0.0"
},
"lint-staged": {
"*.{ts,tsx}": [
"*.{ts,tsx,js,mjs}": [
"eslint --fix --max-warnings=0",
"prettier --write"
"biome format --write"
],
"*.{js,mjs,css,scss,json,md,toml,yaml,yml}": [
"prettier --write"
"*.{css,scss,json,md,yaml,yml}": [
"biome format --write"
]
},
"type": "module",

140
pnpm-lock.yaml generated
View File

@ -144,6 +144,9 @@ importers:
'@actions/github':
specifier: ^9.0.0
version: 9.0.0
'@biomejs/biome':
specifier: ^2.4.10
version: 2.4.10
'@eslint-react/eslint-plugin':
specifier: ^4.0.0
version: 4.2.1(eslint@10.1.0(jiti@2.6.1))(typescript@6.0.2)
@ -176,13 +179,16 @@ importers:
version: 8.0.1(terser@5.46.1)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
'@vitejs/plugin-react':
specifier: ^6.0.1
version: 6.0.1(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
version: 6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))
adm-zip:
specifier: ^0.5.16
version: 0.5.16
axios:
specifier: ^1.13.6
version: 1.14.0
babel-plugin-react-compiler:
specifier: ^1.0.0
version: 1.0.0
cli-color:
specifier: ^2.0.4
version: 2.0.4
@ -234,12 +240,6 @@ importers:
node-fetch:
specifier: ^3.3.2
version: 3.3.2
prettier:
specifier: ^3.8.1
version: 3.8.1
prettier-plugin-toml:
specifier: ^2.0.6
version: 2.0.6(prettier@3.8.1)
sass:
specifier: ^1.98.0
version: 1.98.0
@ -772,6 +772,63 @@ packages:
resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==}
engines: {node: '>=6.9.0'}
'@biomejs/biome@2.4.10':
resolution: {integrity: sha512-xxA3AphFQ1geij4JTHXv4EeSTda1IFn22ye9LdyVPoJU19fNVl0uzfEuhsfQ4Yue/0FaLs2/ccVi4UDiE7R30w==}
engines: {node: '>=14.21.3'}
hasBin: true
'@biomejs/cli-darwin-arm64@2.4.10':
resolution: {integrity: sha512-vuzzI1cWqDVzOMIkYyHbKqp+AkQq4K7k+UCXWpkYcY/HDn1UxdsbsfgtVpa40shem8Kax4TLDLlx8kMAecgqiw==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [darwin]
'@biomejs/cli-darwin-x64@2.4.10':
resolution: {integrity: sha512-14fzASRo+BPotwp7nWULy2W5xeUyFnTaq1V13Etrrxkrih+ez/2QfgFm5Ehtf5vSjtgx/IJycMMpn5kPd5ZNaA==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [darwin]
'@biomejs/cli-linux-arm64-musl@2.4.10':
resolution: {integrity: sha512-WrJY6UuiSD/Dh+nwK2qOTu8kdMDlLV3dLMmychIghHPAysWFq1/DGC1pVZx8POE3ZkzKR3PUUnVrtZfMfaJjyQ==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
libc: [musl]
'@biomejs/cli-linux-arm64@2.4.10':
resolution: {integrity: sha512-7MH1CMW5uuxQ/s7FLST63qF8B3Hgu2HRdZ7tA1X1+mk+St4JOuIrqdhIBnnyqeyWJNI+Bww7Es5QZ0wIc1Cmkw==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
libc: [glibc]
'@biomejs/cli-linux-x64-musl@2.4.10':
resolution: {integrity: sha512-kDTi3pI6PBN6CiczsWYOyP2zk0IJI08EWEQyDMQWW221rPaaEz6FvjLhnU07KMzLv8q3qSuoB93ua6inSQ55Tw==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
libc: [musl]
'@biomejs/cli-linux-x64@2.4.10':
resolution: {integrity: sha512-tZLvEEi2u9Xu1zAqRjTcpIDGVtldigVvzug2fTuPG0ME/g8/mXpRPcNgLB22bGn6FvLJpHHnqLnwliOu8xjYrg==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
libc: [glibc]
'@biomejs/cli-win32-arm64@2.4.10':
resolution: {integrity: sha512-umwQU6qPzH+ISTf/eHyJ/QoQnJs3V9Vpjz2OjZXe9MVBZ7prgGafMy7yYeRGnlmDAn87AKTF3Q6weLoMGpeqdQ==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [win32]
'@biomejs/cli-win32-x64@2.4.10':
resolution: {integrity: sha512-aW/JU5GuyH4uxMrNYpoC2kjaHlyJGLgIa3XkhPEZI0uKhZhJZU8BuEyJmvgzSPQNGozBwWjC972RaNdcJ9KyJg==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [win32]
'@dnd-kit/accessibility@3.1.1':
resolution: {integrity: sha512-2P+YgaXF+gRsIihwwY1gCsQSYnu9Zyj2py8kY5fFvUM1qm2WA2u639R6YNVfU4GWr+ZM5mqEsfHZZLoRONbemw==}
peerDependencies:
@ -1459,12 +1516,6 @@ packages:
'@tanstack/virtual-core@3.13.23':
resolution: {integrity: sha512-zSz2Z2HNyLjCplANTDyl3BcdQJc2k1+yyFoKhNRmCr7V7dY8o8q5m8uFTI1/Pg1kL+Hgrz6u3Xo6eFUB7l66cg==}
'@taplo/core@0.2.0':
resolution: {integrity: sha512-r8bl54Zj1In3QLkiW/ex694bVzpPJ9EhwqT9xkcUVODnVUGirdB1JTsmiIv0o1uwqZiwhi8xNnTOQBRQCpizrQ==}
'@taplo/lib@0.5.0':
resolution: {integrity: sha512-+xIqpQXJco3T+VGaTTwmhxLa51qpkQxCjRwezjFZgr+l21ExlywJFcDfTrNmL6lG6tqb0h8GyJKO3UPGPtSCWg==}
'@tauri-apps/api@2.10.1':
resolution: {integrity: sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==}
@ -1934,6 +1985,9 @@ packages:
peerDependencies:
'@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0
babel-plugin-react-compiler@1.0.0:
resolution: {integrity: sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==}
bail@2.0.2:
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
@ -3078,12 +3132,6 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
prettier-plugin-toml@2.0.6:
resolution: {integrity: sha512-12N/wBuHa9jd/KVy9pRP20NMKxQfQLMseQCt66lIbLaPLItvGUcSIryE1eZZMJ7loSws6Ig3M2Elc2EreNh76w==}
engines: {node: '>=16.0.0'}
peerDependencies:
prettier: ^3.0.3
prettier@3.8.1:
resolution: {integrity: sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==}
engines: {node: '>=14'}
@ -4298,6 +4346,41 @@ snapshots:
'@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.28.5
'@biomejs/biome@2.4.10':
optionalDependencies:
'@biomejs/cli-darwin-arm64': 2.4.10
'@biomejs/cli-darwin-x64': 2.4.10
'@biomejs/cli-linux-arm64': 2.4.10
'@biomejs/cli-linux-arm64-musl': 2.4.10
'@biomejs/cli-linux-x64': 2.4.10
'@biomejs/cli-linux-x64-musl': 2.4.10
'@biomejs/cli-win32-arm64': 2.4.10
'@biomejs/cli-win32-x64': 2.4.10
'@biomejs/cli-darwin-arm64@2.4.10':
optional: true
'@biomejs/cli-darwin-x64@2.4.10':
optional: true
'@biomejs/cli-linux-arm64-musl@2.4.10':
optional: true
'@biomejs/cli-linux-arm64@2.4.10':
optional: true
'@biomejs/cli-linux-x64-musl@2.4.10':
optional: true
'@biomejs/cli-linux-x64@2.4.10':
optional: true
'@biomejs/cli-win32-arm64@2.4.10':
optional: true
'@biomejs/cli-win32-x64@2.4.10':
optional: true
'@dnd-kit/accessibility@3.1.1(react@19.2.4)':
dependencies:
react: 19.2.4
@ -4980,12 +5063,6 @@ snapshots:
'@tanstack/virtual-core@3.13.23': {}
'@taplo/core@0.2.0': {}
'@taplo/lib@0.5.0':
dependencies:
'@taplo/core': 0.2.0
'@tauri-apps/api@2.10.1': {}
'@tauri-apps/cli-darwin-arm64@2.10.1':
@ -5365,10 +5442,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@vitejs/plugin-react@6.0.1(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))':
'@vitejs/plugin-react@6.0.1(babel-plugin-react-compiler@1.0.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3))':
dependencies:
'@rolldown/pluginutils': 1.0.0-rc.7
vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@24.12.0)(jiti@2.6.1)(sass@1.98.0)(terser@5.46.1)(yaml@2.8.3)
optionalDependencies:
babel-plugin-react-compiler: 1.0.0
acorn-jsx@5.3.2(acorn@8.16.0):
dependencies:
@ -5452,6 +5531,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
babel-plugin-react-compiler@1.0.0:
dependencies:
'@babel/types': 7.29.0
bail@2.0.2: {}
balanced-match@4.0.4: {}
@ -6785,11 +6868,6 @@ snapshots:
prelude-ls@1.2.1: {}
prettier-plugin-toml@2.0.6(prettier@3.8.1):
dependencies:
'@taplo/lib': 0.5.0
prettier: 3.8.1
prettier@3.8.1: {}
prop-types@15.8.1:

View File

@ -1,58 +1,57 @@
import { alpha, Box, styled } from '@mui/material'
export const ProfileBox = styled(Box)(({
theme,
'aria-selected': selected,
}) => {
const { mode, primary, text } = theme.palette
const key = `${mode}-${!!selected}`
export const ProfileBox = styled(Box)(
({ theme, 'aria-selected': selected }) => {
const { mode, primary, text } = theme.palette
const key = `${mode}-${!!selected}`
const backgroundColor = mode === 'light' ? '#ffffff' : '#282A36'
const backgroundColor = mode === 'light' ? '#ffffff' : '#282A36'
const color = {
'light-true': text.secondary,
'light-false': text.secondary,
'dark-true': alpha(text.secondary, 0.65),
'dark-false': alpha(text.secondary, 0.65),
}[key]!
const color = {
'light-true': text.secondary,
'light-false': text.secondary,
'dark-true': alpha(text.secondary, 0.65),
'dark-false': alpha(text.secondary, 0.65),
}[key]!
const h2color = {
'light-true': primary.main,
'light-false': text.primary,
'dark-true': primary.main,
'dark-false': text.primary,
}[key]!
const h2color = {
'light-true': primary.main,
'light-false': text.primary,
'dark-true': primary.main,
'dark-false': text.primary,
}[key]!
const borderSelect = {
'light-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'light-false': {
width: '100%',
},
'dark-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'dark-false': {
width: '100%',
},
}[key]
const borderSelect = {
'light-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'light-false': {
width: '100%',
},
'dark-true': {
borderLeft: `3px solid ${primary.main}`,
width: `calc(100% + 3px)`,
marginLeft: `-3px`,
},
'dark-false': {
width: '100%',
},
}[key]
return {
position: 'relative',
display: 'block',
cursor: 'pointer',
textAlign: 'left',
padding: '8px 16px',
boxSizing: 'border-box',
backgroundColor,
...borderSelect,
borderRadius: '8px',
color,
'& h2': { color: h2color },
}
})
return {
position: 'relative',
display: 'block',
cursor: 'pointer',
textAlign: 'left',
padding: '8px 16px',
boxSizing: 'border-box',
backgroundColor,
...borderSelect,
borderRadius: '8px',
color,
'& h2': { color: h2color },
}
},
)

View File

@ -841,8 +841,7 @@ interface IProxySnellConfig extends IProxyBaseConfig {
version?: number
}
interface IProxyConfig
extends
IProxyBaseConfig,
extends IProxyBaseConfig,
IProxyDirectConfig,
IProxyDnsConfig,
IProxyHttpConfig,

View File

@ -10,7 +10,11 @@ export default defineConfig({
server: { port: 3000 },
plugins: [
svgr(),
react(),
react({
babel: {
plugins: ['babel-plugin-react-compiler'],
},
} as any),
legacy({
modernTargets: ['edge>=109', 'safari>=14'],
renderLegacyChunks: false,
@ -26,6 +30,24 @@ export default defineConfig({
outDir: '../dist',
emptyOutDir: true,
chunkSizeWarningLimit: 4000,
rollupOptions: {
output: {
manualChunks: (id) => {
if (id.includes('monaco-yaml')) return 'monaco-yaml'
if (
id.includes('node_modules/react/') ||
id.includes('node_modules/react-dom/')
)
return 'react'
if (id.includes('node_modules/react-router')) return 'router'
if (
id.includes('node_modules/i18next') ||
id.includes('node_modules/react-i18next')
)
return 'i18n'
},
},
},
},
resolve: {
alias: {
@ -36,4 +58,13 @@ export default defineConfig({
define: {
OS_PLATFORM: `"${process.platform}"`,
},
optimizeDeps: {
include: [
'react',
'react-dom',
'react-router-dom',
'i18next',
'react-i18next',
],
},
})