diff --git a/.github/workflows/react-doctor.yml b/.github/workflows/react-doctor.yml new file mode 100644 index 00000000..31d448d2 --- /dev/null +++ b/.github/workflows/react-doctor.yml @@ -0,0 +1,20 @@ +name: 🏥 React Doctor + +on: push + +permissions: + contents: read + pull-requests: write + +jobs: + react-doctor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v5 + with: + node-version: 22 + - uses: millionco/react-doctor@main + with: + diff: true + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 02f8ad72..99863c8d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ functions/* .umi .umi-production .umi-test +.umi-undefined .turbopack # screenshot diff --git a/package-lock.json b/package-lock.json index b08863e1..7cf01175 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,6 +56,7 @@ "jest-environment-jsdom": "^30.4.1", "lint-staged": "^17.0.2", "mockjs": "^1.1.0", + "react-doctor": "^0.1.2", "swagger-ui-dist": "^5.32.5", "tailwindcss": "^4.2.4", "ts-node": "^10.9.2", @@ -4531,6 +4532,13 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@iarna/toml": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", + "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==", + "dev": true, + "license": "ISC" + }, "node_modules/@iconify/types": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", @@ -6164,6 +6172,612 @@ "url": "https://github.com/sponsors/Boshen" } }, + "node_modules/@oxc-resolver/binding-android-arm-eabi": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.19.1.tgz", + "integrity": "sha512-aUs47y+xyXHUKlbhqHUjBABjvycq6YSD7bpxSW7vplUmdzAlJ93yXY6ZR0c1o1x5A/QKbENCvs3+NlY8IpIVzg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@oxc-resolver/binding-android-arm64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.19.1.tgz", + "integrity": "sha512-oolbkRX+m7Pq2LNjr/kKgYeC7bRDMVTWPgxBGMjSpZi/+UskVo4jsMU3MLheZV55jL6c3rNelPl4oD60ggYmqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@oxc-resolver/binding-darwin-arm64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.19.1.tgz", + "integrity": "sha512-nUC6d2i3R5B12sUW4O646qD5cnMXf2oBGPLIIeaRfU9doJRORAbE2SGv4eW6rMqhD+G7nf2Y8TTJTLiiO3Q/dQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxc-resolver/binding-darwin-x64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.19.1.tgz", + "integrity": "sha512-cV50vE5+uAgNcFa3QY1JOeKDSkM/9ReIcc/9wn4TavhW/itkDGrXhw9jaKnkQnGbjJ198Yh5nbX/Gr2mr4Z5jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxc-resolver/binding-freebsd-x64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.19.1.tgz", + "integrity": "sha512-xZOQiYGFxtk48PBKff+Zwoym7ScPAIVp4c14lfLxizO2LTTTJe5sx9vQNGrBymrf/vatSPNMD4FgsaaRigPkqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm-gnueabihf": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.19.1.tgz", + "integrity": "sha512-lXZYWAC6kaGe/ky2su94e9jN9t6M0/6c+GrSlCqL//XO1cxi5lpAhnJYdyrKfm0ZEr/c7RNyAx3P7FSBcBd5+A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm-musleabihf": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.19.1.tgz", + "integrity": "sha512-veG1kKsuK5+t2IsO9q0DErYVSw2azvCVvWHnfTOS73WE0STdLLB7Q1bB9WR+yHPQM76ASkFyRbogWo1GR1+WbQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.19.1.tgz", + "integrity": "sha512-heV2+jmXyYnUrpUXSPugqWDRpnsQcDm2AX4wzTuvgdlZfoNYO0O3W2AVpJYaDn9AG4JdM6Kxom8+foE7/BcSig==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm64-musl": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.19.1.tgz", + "integrity": "sha512-jvo2Pjs1c9KPxMuMPIeQsgu0mOJF9rEb3y3TdpsrqwxRM+AN6/nDDwv45n5ZrUnQMsdBy5gIabioMKnQfWo9ew==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-ppc64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.19.1.tgz", + "integrity": "sha512-vLmdNxWCdN7Uo5suays6A/+ywBby2PWBBPXctWPg5V0+eVuzsJxgAn6MMB4mPlshskYbppjpN2Zg83ArHze9gQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-riscv64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.19.1.tgz", + "integrity": "sha512-/b+WgR+VTSBxzgOhDO7TlMXC1ufPIMR6Vj1zN+/x+MnyXGW7prTLzU9eW85Aj7Th7CCEG9ArCbTeqxCzFWdg2w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-riscv64-musl": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.19.1.tgz", + "integrity": "sha512-YlRdeWb9j42p29ROh+h4eg/OQ3dTJlpHSa+84pUM9+p6i3djtPz1q55yLJhgW9XfDch7FN1pQ/Vd6YP+xfRIuw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-s390x-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.19.1.tgz", + "integrity": "sha512-EDpafVOQWF8/MJynsjOGFThcqhRHy417sRyLfQmeiamJ8qVhSKAn2Dn2VVKUGCjVB9C46VGjhNo7nOPUi1x6uA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-x64-gnu": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.19.1.tgz", + "integrity": "sha512-NxjZe+rqWhr+RT8/Ik+5ptA3oz7tUw361Wa5RWQXKnfqwSSHdHyrw6IdcTfYuml9dM856AlKWZIUXDmA9kkiBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-x64-musl": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.19.1.tgz", + "integrity": "sha512-cM/hQwsO3ReJg5kR+SpI69DMfvNCp+A/eVR4b4YClE5bVZwz8rh2Nh05InhwI5HR/9cArbEkzMjcKgTHS6UaNw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-openharmony-arm64": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-openharmony-arm64/-/binding-openharmony-arm64-11.19.1.tgz", + "integrity": "sha512-QF080IowFB0+9Rh6RcD19bdgh49BpQHUW5TajG1qvWHvmrQznTZZjYlgE2ltLXyKY+qs4F/v5xuX1XS7Is+3qA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@oxc-resolver/binding-wasm32-wasi": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.19.1.tgz", + "integrity": "sha512-w8UCKhX826cP/ZLokXDS6+milN8y4X7zidsAttEdWlVoamTNf6lhBJldaWr3ukTDiye7s4HRcuPEPOXNC432Vg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.1.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@oxc-resolver/binding-win32-arm64-msvc": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.19.1.tgz", + "integrity": "sha512-nJ4AsUVZrVKwnU/QRdzPCCrO0TrabBqgJ8pJhXITdZGYOV28TIYystV1VFLbQ7DtAcaBHpocT5/ZJnF78YJPtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxc-resolver/binding-win32-ia32-msvc": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-11.19.1.tgz", + "integrity": "sha512-EW+ND5q2Tl+a3pH81l1QbfgbF3HmqgwLfDfVithRFheac8OTcnbXt/JxqD2GbDkb7xYEqy1zNaVFRr3oeG8npA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxc-resolver/binding-win32-x64-msvc": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.19.1.tgz", + "integrity": "sha512-6hIU3RQu45B+VNTY4Ru8ppFwjVS/S5qwYyGhBotmjxfEKk41I2DlGtRfGJndZ5+6lneE2pwloqunlOyZuX/XAw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.63.0.tgz", + "integrity": "sha512-A9xLtQt7i0OA1PoB/meog6kikXI9CdwEp7ZwQqmgnpKn3G3b1orvTDy8CQ6T7w1HvDrgWGB78PkFKcWgibcTCg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.63.0.tgz", + "integrity": "sha512-SQo+ZMvdR9l3CxZp5W5gFNxSiDxclY6lOzzNpKYLF8asESpm3Pwumx0gER5T7aHLF1/2BAAtLD3DiDkdgy4V1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.63.0.tgz", + "integrity": "sha512-6W82XjJDTmMnjg30427l0dufpnyLoq7wEukKdM6/g2VIybRVuQiBVh43EA4b+UxZ3+tLcKm+Or/pXGNgLCEU8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.63.0.tgz", + "integrity": "sha512-CnWd/YCuVG5W1BYkjJEVbJG11o526O9qAwBEQM+nh8K19CRFUkFdROXCyYkGmroHEYQe4vgQ6+lh3550Lp35Xw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.63.0.tgz", + "integrity": "sha512-a4eZAqrmtajqcxfdAzC+l7g3PaE3V8hpAYqqeD3fTxLXOMFdK3eNTZrU80n4dDEVm0JXy1aL5PqvqWldBl6zYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.63.0.tgz", + "integrity": "sha512-tYUtU9TdbU3uXF5D62g5zXJ13iniFGhXQx5vp9cyEjGdbSAY3VdFBSaldYvyoDmgMZ0ZYuwQP1Y4t2Fhejwa0w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.63.0.tgz", + "integrity": "sha512-I5r3twFf776UZg9dmRo2xbrKt00tTkORXEVe0ctg4vdTkQvJAjiCHxnbAU2HL1AiJ9cqADA76MAliuilsAWnvg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.63.0.tgz", + "integrity": "sha512-t7ltUkg6FFh4b564QyGir8xIj/QZbXu8FlcRkcyW9+ztr/mfRHlvUOFd95pJCXi9s/L5DrUeWWgpXRS+V+6igQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.63.0.tgz", + "integrity": "sha512-Q5mmZy/XWjuYFUuQyYjOvZ5U/JkKEwnpir6hGxhh6HcdP0V/BKxLo8dqkfF/t7r7AguB17dfS/8+go5AQDRR6g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.63.0.tgz", + "integrity": "sha512-uBGtuZ0TzLB4x5wVa82HGNvYqY8buwDhyCnCP0R0gkk9szqVsP0MeTtD5HX7EsEuFIt+aYmYxuxeVxs3nTSwtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.63.0.tgz", + "integrity": "sha512-h4s6FwxE+9MeA181o0dnDwHP32Y/bG8EiB/vrD6Ib+AMt6haigDc/0bUtI/sLmQDBMJnUfaCmtSSrEAqjtEVrA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.63.0.tgz", + "integrity": "sha512-2EaNcCBR8Mcjl5ARtuN3BdEpVkX7KpjSjMGZ/mJMIeaXgTtdz5ytg2VwygMSStA/k0ixfvZFoZOfjDEcouV5vQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.63.0.tgz", + "integrity": "sha512-p4hlf/fd7TrYYl3QrWWD0GocqJefwMu3cHQhmi2FvEB/YOvFb5DZN3SMBaPi7B1TM5DeypkEtrVib674q1KKPg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.63.0.tgz", + "integrity": "sha512-Vgq9rkRVcPcjbcH+ihYTfpeR7vCXfqpd+z5ItTGc0yYUV59L5ceHYN1iV4H9bKGV7Rn5hkVc7x3mSvHegduENA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.63.0.tgz", + "integrity": "sha512-3/Lkq/ncooA61rorrC+ZQed1Bc4VpGj+WnGsp58zmxKgvZ2vhreu+dcVyr3mX8NUpq7mfZ4gDDTou/yrF1Pd7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.63.0.tgz", + "integrity": "sha512-0/EdD/6hDkx5Mfd769PTjvEM8mZ/6Dfukp1dBCL/2PjlIVGEtYdNZyok6ChqYPsT9JcFnlQnUeQzO0/1L/oC9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.63.0.tgz", + "integrity": "sha512-wb0CUkN8ngwPiRQBjD1Cj0LsHeNvm+Xt6YBHDMtj2DVQVD6Oj8Ri7g6BD+KICf6LaBqZlmzOvy6nF9E/8yyGOg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.63.0.tgz", + "integrity": "sha512-BX5iq+ovdNlVYhSn5qPMUIT0uwAwt2lmEnCnzK+Gkhw4DovIvhGb96OFhV8yzQNUnQxn/xGkOR+X+BLrLDNm8w==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.63.0.tgz", + "integrity": "sha512-QeN/WELOfsXMeYwxvfgQrl6CbVftYUCZsGXHjXQd5Trccm8+i4gmtxaOui4xbJQaiDlviF8F3yLSBloQUeFsfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -12799,6 +13413,34 @@ "node": ">= 14" } }, + "node_modules/agent-install": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/agent-install/-/agent-install-0.0.5.tgz", + "integrity": "sha512-nHlms9BkP8ZiY79HrwCGiA2DcNaXrAaJrCM/BEqQ7MEsSKyCk+2A76xPGylIfASZSZE0SaU3T0bNSg4rBPIJAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@iarna/toml": "^2.2.5", + "commander": "^14.0.0", + "jsonc-parser": "^3.3.1", + "picocolors": "^1.1.1", + "prompts": "^2.4.2", + "yaml": "^2.8.3" + }, + "bin": { + "agent-install": "bin/agent-install.mjs" + } + }, + "node_modules/agent-install/node_modules/commander": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/ajv": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", @@ -14507,6 +15149,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-spinners": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-3.4.0.tgz", + "integrity": "sha512-bXfOC4QcT1tKXGorxL3wbJm6XJPDqEnij2gQ2m7ESQuE+/z9YFIWnl/5RpTiKWbMq3EVKR4fRLJGn6DVfu0mpw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-truncate": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz", @@ -18295,6 +18950,34 @@ "bser": "2.1.1" } }, + "node_modules/fd-package-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fd-package-json/-/fd-package-json-2.0.0.tgz", + "integrity": "sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "walk-up-path": "^4.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/fecha": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", @@ -18694,6 +19377,22 @@ "node": ">=0.4.x" } }, + "node_modules/formatly": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/formatly/-/formatly-0.3.0.tgz", + "integrity": "sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fd-package-json": "^2.0.0" + }, + "bin": { + "formatly": "bin/index.mjs" + }, + "engines": { + "node": ">=18.3.0" + } + }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -20603,6 +21302,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -20844,6 +21556,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-unicode-supported": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-weakmap": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", @@ -22509,6 +23234,13 @@ "node": ">=6" } }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, "node_modules/jsonfile": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", @@ -22588,6 +23320,16 @@ "node": ">=0.10.0" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/klona": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", @@ -22598,6 +23340,485 @@ "node": ">= 8" } }, + "node_modules/knip": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/knip/-/knip-6.12.1.tgz", + "integrity": "sha512-9JRZB1mENe8xNMpP4jJRiFXkRVBHTWzD7YtiLywkO7aKXCefbvI+hA0YDl7H7dPvJt7gcVolgxKgABJQ31NL3w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/webpro" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/knip" + } + ], + "license": "ISC", + "dependencies": { + "fdir": "^6.5.0", + "formatly": "^0.3.0", + "get-tsconfig": "4.14.0", + "jiti": "^2.7.0", + "minimist": "^1.2.8", + "oxc-parser": "^0.128.0", + "oxc-resolver": "^11.19.1", + "picomatch": "^4.0.4", + "smol-toml": "^1.6.1", + "strip-json-comments": "5.0.3", + "tinyglobby": "^0.2.16", + "unbash": "^3.0.0", + "yaml": "^2.8.2", + "zod": "^4.1.11" + }, + "bin": { + "knip": "bin/knip.js", + "knip-bun": "bin/knip-bun.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-android-arm-eabi": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.128.0.tgz", + "integrity": "sha512-aca6ZvzmCBUGOANQRiRQRZuRKYI3ENhcit6GisnknOOmcezfQc7xJ4dxlPU7MV7mOvrC7RNR1u3LAD7xyaiCxA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-android-arm64": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.128.0.tgz", + "integrity": "sha512-BbeDmuohoJ7Rz/it5wnkj69i/OsCPS3Z51nLEzwO/Y6YshtC4JU+15oNwhY8v4LRKRYclRc7ggOikwrsJ/eOEQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-darwin-arm64": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.128.0.tgz", + "integrity": "sha512-tRUHPt80417QmvNpoSslJT1VY8NUbWdrWR+L14Zn+RbOTcaqB8E6PYE/ZGN8jjWBzqporiA/H4MfO50ew/NCNA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-darwin-x64": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.128.0.tgz", + "integrity": "sha512-rWI2Hb1Nt3U/vKsjyNvZzDC8i/l144U20DKjhzaTmwIhIiSRGeroPWWiImwypmKLqrw8GuIixbWJkpGWLbkzrQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-freebsd-x64": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.128.0.tgz", + "integrity": "sha512-hhpdVMaNCLgQxjgNPeeFzSeJMmZPc5lKfv0NGSI3egZq9EdnEGqeC8JsYsQjK7PoQgbvZ17xlj0SO5ziH5Obkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-arm-gnueabihf": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.128.0.tgz", + "integrity": "sha512-093zNw0zZ/e/obML+rhlSdmnzR0mVZluPcAkxunEc5E3F0yBVsFn24Y1ILfsEte11Ud041qn/gp2OJ1jxNqUng==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-arm-musleabihf": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.128.0.tgz", + "integrity": "sha512-fq7DmKmfC+dvD97IXrgbph6Jzwe0EDu+PYMofmzZ6fv5X1k9vtaqLpDGMuICO9MmUnyKAQmVl+wIv2RNy4Dz8g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-arm64-gnu": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.128.0.tgz", + "integrity": "sha512-Xvm48jJah8TlIrURIjNOP/gNiGe6aKvCB+r06VliflFo8Kq7VOLE8PxtgShJzZIqubrgdMdYfvuPPozn7F6MbQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-arm64-musl": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.128.0.tgz", + "integrity": "sha512-M7iwBGmYJTx+pKOYFjI0buop4gJvlmcVzFGaXPt21DKpQkbQZG1f63Yg7LloIYT/t9yLxCw0Lhfx/RFlAlMSjA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-ppc64-gnu": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.128.0.tgz", + "integrity": "sha512-21LGNIZb1Pcfk5/EGsqabrxv4yqQOWis1407JJrClS7XpFCrbvr74YAB1V+m54cYbwvO6UWwQqS4WecxiyfCRg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-riscv64-gnu": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.128.0.tgz", + "integrity": "sha512-gyHjOTFpg9bTTYjxPmQirvufb89+VdZwVfcMtAUyPr6F5H8ZswvCQshK4qOW+Q+2Xyb33hduRgY/eFHJQjU/vQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-riscv64-musl": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.128.0.tgz", + "integrity": "sha512-X6Q2oKUrP5GyDd2xniuEBLk6aFQCZ97W2+aVXGgJXdjx5t4/oFuA9ri0wLOUrBIX+qdSuK581snMBio4z910eA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-s390x-gnu": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.128.0.tgz", + "integrity": "sha512-BdzTmqxfxoYkpgokoLaSnOX6T+R3/goL42klre2tnG+kHbG2TXS0VN+P5BPofH1axdKOHy5ei4ENZrjmCOt2lA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-x64-gnu": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.128.0.tgz", + "integrity": "sha512-OO1nW2Q7sSYYvJZpDHdvyFSdRaVcQqRijZSSmWVMqFxPYy8cEF45zJ9fcdIYuzIT3jYq6YRhEFm/VMWNWhE22Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-linux-x64-musl": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.128.0.tgz", + "integrity": "sha512-4NehAe404MRdoZVS9DW8C5XbJwbXIc/KfVlYdpi5vE4081zc9Y0YzKVqyOYj/Puye7/Do+ohaONBFWlEHYl9hw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-openharmony-arm64": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-openharmony-arm64/-/binding-openharmony-arm64-0.128.0.tgz", + "integrity": "sha512-kVbqgW9xLL8bh8oc7aYOJilRKXE5G33+tE0jan+duo/9OriaFRpijcCwT2waWs2oqYROYq0GlE7/p3ywoshVeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-wasm32-wasi": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-wasm32-wasi/-/binding-wasm32-wasi-0.128.0.tgz", + "integrity": "sha512-L38ojghJYHmgiz6fJd7jwLB/ESDBpB02NdFxh+smqVM6P2anCEvHn0jhaSrt5eVNR1Ak8+moOeftUlofeyvniA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-win32-arm64-msvc": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.128.0.tgz", + "integrity": "sha512-xgvO35GyHBtjlQ5AEpaYr7Rll1rvY7zqIhT6ty8E3ezBW2J1SFLjIDEvI/tcgDg6oaseDAqVcM+jU1HuCekgZw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-win32-ia32-msvc": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.128.0.tgz", + "integrity": "sha512-OY+3eM2SN72prHKRB22mPz8o5A/7dJ+f5DFLBVvggyZhEaNDAH9IB+ElMjmOkOIwf5MDCUAowCK7pAncNxzpBA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-parser/binding-win32-x64-msvc": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.128.0.tgz", + "integrity": "sha512-NE9ny+cPUCCObXa0IKLfj0tCdPd7pe/dz9ZpkxpUOymB3miNeMPybdlYYTBSGJUalMWeBM85/4JcCErCNTqOXw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/knip/node_modules/@oxc-project/types": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.128.0.tgz", + "integrity": "sha512-huv1Y/LzBJkBVHt3OlC7u0zHBW9qXf1FdD7sGmc1rXc2P1mTwHssYv7jyGx5KAACSCH+9B3Bhn6Z9luHRvf7pQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/knip/node_modules/get-tsconfig": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", + "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/knip/node_modules/oxc-parser": { + "version": "0.128.0", + "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.128.0.tgz", + "integrity": "sha512-XkOw3eiIxAgQ19WRew/Bq9wc5Ga/guaWIzDBzq80z1PyuDNGvWBpPby9k6YGwV8A8uMw+Nlq3xqlzuDYmUFYUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "^0.128.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-parser/binding-android-arm-eabi": "0.128.0", + "@oxc-parser/binding-android-arm64": "0.128.0", + "@oxc-parser/binding-darwin-arm64": "0.128.0", + "@oxc-parser/binding-darwin-x64": "0.128.0", + "@oxc-parser/binding-freebsd-x64": "0.128.0", + "@oxc-parser/binding-linux-arm-gnueabihf": "0.128.0", + "@oxc-parser/binding-linux-arm-musleabihf": "0.128.0", + "@oxc-parser/binding-linux-arm64-gnu": "0.128.0", + "@oxc-parser/binding-linux-arm64-musl": "0.128.0", + "@oxc-parser/binding-linux-ppc64-gnu": "0.128.0", + "@oxc-parser/binding-linux-riscv64-gnu": "0.128.0", + "@oxc-parser/binding-linux-riscv64-musl": "0.128.0", + "@oxc-parser/binding-linux-s390x-gnu": "0.128.0", + "@oxc-parser/binding-linux-x64-gnu": "0.128.0", + "@oxc-parser/binding-linux-x64-musl": "0.128.0", + "@oxc-parser/binding-openharmony-arm64": "0.128.0", + "@oxc-parser/binding-wasm32-wasi": "0.128.0", + "@oxc-parser/binding-win32-arm64-msvc": "0.128.0", + "@oxc-parser/binding-win32-ia32-msvc": "0.128.0", + "@oxc-parser/binding-win32-x64-msvc": "0.128.0" + } + }, + "node_modules/knip/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/knip/node_modules/strip-json-comments": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz", + "integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/knip/node_modules/zod": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, "node_modules/known-css-properties": { "version": "0.25.0", "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.25.0.tgz", @@ -23189,6 +24410,23 @@ "dev": true, "license": "MIT" }, + "node_modules/log-symbols": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-7.0.1.tgz", + "integrity": "sha512-ja1E3yCr9i/0hmBVaM0bfwDjnGy8I/s6PP4DFp+yP+a+mrHO4Rm7DtmnqROTUkHIkqffC84YY7AeqX6oFk0WFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-unicode-supported": "^2.0.0", + "yoctocolors": "^2.1.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/log-update": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", @@ -24735,6 +25973,42 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-9.4.0.tgz", + "integrity": "sha512-84cglkRILFxdtA8hAvLNdMrtBpPNBTrQ9/ulg0FA7xLMnD6mifv+enAIeRmvtv+WgdCE+LPGOfQmtJRrVaIVhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.6.2", + "cli-cursor": "^5.0.0", + "cli-spinners": "^3.2.0", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.1.0", + "log-symbols": "^7.0.1", + "stdin-discarder": "^0.3.2", + "string-width": "^8.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -24798,6 +26072,83 @@ "@oxc-parser/binding-win32-x64-msvc": "0.123.0" } }, + "node_modules/oxc-resolver": { + "version": "11.19.1", + "resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.19.1.tgz", + "integrity": "sha512-qE/CIg/spwrTBFt5aKmwe3ifeDdLfA2NESN30E42X/lII5ClF8V7Wt6WIJhcGZjp0/Q+nQ+9vgxGk//xZNX2hg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-resolver/binding-android-arm-eabi": "11.19.1", + "@oxc-resolver/binding-android-arm64": "11.19.1", + "@oxc-resolver/binding-darwin-arm64": "11.19.1", + "@oxc-resolver/binding-darwin-x64": "11.19.1", + "@oxc-resolver/binding-freebsd-x64": "11.19.1", + "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.1", + "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.1", + "@oxc-resolver/binding-linux-arm64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-arm64-musl": "11.19.1", + "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-riscv64-musl": "11.19.1", + "@oxc-resolver/binding-linux-s390x-gnu": "11.19.1", + "@oxc-resolver/binding-linux-x64-gnu": "11.19.1", + "@oxc-resolver/binding-linux-x64-musl": "11.19.1", + "@oxc-resolver/binding-openharmony-arm64": "11.19.1", + "@oxc-resolver/binding-wasm32-wasi": "11.19.1", + "@oxc-resolver/binding-win32-arm64-msvc": "11.19.1", + "@oxc-resolver/binding-win32-ia32-msvc": "11.19.1", + "@oxc-resolver/binding-win32-x64-msvc": "11.19.1" + } + }, + "node_modules/oxlint": { + "version": "1.63.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.63.0.tgz", + "integrity": "sha512-9TGXetdjgIHOJ9OiReomP7nnrMkV9HxC1xM2ramJSLQpzxjsAJtQwa4wqkJN2f/uCrqZuJseFuSlWDdvcruveg==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.63.0", + "@oxlint/binding-android-arm64": "1.63.0", + "@oxlint/binding-darwin-arm64": "1.63.0", + "@oxlint/binding-darwin-x64": "1.63.0", + "@oxlint/binding-freebsd-x64": "1.63.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.63.0", + "@oxlint/binding-linux-arm-musleabihf": "1.63.0", + "@oxlint/binding-linux-arm64-gnu": "1.63.0", + "@oxlint/binding-linux-arm64-musl": "1.63.0", + "@oxlint/binding-linux-ppc64-gnu": "1.63.0", + "@oxlint/binding-linux-riscv64-gnu": "1.63.0", + "@oxlint/binding-linux-riscv64-musl": "1.63.0", + "@oxlint/binding-linux-s390x-gnu": "1.63.0", + "@oxlint/binding-linux-x64-gnu": "1.63.0", + "@oxlint/binding-linux-x64-musl": "1.63.0", + "@oxlint/binding-openharmony-arm64": "1.63.0", + "@oxlint/binding-win32-arm64-msvc": "1.63.0", + "@oxlint/binding-win32-ia32-msvc": "1.63.0", + "@oxlint/binding-win32-x64-msvc": "1.63.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.22.1" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + } + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -26265,6 +27616,20 @@ "dev": true, "license": "MIT" }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -27259,6 +28624,47 @@ "node": ">=0.10.0" } }, + "node_modules/react-doctor": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/react-doctor/-/react-doctor-0.1.3.tgz", + "integrity": "sha512-8PE4lDSzbKf/DJLn4mUQLszFo3YE1tOioP5f3kuPLCHGJJmF4HCwTzCn5mCY+f9/kedEyJc2Kl622HeyBpHZJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-install": "0.0.5", + "commander": "^14.0.3", + "knip": "^6.10.0", + "ora": "^9.4.0", + "oxlint": "^1.63.0", + "picocolors": "^1.1.1", + "prompts": "^2.4.2", + "typescript": ">=5.0.4 <7" + }, + "bin": { + "react-doctor": "bin/react-doctor.js" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "eslint-plugin-react-hooks": "^6 || ^7" + }, + "peerDependenciesMeta": { + "eslint-plugin-react-hooks": { + "optional": true + } + } + }, + "node_modules/react-doctor/node_modules/commander": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz", + "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, "node_modules/react-dom": { "version": "19.2.5", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz", @@ -29062,6 +30468,13 @@ "dev": true, "license": "MIT" }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT" + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -29102,6 +30515,19 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/smol-toml": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz", + "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, "node_modules/sonic-boom": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", @@ -29386,6 +30812,19 @@ "node": ">= 0.8" } }, + "node_modules/stdin-discarder": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.3.2.tgz", + "integrity": "sha512-eCPu1qRxPVkl5605OTWF8Wz40b4Mf45NY5LQmVPQ599knfs5QhASUm9GbJ5BDMDOXgrnh0wyEdvzmL//YMlw0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -30522,6 +31961,36 @@ "node": ">=18" } }, + "node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/titleize": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", @@ -31017,6 +32486,16 @@ "dev": true, "license": "MIT" }, + "node_modules/unbash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unbash/-/unbash-3.0.0.tgz", + "integrity": "sha512-FeFPZ/WFT0mbRCuydiZzpPFlrYN8ZUpphQKoq4EeElVIYjYyGzPMxQR/simUwCOJIyVhpFk4RbtyO7RuMpMnHA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", @@ -31937,6 +33416,16 @@ "node": ">=18" } }, + "node_modules/walk-up-path": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz", + "integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -32374,7 +33863,6 @@ "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==", "dev": true, "license": "ISC", - "optional": true, "bin": { "yaml": "bin.mjs" }, @@ -32462,6 +33950,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/yoctocolors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", + "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", diff --git a/package.json b/package.json index b5ffae9c..b3c07b1b 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "test": "jest", "test:coverage": "jest --coverage", "test:update": "jest -u", + "doctor": "react-doctor .", "tsc": "tsc --noEmit" }, "browserslist": [ @@ -73,6 +74,7 @@ "@umijs/max-plugin-openapi": "^2.0.3", "@umijs/request-record": "^1.1.4", "cross-env": "^10.1.0", + "react-doctor": "^0.1.2", "express": "^5.2.1", "geojson": "^0.5.0", "gh-pages": "^6.3.0", diff --git a/react-doctor.config.json b/react-doctor.config.json new file mode 100644 index 00000000..0b6399a1 --- /dev/null +++ b/react-doctor.config.json @@ -0,0 +1,21 @@ +{ + "ignore": { + "files": [ + "config/**", + "mock/**", + "public/**", + "scripts/**", + "types/**", + "cloudflare-worker/**", + "src/.umi*/**", + "src/services/**", + "src/service-worker.js", + "**/_mock.ts", + "**/*.md", + "**/*.less", + "**/*.css" + ] + }, + "failOn": "error", + "adoptExistingLintConfig": true +} \ No newline at end of file diff --git a/src/components/AvatarList/index.tsx b/src/components/AvatarList/index.tsx index f6f8eba3..36f3b33b 100644 --- a/src/components/AvatarList/index.tsx +++ b/src/components/AvatarList/index.tsx @@ -40,7 +40,17 @@ const Item: React.FC = ({ const { styles } = useStyles(); const cls = avatarSizeToClassName(styles, size); return ( -
  • +
  • { + if (e.key === 'Enter') onClick(); + } + : undefined + } + > {tips ? ( { - const [isOnline, setIsOnline] = useState( - typeof navigator !== 'undefined' ? navigator.onLine : true, - ); + const isOnlineRef = useRef(true); + const [, forceUpdate] = useState(0); useEffect(() => { - const handleOnline = () => setIsOnline(true); - const handleOffline = () => setIsOnline(false); + isOnlineRef.current = navigator.onLine; + forceUpdate((n) => n + 1); + const handleOnline = () => { + isOnlineRef.current = true; + forceUpdate((n: number) => n + 1); + }; + const handleOffline = () => { + isOnlineRef.current = false; + forceUpdate((n: number) => n + 1); + }; window.addEventListener('online', handleOnline); window.addEventListener('offline', handleOffline); return () => { @@ -18,7 +25,7 @@ const OfflineBanner: React.FC = () => { }; }, []); - if (isOnline) return null; + if (isOnlineRef.current) return null; return ( { top: 8, left: '50%', transform: 'translateX(-50%)', - zIndex: 999, + zIndex: 10, maxWidth: 480, }} message={getIntl().formatMessage({ diff --git a/src/components/RightContent/AvatarDropdown.tsx b/src/components/RightContent/AvatarDropdown.tsx index fbc587e3..d8e6fb0b 100644 --- a/src/components/RightContent/AvatarDropdown.tsx +++ b/src/components/RightContent/AvatarDropdown.tsx @@ -6,12 +6,11 @@ import { import { history, useModel } from '@umijs/max'; import type { MenuProps } from 'antd'; import { Spin } from 'antd'; -import React from 'react'; -import { flushSync } from 'react-dom'; +import React, { startTransition } from 'react'; import { outLogin } from '@/services/ant-design-pro/api'; import HeaderDropdown from '../HeaderDropdown'; -export type GlobalHeaderRightProps = { +type GlobalHeaderRightProps = { children?: React.ReactNode; }; @@ -38,7 +37,7 @@ export const AvatarDropdown: React.FC = ({ const onMenuClick: MenuProps['onClick'] = (event) => { const { key } = event; if (key === 'logout') { - flushSync(() => { + startTransition(() => { setInitialState((s) => ({ ...s, currentUser: undefined })); }); loginOut(); diff --git a/src/components/TagSelect/index.tsx b/src/components/TagSelect/index.tsx index 4b4a7b4f..c2b319e7 100644 --- a/src/components/TagSelect/index.tsx +++ b/src/components/TagSelect/index.tsx @@ -6,7 +6,7 @@ import React, { type FC, useMemo, useState } from 'react'; import useStyles from './index.style'; const { CheckableTag } = Tag; -export interface TagSelectOptionProps { +interface TagSelectOptionProps { value: string | number; style?: React.CSSProperties; checked?: boolean; @@ -32,7 +32,7 @@ type TagSelectOptionElement = React.ReactElement< typeof TagSelectOption >; -export interface TagSelectProps { +interface TagSelectProps { onChange?: (value: (string | number)[]) => void; expandable?: boolean; value?: (string | number)[]; @@ -81,9 +81,10 @@ const TagSelect: FC & { const childrenArray = React.Children.toArray( children, ) as TagSelectOptionElement[]; - return childrenArray - .filter((child) => isTagSelectOption(child)) - .map((child) => child.props.value); + return childrenArray.reduce<(string | number)[]>((acc, child) => { + if (isTagSelectOption(child)) acc.push(child.props.value); + return acc; + }, []); }, [children]); // Use Set for O(1) lookups @@ -137,9 +138,17 @@ const TagSelect: FC & { {expandable && ( { + href="#" + onClick={(e) => { + e.preventDefault(); setExpand(!expand); }} + onKeyDown={(e) => { + if (e.key === 'Enter') { + e.preventDefault(); + setExpand(!expand); + } + }} > {expand ? ( <> diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx index d4589075..7e9527ca 100644 --- a/src/pages/Welcome.tsx +++ b/src/pages/Welcome.tsx @@ -23,12 +23,12 @@ const InfoCard: React.FC = ({ title, index, desc, href }) => (
    -
    +
    {index}

    {title}

    -

    {desc}

    +

    {desc}

    diff --git a/src/pages/account/center/components/Applications/index.tsx b/src/pages/account/center/components/Applications/index.tsx index b7100e42..5a3490f2 100644 --- a/src/pages/account/center/components/Applications/index.tsx +++ b/src/pages/account/center/components/Applications/index.tsx @@ -12,7 +12,7 @@ import type { ListItemDataType } from '../../data.d'; import { queryFakeList } from '../../service'; import useStyles from './index.style'; -export function formatWan(val: number) { +function formatWan(val: number) { const v = val * 1; if (!v || Number.isNaN(v)) return ''; let result: React.ReactNode = val; diff --git a/src/pages/account/center/components/Projects/index.tsx b/src/pages/account/center/components/Projects/index.tsx index 00530efe..36067b89 100644 --- a/src/pages/account/center/components/Projects/index.tsx +++ b/src/pages/account/center/components/Projects/index.tsx @@ -36,7 +36,7 @@ const Projects: React.FC = () => { cover={{item.title}} > {item.title}
    } + title={{item.title}} description={item.subDescription} />
    diff --git a/src/pages/account/center/index.tsx b/src/pages/account/center/index.tsx index bf1131ea..f4c7da09 100644 --- a/src/pages/account/center/index.tsx +++ b/src/pages/account/center/index.tsx @@ -141,6 +141,68 @@ const TagList: React.FC<{
    ); }; +const UserInfo: React.FC<{ user: Partial }> = ({ user }) => { + const { styles } = useStyles(); + return ( +
    +

    + + {user.title} +

    +

    + + {user.group} +

    +

    + + { + ( + user.geographic || { + province: { + label: '', + }, + } + ).province.label + } + { + ( + user.geographic || { + city: { + label: '', + }, + } + ).city.label + } +

    +
    + ); +}; + +const TabContent: React.FC<{ tabValue: tabKeyType }> = ({ tabValue }) => { + if (tabValue === 'projects') { + return ; + } + if (tabValue === 'applications') { + return ; + } + if (tabValue === 'articles') { + return ; + } + return null; +}; + const Center: React.FC = () => { const { styles } = useStyles(); const [tabKey, setTabKey] = useState('articles'); @@ -151,72 +213,6 @@ const Center: React.FC = () => { queryFn: () => queryCurrent().then((res) => res.data), }); - // 渲染用户信息 - const renderUserInfo = ({ - title, - group, - geographic, - }: Partial) => { - return ( -
    -

    - - {title} -

    -

    - - {group} -

    -

    - - { - ( - geographic || { - province: { - label: '', - }, - } - ).province.label - } - { - ( - geographic || { - city: { - label: '', - }, - } - ).city.label - } -

    -
    - ); - }; - - // 渲染tab切换 - const renderChildrenByTabKey = (tabValue: tabKeyType) => { - if (tabValue === 'projects') { - return ; - } - if (tabValue === 'applications') { - return ; - } - if (tabValue === 'articles') { - return ; - } - return null; - }; return ( @@ -235,7 +231,7 @@ const Center: React.FC = () => {
    {currentUser.name}
    {currentUser?.signature}
    - {renderUserInfo(currentUser)} + { setTabKey(_tabKey as tabKeyType); }} > - {renderChildrenByTabKey(tabKey)} + diff --git a/src/pages/account/settings/components/binding.tsx b/src/pages/account/settings/components/binding.tsx index 4e2d1301..10aad1ca 100644 --- a/src/pages/account/settings/components/binding.tsx +++ b/src/pages/account/settings/components/binding.tsx @@ -11,19 +11,31 @@ const BindingView: React.FC = () => { { title: '绑定淘宝', description: '当前未绑定淘宝账号', - actions: [绑定], + actions: [ + + 绑定 + , + ], avatar: , }, { title: '绑定支付宝', description: '当前未绑定支付宝账号', - actions: [绑定], + actions: [ + + 绑定 + , + ], avatar: , }, { title: '绑定钉钉', description: '当前未绑定钉钉账号', - actions: [绑定], + actions: [ + + 绑定 + , + ], avatar: , }, ]; diff --git a/src/pages/account/settings/components/notification.tsx b/src/pages/account/settings/components/notification.tsx index 85d42d7f..a567e660 100644 --- a/src/pages/account/settings/components/notification.tsx +++ b/src/pages/account/settings/components/notification.tsx @@ -3,11 +3,12 @@ import React from 'react'; type Unpacked = T extends (infer U)[] ? U : T; +const Action = ( + +); + const NotificationView: React.FC = () => { const getData = () => { - const Action = ( - - ); return [ { title: '用户消息', diff --git a/src/pages/account/settings/components/security.tsx b/src/pages/account/settings/components/security.tsx index 97a7436e..d5c6398f 100644 --- a/src/pages/account/settings/components/security.tsx +++ b/src/pages/account/settings/components/security.tsx @@ -19,27 +19,47 @@ const SecurityView: React.FC = () => { {passwordStrength.strong} ), - actions: [修改], + actions: [ + + 修改 + , + ], }, { title: '密保手机', description: `已绑定手机:138****8293`, - actions: [修改], + actions: [ + + 修改 + , + ], }, { title: '密保问题', description: '未设置密保问题,密保问题可有效保护账户安全', - actions: [设置], + actions: [ + + 设置 + , + ], }, { title: '备用邮箱', description: `已绑定邮箱:ant***sign.com`, - actions: [修改], + actions: [ + + 修改 + , + ], }, { title: 'MFA 设备', description: '未绑定 MFA 设备,绑定后,可以进行二次确认', - actions: [绑定], + actions: [ + + 绑定 + , + ], }, ]; diff --git a/src/pages/account/settings/index.tsx b/src/pages/account/settings/index.tsx index fc59fbf2..e6242bf3 100644 --- a/src/pages/account/settings/index.tsx +++ b/src/pages/account/settings/index.tsx @@ -1,6 +1,6 @@ import { GridContent } from '@ant-design/pro-components'; import { Menu } from 'antd'; -import React, { useCallback, useLayoutEffect, useRef, useState } from 'react'; +import React, { useLayoutEffect, useRef, useState } from 'react'; import BaseView from './components/base'; import BindingView from './components/binding'; import NotificationView from './components/notification'; @@ -12,6 +12,24 @@ type SettingsState = { mode: 'inline' | 'horizontal'; selectKey: SettingsStateKeys; }; + +const SettingsContent: React.FC<{ selectKey: SettingsStateKeys }> = ({ + selectKey, +}) => { + switch (selectKey) { + case 'base': + return ; + case 'security': + return ; + case 'binding': + return ; + case 'notification': + return ; + default: + return null; + } +}; + const Settings: React.FC = () => { const { styles } = useStyles(); const menuMap: Record = { @@ -26,7 +44,7 @@ const Settings: React.FC = () => { }); const dom = useRef(null); - const resize = useCallback(() => { + const resize = () => { requestAnimationFrame(() => { if (!dom.current) { return; @@ -44,36 +62,25 @@ const Settings: React.FC = () => { mode: mode as SettingsState['mode'], })); }); - }, []); + }; + + const resizeRef = useRef(resize); + resizeRef.current = resize; useLayoutEffect(() => { - window.addEventListener('resize', resize); - resize(); + const handler = () => resizeRef.current(); + window.addEventListener('resize', handler); + handler(); return () => { - window.removeEventListener('resize', resize); + window.removeEventListener('resize', handler); }; - }, [resize]); + }, []); const getMenu = () => { return Object.keys(menuMap).map((item) => ({ key: item, label: menuMap[item], })); }; - const renderChildren = () => { - const { selectKey } = initConfig; - switch (selectKey) { - case 'base': - return ; - case 'security': - return ; - case 'binding': - return ; - case 'notification': - return ; - default: - return null; - } - }; return (
    { mode={initConfig.mode} selectedKeys={[initConfig.selectKey]} onClick={({ key }) => { - setInitConfig({ - ...initConfig, + setInitConfig((prev) => ({ + ...prev, selectKey: key as SettingsStateKeys, - }); + })); }} items={getMenu()} />
    {menuMap[initConfig.selectKey]}
    - {renderChildren()} +
    diff --git a/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx b/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx index 421a2639..f614cd7d 100644 --- a/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx +++ b/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx @@ -7,7 +7,7 @@ import useStyles from './index.style'; type totalType = () => React.ReactNode; -export type ChartCardProps = { +type ChartCardProps = { title: React.ReactNode; action?: React.ReactNode; total?: React.ReactNode | number | (() => React.ReactNode | number); @@ -17,80 +17,76 @@ export type ChartCardProps = { style?: React.CSSProperties; } & CardProps; -const ChartCard: React.FC = (props) => { - const { styles } = useStyles(); - const renderTotal = (total?: number | totalType | React.ReactNode) => { - if (!total && total !== 0) { +const ChartCardTotal: React.FC<{ + total?: number | totalType | React.ReactNode; + totalClassName: string; +}> = ({ total, totalClassName }) => { + if (!total && total !== 0) { + return null; + } + switch (typeof total) { + case 'undefined': return null; - } - let totalDom: React.ReactNode | null = null; - switch (typeof total) { - case 'undefined': - totalDom = null; - break; - case 'function': - totalDom =
    {total()}
    ; - break; - default: - totalDom =
    {total}
    ; - } - return totalDom; - }; - const renderContent = () => { - const { - contentHeight, - title, - avatar, - action, - total, - footer, - children, - loading, - } = props; - if (loading) { - return false; - } - return ( -
    -
    -
    {avatar}
    -
    -
    - {title} - {action} -
    - {renderTotal(total)} -
    + case 'function': + return
    {total()}
    ; + default: + return
    {total}
    ; + } +}; + +const ChartCardContent: React.FC< + ChartCardProps & { styles: Record } +> = ({ + contentHeight, + title, + avatar, + action, + total, + footer, + children, + styles, +}) => ( +
    +
    +
    {avatar}
    +
    +
    + {title} + {action}
    - {children && ( -
    -
    - {children} -
    -
    - )} - {footer && ( -
    - {footer} -
    - )} +
    - ); - }; +
    + {children && ( +
    +
    + {children} +
    +
    + )} + {footer && ( +
    + {footer} +
    + )} +
    +); +const ChartCard: React.FC = (props) => { + const { styles } = useStyles(); const { loading = false, ...rest } = props; const cardProps = omit(rest, ['total', 'contentHeight', 'action']); return ( @@ -103,7 +99,7 @@ const ChartCard: React.FC = (props) => { }} {...cardProps} > - {renderContent()} + {loading ? false : } ); }; diff --git a/src/pages/dashboard/analysis/components/Trend/index.tsx b/src/pages/dashboard/analysis/components/Trend/index.tsx index 930e3e28..3c712940 100644 --- a/src/pages/dashboard/analysis/components/Trend/index.tsx +++ b/src/pages/dashboard/analysis/components/Trend/index.tsx @@ -3,13 +3,14 @@ import { clsx } from 'clsx'; import React from 'react'; import useStyles from './index.style'; -export type TrendProps = { +type TrendProps = { colorful?: boolean; flag: 'up' | 'down'; style?: React.CSSProperties; reverseColor?: boolean; className?: string; children?: React.ReactNode; + title?: string; }; const Trend: React.FC = ({ @@ -18,6 +19,7 @@ const Trend: React.FC = ({ flag, children, className, + title = '', ...rest }) => { const { styles } = useStyles(); @@ -30,11 +32,7 @@ const Trend: React.FC = ({ className, ); return ( -
    +
    {children} {flag && ( diff --git a/src/pages/dashboard/monitor/components/ActiveChart/index.tsx b/src/pages/dashboard/monitor/components/ActiveChart/index.tsx index 1a6197de..1f6ea808 100644 --- a/src/pages/dashboard/monitor/components/ActiveChart/index.tsx +++ b/src/pages/dashboard/monitor/components/ActiveChart/index.tsx @@ -38,7 +38,7 @@ const ActiveChart = () => { // Memoize max and median to avoid double sort on every render const { maxValue, medianValue } = useMemo(() => { if (!activeData.length) return { maxValue: 0, medianValue: 0 }; - const sorted = [...activeData].sort((a, b) => a.y - b.y); + const sorted = activeData.toSorted((a, b) => a.y - b.y); return { maxValue: sorted[sorted.length - 1]?.y ?? 0, medianValue: sorted[Math.floor(sorted.length / 2)]?.y ?? 0, diff --git a/src/pages/dashboard/monitor/components/Map/index.style.ts b/src/pages/dashboard/monitor/components/Map/index.style.ts new file mode 100644 index 00000000..f6fb72dd --- /dev/null +++ b/src/pages/dashboard/monitor/components/Map/index.style.ts @@ -0,0 +1,20 @@ +import { createStyles } from 'antd-style'; + +const useStyles = createStyles({ + tooltip: { + position: 'absolute', + background: '#fff', + color: '#334155', + padding: '8px 12px', + borderRadius: '8px', + fontSize: '12px', + border: '1px solid #e2e8f0', + boxShadow: '0 2px 8px rgba(0,0,0,0.08)', + pointerEvents: 'none', + opacity: 0, + transition: 'opacity 0.2s', + zIndex: 10, + }, +}); + +export default useStyles; diff --git a/src/pages/dashboard/monitor/components/Map/index.tsx b/src/pages/dashboard/monitor/components/Map/index.tsx index 30a9effd..81818a1f 100644 --- a/src/pages/dashboard/monitor/components/Map/index.tsx +++ b/src/pages/dashboard/monitor/components/Map/index.tsx @@ -4,6 +4,7 @@ import * as d3 from 'd3'; import type { Feature, FeatureCollection, Geometry } from 'geojson'; import { useEffect, useMemo, useRef } from 'react'; import { feature } from 'topojson-client'; +import useStyles from './index.style'; const DATA_COLORS = [ '#ede9fe', @@ -103,6 +104,7 @@ function buildLandBitmap( } export default function MonitorMap() { + const { styles } = useStyles(); const svgRef = useRef(null); const tooltipRef = useRef(null); @@ -284,8 +286,10 @@ export default function MonitorMap() { .on('mousemove', (event) => { if (tooltipRef.current) { const [x, y] = d3.pointer(event, svgRef.current); - tooltipRef.current.style.left = `${x + 12}px`; - tooltipRef.current.style.top = `${y - 12}px`; + Object.assign(tooltipRef.current.style, { + left: `${x + 12}px`, + top: `${y - 12}px`, + }); } }) .on('mouseleave', function (_event, d) { @@ -374,23 +378,7 @@ export default function MonitorMap() { borderRadius: 8, }} /> -
    +
    ); } diff --git a/src/pages/dashboard/workplace/index.tsx b/src/pages/dashboard/workplace/index.tsx index 748b3764..891a25ff 100644 --- a/src/pages/dashboard/workplace/index.tsx +++ b/src/pages/dashboard/workplace/index.tsx @@ -118,7 +118,9 @@ const Workplace: FC = () => { avatar={} title={ - {item.user.name} + + {item.user.name} +   {events} @@ -279,7 +281,7 @@ const Workplace: FC = () => { {projectNotice.map((item) => { return ( - + {item.member.substring(0, 3)} diff --git a/src/pages/form/advanced-form/index.tsx b/src/pages/form/advanced-form/index.tsx index 9553cc04..a3e4c391 100644 --- a/src/pages/form/advanced-form/index.tsx +++ b/src/pages/form/advanced-form/index.tsx @@ -12,7 +12,7 @@ import { } from '@ant-design/pro-components'; import { Card, Col, message, Popover, Row } from 'antd'; import type { FC } from 'react'; -import { useState } from 'react'; +import { useRef, useState } from 'react'; import { fakeSubmitForm } from './service'; import useStyles from './style.style'; @@ -66,6 +66,7 @@ interface ErrorField { const AdvancedForm: FC> = () => { const { styles } = useStyles(); const [error, setError] = useState([]); + const keyCounter = useRef(0); const getErrorInfo = (errors: ErrorField[]) => { const errorCount = errors.filter((item) => item.errors.length > 0).length; if (!errors || errorCount === 0) { @@ -89,15 +90,16 @@ const AdvancedForm: FC> = () => { | 'dateRange' | 'type'; return ( -
  • scrollToField(key)} >
    {err.errors[0]}
    {fieldLabels[key]}
    -
  • + ); }); return ( @@ -161,7 +163,9 @@ const AdvancedForm: FC> = () => { return [ { + href="#" + onClick={(e) => { + e.preventDefault(); action?.startEditable(record.key); }} > @@ -534,8 +538,9 @@ const AdvancedForm: FC> = () => { recordCreatorProps={{ record: () => { + keyCounter.current += 1; return { - key: `0${Date.now()}`, + key: `new-${keyCounter.current}`, }; }, }} diff --git a/src/pages/form/basic-form/index.tsx b/src/pages/form/basic-form/index.tsx index 1135f5b5..043071d3 100644 --- a/src/pages/form/basic-form/index.tsx +++ b/src/pages/form/basic-form/index.tsx @@ -9,7 +9,7 @@ import { ProFormText, ProFormTextArea, } from '@ant-design/pro-components'; -import { useMutation } from '@tanstack/react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { Card, message } from 'antd'; import type { FC } from 'react'; import { fakeSubmitForm } from './service'; @@ -17,10 +17,12 @@ import useStyles from './style.style'; const BasicForm: FC> = () => { const { styles } = useStyles(); + const queryClient = useQueryClient(); const { mutate: run } = useMutation({ mutationFn: fakeSubmitForm, onSuccess: () => { message.success('提交成功'); + queryClient.invalidateQueries({ queryKey: ['basic-form'] }); }, }); const onFinish = async (values: Record) => { diff --git a/src/pages/list/basic-list/index.tsx b/src/pages/list/basic-list/index.tsx index 80658fa6..3416b23f 100644 --- a/src/pages/list/basic-list/index.tsx +++ b/src/pages/list/basic-list/index.tsx @@ -1,6 +1,6 @@ import { DownOutlined, PlusOutlined } from '@ant-design/icons'; import { PageContainer } from '@ant-design/pro-components'; -import { useMutation, useQuery } from '@tanstack/react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { Avatar, Button, @@ -71,7 +71,7 @@ const ListContent = ({ ); }; -export const BasicList: FC = () => { +const BasicList: FC = () => { const { styles } = useStyles(); const [done, setDone] = useState(false); const [open, setVisible] = useState(false); @@ -83,6 +83,7 @@ export const BasicList: FC = () => { queryFn: () => queryFakeList({ count: 50 }).then((res) => res.data), }); + const queryClient = useQueryClient(); const { mutate: postRun } = useMutation({ mutationFn: async ({ method, params }: { method: string; params: any }) => { if (method === 'remove') { @@ -93,6 +94,9 @@ export const BasicList: FC = () => { } return addFakeList(params); }, + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ['basic-list'] }); + }, }); // Wrapper to handle the original calling convention @@ -167,7 +171,7 @@ export const BasicList: FC = () => { ], }} > - + 更多 @@ -227,6 +231,7 @@ export const BasicList: FC = () => { actions={[ { e.preventDefault(); showEditModal(item); diff --git a/src/pages/list/card-list/index.tsx b/src/pages/list/card-list/index.tsx index f450c911..bdeae33d 100644 --- a/src/pages/list/card-list/index.tsx +++ b/src/pages/list/card-list/index.tsx @@ -22,21 +22,21 @@ const CardList = () => { 提供跨越设计与开发的体验解决方案。

    - + {' '} 快速开始 - + {' '} 产品简介 - + { hoverable className={styles.card} actions={[ - 操作一, - 操作二, + + 操作一 + , + + 操作二 + , ]} > { src={item.avatar} /> } - title={{item.title}} + title={{item.title}} description={ ); }; -export const Applications: FC> = () => { +const Applications: FC> = () => { const { styles } = useStyles(); const { data, diff --git a/src/pages/list/search/articles/index.tsx b/src/pages/list/search/articles/index.tsx index 0cc8a04f..328ce5bd 100644 --- a/src/pages/list/search/articles/index.tsx +++ b/src/pages/list/search/articles/index.tsx @@ -183,7 +183,20 @@ const Articles: FC = () => { options={ownerOptions} /> - + { + e.preventDefault(); + setOwner(); + }} + onKeyDown={(e) => { + if (e.key === 'Enter') { + e.preventDefault(); + setOwner(); + } + }} + > 只看自己的 diff --git a/src/pages/list/search/projects/index.tsx b/src/pages/list/search/projects/index.tsx index 066ce182..b9116cb7 100644 --- a/src/pages/list/search/projects/index.tsx +++ b/src/pages/list/search/projects/index.tsx @@ -50,7 +50,7 @@ const Projects: FC = () => { cover={{item.title}} > {item.title}} + title={{item.title}} description={ 12421 }, + { key: '4', label: '关联单据', children: 12421 }, { key: '5', label: '生效日期', children: '2017-07-07 ~ 2017-08-08' }, { key: '6', label: '备注', children: '请于两个工作日内确认' }, ]; @@ -305,7 +305,7 @@ const Advanced: FC = () => { }} />
    ); diff --git a/src/pages/result/fail/index.tsx b/src/pages/result/fail/index.tsx index fed1ec75..5c924358 100644 --- a/src/pages/result/fail/index.tsx +++ b/src/pages/result/fail/index.tsx @@ -23,6 +23,7 @@ export default () => { /> 您的账户已被冻结 { /> 您的账户还不具备申请资格 + + + + +); + const Success: React.FC = () => { const { styles } = useStyles(); const desc1 = ( @@ -42,7 +51,7 @@ const Success: React.FC = () => { }} > 周毛毛 - + { /> ); - const extra = ( - <> - - - - - ); return ( = (props) => { const { reload } = props; const [messageApi, contextHolder] = message.useMessage(); + const queryClient = useQueryClient(); /** * @en-US International configuration * @zh-CN 国际化配置 @@ -29,6 +30,7 @@ const CreateForm: FC = (props) => { mutationFn: addRule, onSuccess: () => { messageApi.success('Added successfully'); + queryClient.invalidateQueries({ queryKey: ['rule'] }); reload?.(); }, onError: () => { diff --git a/src/pages/table-list/components/UpdateForm.tsx b/src/pages/table-list/components/UpdateForm.tsx index c172ac60..731875a3 100644 --- a/src/pages/table-list/components/UpdateForm.tsx +++ b/src/pages/table-list/components/UpdateForm.tsx @@ -6,13 +6,13 @@ import { ProFormTextArea, StepsForm, } from '@ant-design/pro-components'; -import { useMutation } from '@tanstack/react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { FormattedMessage, useIntl } from '@umijs/max'; import { Modal, message } from 'antd'; import React, { cloneElement, useCallback, useState } from 'react'; import { updateRule } from '@/services/ant-design-pro/api'; -export type FormValueType = { +type FormValueType = { target?: string; template?: string; type?: string; @@ -20,7 +20,7 @@ export type FormValueType = { frequency?: string; } & Partial; -export type UpdateFormProps = { +type UpdateFormProps = { trigger?: React.ReactElement; onOk?: () => void; values: Partial; @@ -30,6 +30,7 @@ const UpdateForm: React.FC = (props) => { const { onOk, values, trigger } = props; const intl = useIntl(); + const queryClient = useQueryClient(); const [open, setOpen] = useState(false); @@ -39,6 +40,7 @@ const UpdateForm: React.FC = (props) => { mutationFn: updateRule, onSuccess: () => { messageApi.success('Configuration is successful'); + queryClient.invalidateQueries({ queryKey: ['rule'] }); onOk?.(); }, onError: () => { diff --git a/src/pages/table-list/index.tsx b/src/pages/table-list/index.tsx index 1be74a60..b1459967 100644 --- a/src/pages/table-list/index.tsx +++ b/src/pages/table-list/index.tsx @@ -9,7 +9,7 @@ import { ProDescriptions, ProTable, } from '@ant-design/pro-components'; -import { useMutation } from '@tanstack/react-query'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; import { FormattedMessage, useIntl } from '@umijs/max'; import { Button, Drawer, type FormInstance, Input, message } from 'antd'; import React, { useCallback, useRef, useState } from 'react'; @@ -19,6 +19,7 @@ import UpdateForm from './components/UpdateForm'; const TableList: React.FC = () => { const actionRef = useRef(null); + const queryClient = useQueryClient(); const [showDetail, setShowDetail] = useState(false); const [currentRow, setCurrentRow] = useState(); @@ -37,6 +38,7 @@ const TableList: React.FC = () => { onSuccess: () => { setSelectedRows([]); actionRef.current?.reloadAndRest?.(); + queryClient.invalidateQueries({ queryKey: ['rule'] }); messageApi.success('Deleted successfully and will refresh soon'); }, @@ -57,7 +59,9 @@ const TableList: React.FC = () => { render: (dom, entity) => { return ( { + href="#" + onClick={(e) => { + e.preventDefault(); setCurrentRow(entity); setShowDetail(true); }} @@ -193,7 +197,7 @@ const TableList: React.FC = () => { render: (_, record) => [ + { id="pages.searchTable.chosen" defaultMessage="Chosen" />{' '} - {selectedRowsState.length}{' '} + + {selectedRowsState.length} + {' '} Forgot Password ? @@ -935,6 +936,7 @@ exports[`Login Page should show login form 1`] = ` Forgot Password ? diff --git a/src/pages/user/login/index.tsx b/src/pages/user/login/index.tsx index 07d80026..ed200e96 100644 --- a/src/pages/user/login/index.tsx +++ b/src/pages/user/login/index.tsx @@ -21,8 +21,7 @@ import { } from '@umijs/max'; import { Alert, App, Tabs } from 'antd'; import { createStyles } from 'antd-style'; -import React, { useState } from 'react'; -import { flushSync } from 'react-dom'; +import React, { startTransition, useState } from 'react'; import { Footer } from '@/components'; import { login } from '@/services/ant-design-pro/api'; import { getFakeCaptcha } from '@/services/ant-design-pro/login'; @@ -142,7 +141,7 @@ const Login: React.FC = () => { const fetchUserInfo = async () => { const userInfo = await initialState?.fetchUserInfo?.(); if (userInfo) { - flushSync(() => { + startTransition(() => { setInitialState((s) => ({ ...s, currentUser: userInfo, @@ -399,6 +398,7 @@ const Login: React.FC = () => { /> > = () => { const actions = (
    - +