Compare commits

...

30 Commits

Author SHA1 Message Date
c11c3cf226 fix mermaid
Some checks are pending
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Waiting to run
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Waiting to run
2026-05-07 03:42:38 -06:00
c5a367622c revert
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 02:39:29 -06:00
4ecd7bb229 fix3
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 02:27:09 -06:00
73884a075b fix again
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 02:16:02 -06:00
ecb91f5ca8 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 01:56:10 -06:00
7d8eff4ee8 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 01:46:43 -06:00
67a44d7637 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 00:48:16 -06:00
b05423bd89 test
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 00:34:52 -06:00
99603ce87e update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 00:21:21 -06:00
4c9d379d0c test
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-07 00:12:31 -06:00
da75f50798 styling mermaid
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-06 21:36:20 -06:00
ed3e9322b2 update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-06 20:39:08 -06:00
97917164ea update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-05 09:54:52 -06:00
59f3747496 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-05 07:27:06 -06:00
86cc5cc500 fix 2026-05-05 07:26:47 -06:00
e8b9a190ec fix update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-05 07:23:40 -06:00
507d77a576 fix in mobile
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-05 05:53:59 -06:00
22b9405ed2 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-04 11:06:25 -06:00
711c446f74 update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-04 11:00:07 -06:00
e6e4d71b1c fix UI
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-03 10:22:03 -06:00
6ae879ba80 update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-05-02 09:11:00 -06:00
9137a12dc9 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-04-27 04:07:09 -06:00
f4b9f34ec8 fix
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-04-27 03:56:16 -06:00
0ca1a142a4 fix: use mcqAnswer.value in template delete handler
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-04-24 02:06:38 -06:00
5c9972315c feat: update exercise manager to support multi-answer checkboxes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 02:04:07 -06:00
9afb57a9ed feat: rewrite ExerciseMcq for multi-select with partial feedback 2026-04-24 02:01:35 -06:00
21a3ff322b feat: update ExerciseMcqData.answer type to number[] 2026-04-24 02:00:38 -06:00
942ff0a739 update
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
Co-authored-by: Copilot <copilot@github.com>
2026-04-23 18:24:15 -06:00
30f71c5db2 add fills
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
2026-04-23 13:48:36 -06:00
f00dab9c6d fix: address code review issues in interactive exercises
Some checks failed
Deploy / deploy (build, debian, 22, /root/OJDeploy/data/clientnext) (push) Has been cancelled
Deploy / deploy (build:staging, school, 8822, /root/OJ/data/dist) (push) Has been cancelled
- ExerciseSort: replace unbounded shuffle recursion with deterministic swap
- ExerciseManager: add sortQuestion field so sort exercises have custom questions
- index.vue: use Promise.allSettled so exercise fetch failure doesn't break lesson content
- ExerciseManager: guard mcqAnswer index after option deletion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 06:35:45 -06:00
39 changed files with 1110 additions and 544 deletions

1
.browserslistrc Normal file
View File

@@ -0,0 +1 @@
chrome >= 90

View File

@@ -29,7 +29,7 @@ jobs:
with: with:
node-version: 24 node-version: 24
cache: npm cache: npm
- run: npm ci - run: npm install
- run: npm run ${{ matrix.build_command }} - run: npm run ${{ matrix.build_command }}
env: env:
CI: false CI: false

465
package-lock.json generated
View File

@@ -8,7 +8,7 @@
"name": "oj-next", "name": "oj-next",
"version": "1.8.0", "version": "1.8.0",
"dependencies": { "dependencies": {
"@codemirror/autocomplete": "^6.20.1", "@codemirror/autocomplete": "^6.20.2",
"@codemirror/lang-cpp": "^6.0.3", "@codemirror/lang-cpp": "^6.0.3",
"@codemirror/lang-python": "^6.2.1", "@codemirror/lang-python": "^6.2.1",
"@vue-flow/background": "^1.3.2", "@vue-flow/background": "^1.3.2",
@@ -17,11 +17,11 @@
"@vue-flow/minimap": "^1.5.4", "@vue-flow/minimap": "^1.5.4",
"@vue-flow/node-resizer": "^1.5.1", "@vue-flow/node-resizer": "^1.5.1",
"@vue-flow/node-toolbar": "^1.1.1", "@vue-flow/node-toolbar": "^1.1.1",
"@vueuse/core": "^14.2.1", "@vueuse/core": "^14.3.0",
"@vueuse/router": "^14.2.1", "@vueuse/router": "^14.3.0",
"@wangeditor-next/editor": "^5.7.0", "@wangeditor-next/editor": "^5.7.0",
"@wangeditor-next/editor-for-vue": "^5.1.14", "@wangeditor-next/editor-for-vue": "^5.1.14",
"axios": "^1.15.0", "axios": "^1.16.0",
"canvas-confetti": "^1.9.4", "canvas-confetti": "^1.9.4",
"chart.js": "^4.5.1", "chart.js": "^4.5.1",
"codemirror": "^6.0.2", "codemirror": "^6.0.2",
@@ -29,29 +29,30 @@
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"fflate": "^0.8.2", "fflate": "^0.8.2",
"highlight.js": "^11.11.1", "highlight.js": "^11.11.1",
"md-editor-v3": "^6.4.2", "md-editor-v3": "^6.5.0",
"mermaid": "^11.14.0", "mermaid": "^11.14.0",
"naive-ui": "^2.44.1", "naive-ui": "^2.44.1",
"nanoid": "^5.1.7", "nanoid": "^5.1.11",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"pinia": "^3.0.4", "pinia": "^3.0.4",
"skulpt": "^1.2.0", "skulpt": "^1.2.0",
"vue": "^3.5.32", "vue": "^3.5.34",
"vue-chartjs": "^5.3.3", "vue-chartjs": "^5.3.3",
"vue-codemirror": "^6.1.1", "vue-codemirror": "^6.1.1",
"vue-router": "^5.0.4", "vue-router": "^5.0.6",
"y-codemirror.next": "^0.3.5", "y-codemirror.next": "^0.3.5",
"y-webrtc": "^10.3.0", "y-webrtc": "^10.3.0",
"yjs": "^13.6.30" "yjs": "^13.6.30"
}, },
"devDependencies": { "devDependencies": {
"@iconify/vue": "^5.0.0", "@iconify/vue": "^5.0.1",
"@rsbuild/core": "^1.7.5", "@rsbuild/core": "^1.7.5",
"@rsbuild/plugin-vue": "^1.2.7", "@rsbuild/plugin-vue": "^1.2.7",
"@types/canvas-confetti": "^1.9.0", "@types/canvas-confetti": "^1.9.0",
"@types/node": "^25.6.0", "@types/node": "^25.6.0",
"prettier": "^3.8.2", "@vue/tsconfig": "^0.9.1",
"typescript": "^6.0.2", "prettier": "^3.8.3",
"typescript": "^6.0.3",
"unplugin-auto-import": "^21.0.0", "unplugin-auto-import": "^21.0.0",
"unplugin-vue-components": "^32.0.0" "unplugin-vue-components": "^32.0.0"
} }
@@ -113,9 +114,9 @@
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.29.2", "version": "7.29.3",
"resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.29.2.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.3.tgz",
"integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", "integrity": "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/types": "^7.29.0" "@babel/types": "^7.29.0"
@@ -193,9 +194,9 @@
"license": "Apache-2.0" "license": "Apache-2.0"
}, },
"node_modules/@codemirror/autocomplete": { "node_modules/@codemirror/autocomplete": {
"version": "6.20.1", "version": "6.20.2",
"resolved": "https://registry.npmmirror.com/@codemirror/autocomplete/-/autocomplete-6.20.1.tgz", "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.2.tgz",
"integrity": "sha512-1cvg3Vz1dSSToCNlJfRA2WSI4ht3K+WplO0UMOgmUYPivCyy2oueZY6Lx7M9wThm7SDUBViRmuT+OG/i8+ON9A==", "integrity": "sha512-G5FPkgIiLjOgZMjqVjvuKQ1rGPtHogLldJr33eFJdVLtmwY+giGrlv/ewljLz6b9BSQLkjxuwBc6g6omDM+YxQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@codemirror/language": "^6.0.0", "@codemirror/language": "^6.0.0",
@@ -596,29 +597,6 @@
"vue": "^3.0.11" "vue": "^3.0.11"
} }
}, },
"node_modules/@emnapi/core": {
"version": "1.9.2",
"resolved": "https://registry.npmmirror.com/@emnapi/core/-/core-1.9.2.tgz",
"integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"@emnapi/wasi-threads": "1.2.1",
"tslib": "^2.4.0"
}
},
"node_modules/@emnapi/runtime": {
"version": "1.9.2",
"resolved": "https://registry.npmmirror.com/@emnapi/runtime/-/runtime-1.9.2.tgz",
"integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"tslib": "^2.4.0"
}
},
"node_modules/@emnapi/wasi-threads": { "node_modules/@emnapi/wasi-threads": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmmirror.com/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", "resolved": "https://registry.npmmirror.com/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
@@ -659,9 +637,9 @@
} }
}, },
"node_modules/@iconify/vue": { "node_modules/@iconify/vue": {
"version": "5.0.0", "version": "5.0.1",
"resolved": "https://registry.npmmirror.com/@iconify/vue/-/vue-5.0.0.tgz", "resolved": "https://registry.npmjs.org/@iconify/vue/-/vue-5.0.1.tgz",
"integrity": "sha512-C+KuEWIF5nSBrobFJhT//JS87OZ++QDORB6f2q2Wm6fl2mueSTpFBeBsveK0KW9hWiZ4mNiPjsh6Zs4jjdROSg==", "integrity": "sha512-aumwwooJlFJ5H5qYWB6ZTAyM0C8hpfcSVLB9/a3qnH1GGvIJ+FEbpEs4s/HfErYe/M5qZeLjwmESR5fFm3lXEw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -671,7 +649,7 @@
"url": "https://github.com/sponsors/cyberalien" "url": "https://github.com/sponsors/cyberalien"
}, },
"peerDependencies": { "peerDependencies": {
"vue": ">=3" "vue": ">=3.0.0"
} }
}, },
"node_modules/@jridgewell/gen-mapping": { "node_modules/@jridgewell/gen-mapping": {
@@ -982,26 +960,12 @@
"@module-federation/sdk": "0.22.0" "@module-federation/sdk": "0.22.0"
} }
}, },
"node_modules/@napi-rs/wasm-runtime": {
"version": "1.0.7",
"resolved": "https://registry.npmmirror.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz",
"integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"@emnapi/core": "^1.5.0",
"@emnapi/runtime": "^1.5.0",
"@tybys/wasm-util": "^0.10.1"
}
},
"node_modules/@rsbuild/core": { "node_modules/@rsbuild/core": {
"version": "1.7.5", "version": "1.7.5",
"resolved": "https://registry.npmmirror.com/@rsbuild/core/-/core-1.7.5.tgz", "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-1.7.5.tgz",
"integrity": "sha512-i37urpoV4y9NSsGiUOuLdoI42KJ5h4gAZ8EG8Ilmsond3bxoAoOCu7YvC+1pJ7p+r16suVPW8cki891ZKHOoXQ==", "integrity": "sha512-i37urpoV4y9NSsGiUOuLdoI42KJ5h4gAZ8EG8Ilmsond3bxoAoOCu7YvC+1pJ7p+r16suVPW8cki891ZKHOoXQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@rspack/core": "~1.7.10", "@rspack/core": "~1.7.10",
"@rspack/lite-tapable": "~1.1.0", "@rspack/lite-tapable": "~1.1.0",
@@ -1016,27 +980,22 @@
"node": ">=18.12.0" "node": ">=18.12.0"
} }
}, },
"node_modules/@rsbuild/plugin-vue": { "node_modules/@rsbuild/core/node_modules/@napi-rs/wasm-runtime": {
"version": "1.2.7", "version": "1.0.7",
"resolved": "https://registry.npmmirror.com/@rsbuild/plugin-vue/-/plugin-vue-1.2.7.tgz", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz",
"integrity": "sha512-epDSChyeR4U+gwq2vfTARV9hbfrmdFTdmhBWIcv7MFyckn3yxJhweJVwdx14Wf3d8s1p4XZzDpqmphDyvX443Q==", "integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true,
"dependencies": { "dependencies": {
"rspack-vue-loader": "^17.5.0" "@emnapi/core": "^1.5.0",
}, "@emnapi/runtime": "^1.5.0",
"peerDependencies": { "@tybys/wasm-util": "^0.10.1"
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
},
"peerDependenciesMeta": {
"@rsbuild/core": {
"optional": true
}
} }
}, },
"node_modules/@rspack/binding": { "node_modules/@rsbuild/core/node_modules/@rspack/binding": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding/-/binding-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.7.11.tgz",
"integrity": "sha512-2MGdy2s2HimsDT444Bp5XnALzNRxuBNc7y0JzyuqKbHBywd4x2NeXyhWXXoxufaCFu5PBc9Qq9jyfjW2Aeh06Q==", "integrity": "sha512-2MGdy2s2HimsDT444Bp5XnALzNRxuBNc7y0JzyuqKbHBywd4x2NeXyhWXXoxufaCFu5PBc9Qq9jyfjW2Aeh06Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
@@ -1053,9 +1012,9 @@
"@rspack/binding-win32-x64-msvc": "1.7.11" "@rspack/binding-win32-x64-msvc": "1.7.11"
} }
}, },
"node_modules/@rspack/binding-darwin-arm64": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-darwin-arm64": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-1.7.11.tgz",
"integrity": "sha512-oduECiZVqbO5zlVw+q7Vy65sJFth99fWPTyucwvLJJtJkPL5n17Uiql2cYP6Ijn0pkqtf1SXgK8WjiKLG5bIig==", "integrity": "sha512-oduECiZVqbO5zlVw+q7Vy65sJFth99fWPTyucwvLJJtJkPL5n17Uiql2cYP6Ijn0pkqtf1SXgK8WjiKLG5bIig==",
"cpu": [ "cpu": [
"arm64" "arm64"
@@ -1067,9 +1026,9 @@
"darwin" "darwin"
] ]
}, },
"node_modules/@rspack/binding-darwin-x64": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-darwin-x64": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-1.7.11.tgz",
"integrity": "sha512-a1+TtTE9ap6RalgFi7FGIgkJP6O4Vy6ctv+9WGJy53E4kuqHR0RygzaiVxCI/GMc/vBT9vY23hyrpWb3d1vtXA==", "integrity": "sha512-a1+TtTE9ap6RalgFi7FGIgkJP6O4Vy6ctv+9WGJy53E4kuqHR0RygzaiVxCI/GMc/vBT9vY23hyrpWb3d1vtXA==",
"cpu": [ "cpu": [
"x64" "x64"
@@ -1081,9 +1040,9 @@
"darwin" "darwin"
] ]
}, },
"node_modules/@rspack/binding-linux-arm64-gnu": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-arm64-gnu": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.7.11.tgz",
"integrity": "sha512-P0QrGRPbTWu6RKWfN0bDtbnEps3rXH0MWIMreZABoUrVmNQKtXR6e73J3ub6a+di5s2+K0M2LJ9Bh2/H4UsDUA==", "integrity": "sha512-P0QrGRPbTWu6RKWfN0bDtbnEps3rXH0MWIMreZABoUrVmNQKtXR6e73J3ub6a+di5s2+K0M2LJ9Bh2/H4UsDUA==",
"cpu": [ "cpu": [
"arm64" "arm64"
@@ -1095,9 +1054,9 @@
"linux" "linux"
] ]
}, },
"node_modules/@rspack/binding-linux-arm64-musl": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-arm64-musl": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.7.11.tgz",
"integrity": "sha512-6ky7R43VMjWwmx3Yx7Jl7faLBBMAgMDt+/bN35RgwjiPgsIByz65EwytUVuW9rikB43BGHvA/eqlnjLrUzNBqw==", "integrity": "sha512-6ky7R43VMjWwmx3Yx7Jl7faLBBMAgMDt+/bN35RgwjiPgsIByz65EwytUVuW9rikB43BGHvA/eqlnjLrUzNBqw==",
"cpu": [ "cpu": [
"arm64" "arm64"
@@ -1109,9 +1068,9 @@
"linux" "linux"
] ]
}, },
"node_modules/@rspack/binding-linux-x64-gnu": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-x64-gnu": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.7.11.tgz",
"integrity": "sha512-cuOJMfCOvb2Wgsry5enXJ3iT1FGUjdPqtGUBVupQlEG4ntSYsQ2PtF4wIDVasR3wdxC5nQbipOrDiN/u6fYsdQ==", "integrity": "sha512-cuOJMfCOvb2Wgsry5enXJ3iT1FGUjdPqtGUBVupQlEG4ntSYsQ2PtF4wIDVasR3wdxC5nQbipOrDiN/u6fYsdQ==",
"cpu": [ "cpu": [
"x64" "x64"
@@ -1123,9 +1082,9 @@
"linux" "linux"
] ]
}, },
"node_modules/@rspack/binding-linux-x64-musl": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-linux-x64-musl": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-1.7.11.tgz",
"integrity": "sha512-CoK37hva4AmHGh3VCsQXmGr40L36m1/AdnN5LEjUX6kx5rEH7/1nEBN6Ii72pejqDVvk9anEROmPDiPw10tpFg==", "integrity": "sha512-CoK37hva4AmHGh3VCsQXmGr40L36m1/AdnN5LEjUX6kx5rEH7/1nEBN6Ii72pejqDVvk9anEROmPDiPw10tpFg==",
"cpu": [ "cpu": [
"x64" "x64"
@@ -1137,9 +1096,9 @@
"linux" "linux"
] ]
}, },
"node_modules/@rspack/binding-wasm32-wasi": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-wasm32-wasi": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-1.7.11.tgz",
"integrity": "sha512-OtrmnPUVJMxjNa3eDMfHyPdtlLRmmp/aIm0fQHlAOATbZvlGm12q7rhPW5BXTu1yh+1rQ1/uqvz+SzKEZXuJaQ==", "integrity": "sha512-OtrmnPUVJMxjNa3eDMfHyPdtlLRmmp/aIm0fQHlAOATbZvlGm12q7rhPW5BXTu1yh+1rQ1/uqvz+SzKEZXuJaQ==",
"cpu": [ "cpu": [
"wasm32" "wasm32"
@@ -1151,9 +1110,9 @@
"@napi-rs/wasm-runtime": "1.0.7" "@napi-rs/wasm-runtime": "1.0.7"
} }
}, },
"node_modules/@rspack/binding-win32-arm64-msvc": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-arm64-msvc": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.7.11.tgz",
"integrity": "sha512-lObFW6e5lCWNgTBNwT//yiEDbsxm9QG4BYUojqeXxothuzJ/L6ibXz6+gLMvbOvLGV3nKgkXmx8GvT9WDKR0mA==", "integrity": "sha512-lObFW6e5lCWNgTBNwT//yiEDbsxm9QG4BYUojqeXxothuzJ/L6ibXz6+gLMvbOvLGV3nKgkXmx8GvT9WDKR0mA==",
"cpu": [ "cpu": [
"arm64" "arm64"
@@ -1165,9 +1124,9 @@
"win32" "win32"
] ]
}, },
"node_modules/@rspack/binding-win32-ia32-msvc": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-ia32-msvc": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.7.11.tgz",
"integrity": "sha512-0pYGnZd8PPqNR68zQ8skamqNAXEA1sUfXuAdYcknIIRq2wsbiwFzIc0Pov1cIfHYab37G7sSIPBiOUdOWF5Ivw==", "integrity": "sha512-0pYGnZd8PPqNR68zQ8skamqNAXEA1sUfXuAdYcknIIRq2wsbiwFzIc0Pov1cIfHYab37G7sSIPBiOUdOWF5Ivw==",
"cpu": [ "cpu": [
"ia32" "ia32"
@@ -1179,9 +1138,9 @@
"win32" "win32"
] ]
}, },
"node_modules/@rspack/binding-win32-x64-msvc": { "node_modules/@rsbuild/core/node_modules/@rspack/binding-win32-x64-msvc": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.7.11.tgz",
"integrity": "sha512-EeQXayoQk/uBkI3pdoXfQBXNIUrADq56L3s/DFyM2pJeUDrWmhfIw2UFIGkYPTMSCo8F2JcdcGM32FGJrSnU0Q==", "integrity": "sha512-EeQXayoQk/uBkI3pdoXfQBXNIUrADq56L3s/DFyM2pJeUDrWmhfIw2UFIGkYPTMSCo8F2JcdcGM32FGJrSnU0Q==",
"cpu": [ "cpu": [
"x64" "x64"
@@ -1193,9 +1152,9 @@
"win32" "win32"
] ]
}, },
"node_modules/@rspack/core": { "node_modules/@rsbuild/core/node_modules/@rspack/core": {
"version": "1.7.11", "version": "1.7.11",
"resolved": "https://registry.npmmirror.com/@rspack/core/-/core-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.7.11.tgz",
"integrity": "sha512-rsD9b+Khmot5DwCMiB3cqTQo53ioPG3M/A7BySu8+0+RS7GCxKm+Z+mtsjtG/vsu4Tn2tcqCdZtA3pgLoJB+ew==", "integrity": "sha512-rsD9b+Khmot5DwCMiB3cqTQo53ioPG3M/A7BySu8+0+RS7GCxKm+Z+mtsjtG/vsu4Tn2tcqCdZtA3pgLoJB+ew==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
@@ -1216,6 +1175,24 @@
} }
} }
}, },
"node_modules/@rsbuild/plugin-vue": {
"version": "1.2.7",
"resolved": "https://registry.npmmirror.com/@rsbuild/plugin-vue/-/plugin-vue-1.2.7.tgz",
"integrity": "sha512-epDSChyeR4U+gwq2vfTARV9hbfrmdFTdmhBWIcv7MFyckn3yxJhweJVwdx14Wf3d8s1p4XZzDpqmphDyvX443Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"rspack-vue-loader": "^17.5.0"
},
"peerDependencies": {
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
},
"peerDependenciesMeta": {
"@rsbuild/core": {
"optional": true
}
}
},
"node_modules/@rspack/lite-tapable": { "node_modules/@rspack/lite-tapable": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/@rspack/lite-tapable/-/lite-tapable-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@rspack/lite-tapable/-/lite-tapable-1.1.0.tgz",
@@ -1225,10 +1202,11 @@
}, },
"node_modules/@swc/helpers": { "node_modules/@swc/helpers": {
"version": "0.5.21", "version": "0.5.21",
"resolved": "https://registry.npmmirror.com/@swc/helpers/-/helpers-0.5.21.tgz", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.21.tgz",
"integrity": "sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==", "integrity": "sha512-jI/VAmtdjB/RnI8GTnokyX7Ug8c+g+ffD6QRLa6XQewtnGyukKkKSk3wLTM3b5cjt1jNh9x0jfVlagdN2gDKQg==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true,
"dependencies": { "dependencies": {
"tslib": "^2.8.0" "tslib": "^2.8.0"
} }
@@ -1240,9 +1218,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@tybys/wasm-util": { "node_modules/@tybys/wasm-util": {
"version": "0.10.1", "version": "0.10.2",
"resolved": "https://registry.npmmirror.com/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz",
"integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
@@ -1901,13 +1879,13 @@
} }
}, },
"node_modules/@vue/compiler-core": { "node_modules/@vue/compiler-core": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.34.tgz",
"integrity": "sha512-4x74Tbtqnda8s/NSD6e1Dr5p1c8HdMU5RWSjMSUzb8RTcUQqevDCxVAitcLBKT+ie3o0Dl9crc/S/opJM7qBGQ==", "integrity": "sha512-s9cLyK5mLcvZ4Agva5QgRsQyLKvts9WbU9DB6NqiZkkGEdwmcEiylj5Jbwkp680drF/NNCV8OlAJSe+yMLxaJw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.29.2", "@babel/parser": "^7.29.3",
"@vue/shared": "3.5.32", "@vue/shared": "3.5.34",
"entities": "^7.0.1", "entities": "^7.0.1",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
"source-map-js": "^1.2.1" "source-map-js": "^1.2.1"
@@ -1915,7 +1893,7 @@
}, },
"node_modules/@vue/compiler-core/node_modules/entities": { "node_modules/@vue/compiler-core/node_modules/entities": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-7.0.1.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz",
"integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==",
"license": "BSD-2-Clause", "license": "BSD-2-Clause",
"engines": { "engines": {
@@ -1927,34 +1905,34 @@
}, },
"node_modules/@vue/compiler-core/node_modules/estree-walker": { "node_modules/@vue/compiler-core/node_modules/estree-walker": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vue/compiler-dom": { "node_modules/@vue/compiler-dom": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.34.tgz",
"integrity": "sha512-ybHAu70NtiEI1fvAUz3oXZqkUYEe5J98GjMDpTGl5iHb0T15wQYLR4wE3h9xfuTNA+Cm2f4czfe8B4s+CCH57Q==", "integrity": "sha512-EbF/T++k0e2MMZlJsBhzK8Sgwt0HcIPOhzn1CTB/lv6sQcyk+OWf8YeiLxZp3ro7MbbLcAfAJ6sEvjFWuNgUCw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-core": "3.5.32", "@vue/compiler-core": "3.5.34",
"@vue/shared": "3.5.32" "@vue/shared": "3.5.34"
} }
}, },
"node_modules/@vue/compiler-sfc": { "node_modules/@vue/compiler-sfc": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.34.tgz",
"integrity": "sha512-8UYUYo71cP/0YHMO814TRZlPuUUw3oifHuMR7Wp9SNoRSrxRQnhMLNlCeaODNn6kNTJsjFoQ/kqIj4qGvya4Xg==", "integrity": "sha512-D/ihr6uZeIt6r+pVZf46RWT1fAsLFMbUP7k8G1VkiiWexriED9GrX3echHd4Abbt17zjlfiFJ8z7a3BxZOPNjg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/parser": "^7.29.2", "@babel/parser": "^7.29.3",
"@vue/compiler-core": "3.5.32", "@vue/compiler-core": "3.5.34",
"@vue/compiler-dom": "3.5.32", "@vue/compiler-dom": "3.5.34",
"@vue/compiler-ssr": "3.5.32", "@vue/compiler-ssr": "3.5.34",
"@vue/shared": "3.5.32", "@vue/shared": "3.5.34",
"estree-walker": "^2.0.2", "estree-walker": "^2.0.2",
"magic-string": "^0.30.21", "magic-string": "^0.30.21",
"postcss": "^8.5.8", "postcss": "^8.5.14",
"source-map-js": "^1.2.1" "source-map-js": "^1.2.1"
} }
}, },
@@ -1965,13 +1943,13 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vue/compiler-ssr": { "node_modules/@vue/compiler-ssr": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.34.tgz",
"integrity": "sha512-Gp4gTs22T3DgRotZ8aA/6m2jMR+GMztvBXUBEUOYOcST+giyGWJ4WvFd7QLHBkzTxkfOt8IELKNdpzITLbA2rw==", "integrity": "sha512-cDtTHKibkThKGHH1SP+WdccquNRYQDFH6rRjQCqT9G2ltFAfoR5pUftpab/z+aM5mW9HLLVQW7hfKKQe/1GBeQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.5.32", "@vue/compiler-dom": "3.5.34",
"@vue/shared": "3.5.32" "@vue/shared": "3.5.34"
} }
}, },
"node_modules/@vue/devtools-api": { "node_modules/@vue/devtools-api": {
@@ -2008,65 +1986,84 @@
} }
}, },
"node_modules/@vue/reactivity": { "node_modules/@vue/reactivity": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.34.tgz",
"integrity": "sha512-/ORasxSGvZ6MN5gc+uE364SxFdJ0+WqVG0CENXaGW58TOCdrAW76WWaplDtECeS1qphvtBZtR+3/o1g1zL4xPQ==", "integrity": "sha512-y9XDjCEuBp+98k+UL5dbYkh57AHU4o6cxZedOPXw3bmrZZYLQsVHguGurq7hVrPCSrQtrnz1f9dssyFr+dMXfQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/shared": "3.5.32" "@vue/shared": "3.5.34"
} }
}, },
"node_modules/@vue/runtime-core": { "node_modules/@vue/runtime-core": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.34.tgz",
"integrity": "sha512-pDrXCejn4UpFDFmMd27AcJEbHaLemaE5o4pbb7sLk79SRIhc6/t34BQA7SGNgYtbMnvbF/HHOftYBgFJtUoJUQ==", "integrity": "sha512-mKeBYvu8tcMSLhypAHBmriUFfWXKTCF/23Z4jiCoYK3UtWepkliViNLuR90V9XOyD62mUxs9p1jsrpK3CCGIzw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/reactivity": "3.5.32", "@vue/reactivity": "3.5.34",
"@vue/shared": "3.5.32" "@vue/shared": "3.5.34"
} }
}, },
"node_modules/@vue/runtime-dom": { "node_modules/@vue/runtime-dom": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.34.tgz",
"integrity": "sha512-1CDVv7tv/IV13V8Nip1k/aaObVbWqRlVCVezTwx3K07p7Vxossp5JU1dcPNhJk3w347gonIUT9jQOGutyJrSVQ==", "integrity": "sha512-e8kZzERmCwUnBRVsgSQlAfrfU2rGoy0FFKPBXSlfEjc/O3KfA7QP0t1/2ZylrbchjmIKB4dPTd07A6WPr0eOrg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/reactivity": "3.5.32", "@vue/reactivity": "3.5.34",
"@vue/runtime-core": "3.5.32", "@vue/runtime-core": "3.5.34",
"@vue/shared": "3.5.32", "@vue/shared": "3.5.34",
"csstype": "^3.2.3" "csstype": "^3.2.3"
} }
}, },
"node_modules/@vue/server-renderer": { "node_modules/@vue/server-renderer": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.34.tgz",
"integrity": "sha512-IOjm2+JQwRFS7W28HNuJeXQle9KdZbODFY7hFGVtnnghF51ta20EWAZJHX+zLGtsHhaU6uC9BGPV52KVpYryMQ==", "integrity": "sha512-nHxmJoTrKsmrkbILRhkC9gY1G3moZbJTqCzDd7DOOzG5KH9oeJ0Unqrff5f9v0pW//jES05ZkJcNtfE8JjOIew==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vue/compiler-ssr": "3.5.32", "@vue/compiler-ssr": "3.5.34",
"@vue/shared": "3.5.32" "@vue/shared": "3.5.34"
}, },
"peerDependencies": { "peerDependencies": {
"vue": "3.5.32" "vue": "3.5.34"
} }
}, },
"node_modules/@vue/shared": { "node_modules/@vue/shared": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.32.tgz", "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.34.tgz",
"integrity": "sha512-ksNyrmRQzWJJ8n3cRDuSF7zNNontuJg1YHnmWRJd2AMu8Ij2bqwiiri2lH5rHtYPZjj4STkNcgcmiQqlOjiYGg==", "integrity": "sha512-24uqU4OIiX29ryC3MeWid/Xf2fa2EFRUVLb77nRhk+UrTVrh/XiGtFAFmJBAtBRbjwNdsPRP+jj/OL27Eg1NDA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/@vue/tsconfig": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/@vue/tsconfig/-/tsconfig-0.9.1.tgz",
"integrity": "sha512-buvjm+9NzLCJL29KY1j1991YYJ5e6275OiK+G4jtmfIb+z4POywbdm0wXusT9adVWqe0xqg70TbI7+mRx4uU9w==",
"dev": true,
"license": "MIT",
"peerDependencies": {
"typescript": ">= 5.8",
"vue": "^3.4.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
},
"vue": {
"optional": true
}
}
},
"node_modules/@vueuse/core": { "node_modules/@vueuse/core": {
"version": "14.2.1", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.2.1.tgz", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.3.0.tgz",
"integrity": "sha512-3vwDzV+GDUNpdegRY6kzpLm4Igptq+GA0QkJ3W61Iv27YWwW/ufSlOfgQIpN6FZRMG0mkaz4gglJRtq5SeJyIQ==", "integrity": "sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw==",
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@types/web-bluetooth": "^0.0.21", "@types/web-bluetooth": "^0.0.21",
"@vueuse/metadata": "14.2.1", "@vueuse/metadata": "14.3.0",
"@vueuse/shared": "14.2.1" "@vueuse/shared": "14.3.0"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/antfu" "url": "https://github.com/sponsors/antfu"
@@ -2076,21 +2073,21 @@
} }
}, },
"node_modules/@vueuse/metadata": { "node_modules/@vueuse/metadata": {
"version": "14.2.1", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.2.1.tgz", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.3.0.tgz",
"integrity": "sha512-1ButlVtj5Sb/HDtIy1HFr1VqCP4G6Ypqt5MAo0lCgjokrk2mvQKsK2uuy0vqu/Ks+sHfuHo0B9Y9jn9xKdjZsw==", "integrity": "sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw==",
"license": "MIT", "license": "MIT",
"funding": { "funding": {
"url": "https://github.com/sponsors/antfu" "url": "https://github.com/sponsors/antfu"
} }
}, },
"node_modules/@vueuse/router": { "node_modules/@vueuse/router": {
"version": "14.2.1", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/router/-/router-14.2.1.tgz", "resolved": "https://registry.npmjs.org/@vueuse/router/-/router-14.3.0.tgz",
"integrity": "sha512-SbZfJe+qn5bj78zNOXT4nYbnp8OIFMyAsdcJb4Y0y9vXi1TsOfglF+YIazi5DPO2lk6/ZukpN5DEQe6KrNOjMw==", "integrity": "sha512-MK7YETFDPyDDF9aSP4W3TzUIHLZ+uq0n/t4VMxOP39e0qGbCZ21ZRsGE93ML84teKtCtPDlN+73CTk2e3xVl9w==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@vueuse/shared": "14.2.1" "@vueuse/shared": "14.3.0"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/antfu" "url": "https://github.com/sponsors/antfu"
@@ -2101,9 +2098,9 @@
} }
}, },
"node_modules/@vueuse/shared": { "node_modules/@vueuse/shared": {
"version": "14.2.1", "version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.2.1.tgz", "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.3.0.tgz",
"integrity": "sha512-shTJncjV9JTI4oVNyF1FQonetYAiTBd+Qj7cY89SWbXSkx7gyhrgtEdF2ZAVWS1S3SHlaROO6F2IesJxQEkZBw==", "integrity": "sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg==",
"license": "MIT", "license": "MIT",
"funding": { "funding": {
"url": "https://github.com/sponsors/antfu" "url": "https://github.com/sponsors/antfu"
@@ -2351,12 +2348,12 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.15.0", "version": "1.16.0",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.15.0.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.0.tgz",
"integrity": "sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==", "integrity": "sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.11", "follow-redirects": "^1.16.0",
"form-data": "^4.0.5", "form-data": "^4.0.5",
"proxy-from-env": "^2.1.0" "proxy-from-env": "^2.1.0"
} }
@@ -3255,9 +3252,9 @@
} }
}, },
"node_modules/dompurify": { "node_modules/dompurify": {
"version": "3.3.3", "version": "3.4.2",
"resolved": "https://registry.npmmirror.com/dompurify/-/dompurify-3.3.3.tgz", "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.2.tgz",
"integrity": "sha512-Oj6pzI2+RqBfFG+qOaOLbFXLQ90ARpcGG6UePL82bJLtdsa6CYJD7nmiU8MW9nQNOtCHV3lZ/Bzq1X0QYbBZCA==", "integrity": "sha512-lHeS9SA/IKeIFFyYciHBr2n0v1VMPlSj843HdLOwjb2OxNwdq9Xykxqhk+FE42MzAdHvInbAolSE4mhahPpjXA==",
"license": "(MPL-2.0 OR Apache-2.0)", "license": "(MPL-2.0 OR Apache-2.0)",
"optionalDependencies": { "optionalDependencies": {
"@types/trusted-types": "^2.0.7" "@types/trusted-types": "^2.0.7"
@@ -3473,9 +3470,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.15.11", "version": "1.16.0",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.11.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz",
"integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@@ -3770,9 +3767,9 @@
} }
}, },
"node_modules/jiti": { "node_modules/jiti": {
"version": "2.6.1", "version": "2.7.0",
"resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.6.1.tgz", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -3924,15 +3921,15 @@
} }
}, },
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.23", "version": "4.18.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/lodash-es": { "node_modules/lodash-es": {
"version": "4.17.23", "version": "4.18.1",
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.23.tgz", "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
"integrity": "sha512-kVI48u3PZr38HdYz98UmfPnXl2DXrpdctLrFLCd3kOx1xUkOmpFPx7gCWWM5MPkL/fD8zb+Ph0QzjGFs4+hHWg==", "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/lodash.camelcase": { "node_modules/lodash.camelcase": {
@@ -4074,9 +4071,9 @@
} }
}, },
"node_modules/md-editor-v3": { "node_modules/md-editor-v3": {
"version": "6.4.2", "version": "6.5.0",
"resolved": "https://registry.npmmirror.com/md-editor-v3/-/md-editor-v3-6.4.2.tgz", "resolved": "https://registry.npmjs.org/md-editor-v3/-/md-editor-v3-6.5.0.tgz",
"integrity": "sha512-Jz2eYHTWpcxjakU7+2I2E9soiintAJ1NAFkXbhZYNUD1W/y52RidsjdmQRyf1YQH2pGXZyVLsHJm/mW99kA7LA==", "integrity": "sha512-GhGhPebfJeOrFuybFMUZRM6GzLMhu7Sg03MWLwO6tuIKMkRN71/SeTbLYYzY95qpaMbXDMWKlTkj3UNf9Bz4dg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@codemirror/autocomplete": "^6.18.7", "@codemirror/autocomplete": "^6.18.7",
@@ -4145,6 +4142,19 @@
"uuid": "^11.1.0" "uuid": "^11.1.0"
} }
}, },
"node_modules/mermaid/node_modules/uuid": {
"version": "11.1.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz",
"integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -4261,9 +4271,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "5.1.7", "version": "5.1.11",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-5.1.7.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.11.tgz",
"integrity": "sha512-ua3NDgISf6jdwezAheMOk4mbE1LXjm1DfMUDMuJf4AqxLFK3ccGpgWizwa5YV7Yz9EpXwEaWoRXSb/BnV0t5dQ==", "integrity": "sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -4328,14 +4338,14 @@
}, },
"node_modules/picocolors": { "node_modules/picocolors": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"license": "ISC" "license": "ISC"
}, },
"node_modules/picomatch": { "node_modules/picomatch": {
"version": "4.0.3", "version": "4.0.4",
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.3.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">=12" "node": ">=12"
@@ -4394,9 +4404,9 @@
} }
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.8", "version": "8.5.14",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.8.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz",
"integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@@ -4422,9 +4432,9 @@
} }
}, },
"node_modules/postcss/node_modules/nanoid": { "node_modules/postcss/node_modules/nanoid": {
"version": "3.3.11", "version": "3.3.12",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -4450,9 +4460,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.8.2", "version": "3.8.3",
"resolved": "https://registry.npmmirror.com/prettier/-/prettier-3.8.2.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz",
"integrity": "sha512-8c3mgTe0ASwWAJK+78dpviD+A8EqhndQPUBpNUIPt6+xWlIigCwfN01lWr9MAede4uqXGTEKeQWTvzb3vjia0Q==", "integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -4735,7 +4745,7 @@
}, },
"node_modules/source-map-js": { "node_modules/source-map-js": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"engines": { "engines": {
@@ -4867,9 +4877,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "6.0.2", "version": "6.0.3",
"resolved": "https://registry.npmmirror.com/typescript/-/typescript-6.0.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
"integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==", "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
"devOptional": true, "devOptional": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"peer": true, "peer": true,
@@ -5045,19 +5055,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/vdirs": { "node_modules/vdirs": {
"version": "0.1.8", "version": "0.1.8",
"resolved": "https://registry.npmmirror.com/vdirs/-/vdirs-0.1.8.tgz", "resolved": "https://registry.npmmirror.com/vdirs/-/vdirs-0.1.8.tgz",
@@ -5132,17 +5129,17 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/vue": { "node_modules/vue": {
"version": "3.5.32", "version": "3.5.34",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.32.tgz", "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.34.tgz",
"integrity": "sha512-vM4z4Q9tTafVfMAK7IVzmxg34rSzTFMyIe0UUEijUCkn9+23lj0WRfA83dg7eQZIUlgOSGrkViIaCfqSAUXsMw==", "integrity": "sha512-WdLBG9gm02OgJIG9axd5Hpx0TFLdzVgfG2evFFu8Rur5O/IoGc5cMjnjh3tPL6GnRGsYvUhBSKVPYVcxRKpMCA==",
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.5.32", "@vue/compiler-dom": "3.5.34",
"@vue/compiler-sfc": "3.5.32", "@vue/compiler-sfc": "3.5.34",
"@vue/runtime-dom": "3.5.32", "@vue/runtime-dom": "3.5.34",
"@vue/server-renderer": "3.5.32", "@vue/server-renderer": "3.5.34",
"@vue/shared": "3.5.32" "@vue/shared": "3.5.34"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": "*" "typescript": "*"
@@ -5180,9 +5177,9 @@
} }
}, },
"node_modules/vue-router": { "node_modules/vue-router": {
"version": "5.0.4", "version": "5.0.6",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-5.0.4.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-5.0.6.tgz",
"integrity": "sha512-lCqDLCI2+fKVRl2OzXuzdSWmxXFLQRxQbmHugnRpTMyYiT+hNaycV0faqG5FBHDXoYrZ6MQcX87BvbY8mQ20Bg==", "integrity": "sha512-9+kmUTGbKMyW9Asoy98IXXYIzrTMT7JDAdpDDeEkorHvybpUvBI2wsrSM5jFOXrFydpzRFJ9vAh+80DN2PGu9w==",
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@@ -5418,9 +5415,9 @@
} }
}, },
"node_modules/yaml": { "node_modules/yaml": {
"version": "2.8.2", "version": "2.8.4",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.4.tgz",
"integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==",
"license": "ISC", "license": "ISC",
"bin": { "bin": {
"yaml": "bin.mjs" "yaml": "bin.mjs"

View File

@@ -10,7 +10,7 @@
"fmt": "prettier --write src *.ts" "fmt": "prettier --write src *.ts"
}, },
"dependencies": { "dependencies": {
"@codemirror/autocomplete": "^6.20.1", "@codemirror/autocomplete": "^6.20.2",
"@codemirror/lang-cpp": "^6.0.3", "@codemirror/lang-cpp": "^6.0.3",
"@codemirror/lang-python": "^6.2.1", "@codemirror/lang-python": "^6.2.1",
"@vue-flow/background": "^1.3.2", "@vue-flow/background": "^1.3.2",
@@ -19,11 +19,11 @@
"@vue-flow/minimap": "^1.5.4", "@vue-flow/minimap": "^1.5.4",
"@vue-flow/node-resizer": "^1.5.1", "@vue-flow/node-resizer": "^1.5.1",
"@vue-flow/node-toolbar": "^1.1.1", "@vue-flow/node-toolbar": "^1.1.1",
"@vueuse/core": "^14.2.1", "@vueuse/core": "^14.3.0",
"@vueuse/router": "^14.2.1", "@vueuse/router": "^14.3.0",
"@wangeditor-next/editor": "^5.7.0", "@wangeditor-next/editor": "^5.7.0",
"@wangeditor-next/editor-for-vue": "^5.1.14", "@wangeditor-next/editor-for-vue": "^5.1.14",
"axios": "^1.15.0", "axios": "^1.16.0",
"canvas-confetti": "^1.9.4", "canvas-confetti": "^1.9.4",
"chart.js": "^4.5.1", "chart.js": "^4.5.1",
"codemirror": "^6.0.2", "codemirror": "^6.0.2",
@@ -31,29 +31,30 @@
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"fflate": "^0.8.2", "fflate": "^0.8.2",
"highlight.js": "^11.11.1", "highlight.js": "^11.11.1",
"md-editor-v3": "^6.4.2", "md-editor-v3": "^6.5.0",
"mermaid": "^11.14.0", "mermaid": "^11.14.0",
"naive-ui": "^2.44.1", "naive-ui": "^2.44.1",
"nanoid": "^5.1.7", "nanoid": "^5.1.11",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"pinia": "^3.0.4", "pinia": "^3.0.4",
"skulpt": "^1.2.0", "skulpt": "^1.2.0",
"vue": "^3.5.32", "vue": "^3.5.34",
"vue-chartjs": "^5.3.3", "vue-chartjs": "^5.3.3",
"vue-codemirror": "^6.1.1", "vue-codemirror": "^6.1.1",
"vue-router": "^5.0.4", "vue-router": "^5.0.6",
"y-codemirror.next": "^0.3.5", "y-codemirror.next": "^0.3.5",
"y-webrtc": "^10.3.0", "y-webrtc": "^10.3.0",
"yjs": "^13.6.30" "yjs": "^13.6.30"
}, },
"devDependencies": { "devDependencies": {
"@iconify/vue": "^5.0.0", "@iconify/vue": "^5.0.1",
"@rsbuild/core": "^1.7.5", "@rsbuild/core": "^1.7.5",
"@rsbuild/plugin-vue": "^1.2.7", "@rsbuild/plugin-vue": "^1.2.7",
"@types/canvas-confetti": "^1.9.0", "@types/canvas-confetti": "^1.9.0",
"@types/node": "^25.6.0", "@types/node": "^25.6.0",
"prettier": "^3.8.2", "@vue/tsconfig": "^0.9.1",
"typescript": "^6.0.2", "prettier": "^3.8.3",
"typescript": "^6.0.3",
"unplugin-auto-import": "^21.0.0", "unplugin-auto-import": "^21.0.0",
"unplugin-vue-components": "^32.0.0" "unplugin-vue-components": "^32.0.0"
} }

View File

@@ -4,7 +4,7 @@ import AutoImport from "unplugin-auto-import/rspack"
import Components from "unplugin-vue-components/rspack" import Components from "unplugin-vue-components/rspack"
import { NaiveUiResolver } from "unplugin-vue-components/resolvers" import { NaiveUiResolver } from "unplugin-vue-components/resolvers"
export default defineConfig(({ envMode }) => { const config: ReturnType<typeof defineConfig> = defineConfig(({ envMode }) => {
const { publicVars, rawPublicVars } = loadEnv({ const { publicVars, rawPublicVars } = loadEnv({
cwd: process.cwd(), cwd: process.cwd(),
mode: envMode, mode: envMode,
@@ -20,6 +20,7 @@ export default defineConfig(({ envMode }) => {
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
} }
return { return {
plugins: [pluginVue()], plugins: [pluginVue()],
tools: { tools: {
@@ -96,3 +97,5 @@ export default defineConfig(({ envMode }) => {
}, },
} }
}) })
export default config

View File

@@ -54,7 +54,7 @@ async function submit() {
const api = { const api = {
"admin announcement create": createAnnouncement, "admin announcement create": createAnnouncement,
"admin announcement edit": editAnnouncement, "admin announcement edit": editAnnouncement,
}[<string>route.name] }[route.name as string]
try { try {
await api!(announcement) await api!(announcement)
if (route.name === "admin announcement create") { if (route.name === "admin announcement create") {

View File

@@ -263,13 +263,15 @@ export function setTutorialVisibility(id: number, is_public: boolean) {
} }
export async function getAdminExercises(tutorialId: number) { export async function getAdminExercises(tutorialId: number) {
const res = await http.get("admin/exercise", { params: { tutorial_id: tutorialId } }) const res = await http.get("admin/exercise", {
params: { tutorial_id: tutorialId },
})
return res.data as Exercise[] return res.data as Exercise[]
} }
export async function createExercise(data: { export async function createExercise(data: {
tutorial_id: number tutorial_id: number
type: "mcq" | "sort" type: "mcq" | "sort" | "fill"
data: object data: object
order: number order: number
}) { }) {
@@ -279,7 +281,7 @@ export async function createExercise(data: {
export async function updateExercise(data: { export async function updateExercise(data: {
id: number id: number
type: "mcq" | "sort" type: "mcq" | "sort" | "fill"
data: object data: object
order: number order: number
}) { }) {

View File

@@ -97,7 +97,7 @@ async function submit() {
const api = { const api = {
"admin contest create": createContest, "admin contest create": createContest,
"admin contest edit": editContest, "admin contest edit": editContest,
}[<string>route.name] }[route.name as string]
try { try {
await api!(contest) await api!(contest)
if (route.name === "admin contest create") { if (route.name === "admin contest create") {

View File

@@ -33,7 +33,7 @@ const columns: DataTableColumn<AdminProblemFiltered>[] = [
render: (row) => render: (row) =>
h(AddButton, { h(AddButton, {
problemID: row.id, problemID: row.id,
contestID: <string>route.params.contestID, contestID: route.params.contestID as string,
onAdded: () => emit("change"), onAdded: () => emit("change"),
}), }),
width: 60, width: 60,

View File

@@ -44,7 +44,7 @@ const title = computed(
"admin problem edit": "编辑题目", "admin problem edit": "编辑题目",
"admin contest problem create": "新建比赛题目", "admin contest problem create": "新建比赛题目",
"admin contest problem edit": "编辑比赛题目", "admin contest problem edit": "编辑比赛题目",
})[<string>route.name], })[route.name as string],
) )
const isAIGenerating = ref(false) const isAIGenerating = ref(false)
@@ -136,7 +136,6 @@ async function getProblemDetail() {
} }
try { try {
const { data } = await getProblem(props.problemID) const { data } = await getProblem(props.problemID)
toggleReady(true)
problem.value.id = data.id problem.value.id = data.id
problem.value._id = data._id problem.value._id = data._id
problem.value.title = data.title problem.value.title = data.title
@@ -189,6 +188,7 @@ async function getProblemDetail() {
}) })
// 标签 // 标签
tags.value.select = data.tags tags.value.select = data.tags
toggleReady(true)
} catch (error) { } catch (error) {
message.error("获取题目失败") message.error("获取题目失败")
router.push({ name: "admin problem list" }) router.push({ name: "admin problem list" })
@@ -358,7 +358,7 @@ async function submit() {
"admin problem edit": editProblem, "admin problem edit": editProblem,
"admin contest problem create": createContestProblem, "admin contest problem create": createContestProblem,
"admin contest problem edit": editContestProblem, "admin contest problem edit": editContestProblem,
}[<string>route.name] }[route.name as string]
if ( if (
route.name === "admin contest problem create" || route.name === "admin contest problem create" ||
route.name === "admin contest problem edit" route.name === "admin contest problem edit"

View File

@@ -23,7 +23,7 @@ const title = computed(
({ ({
"admin problem list": "题目列表", "admin problem list": "题目列表",
"admin contest problem list": "比赛题目列表", "admin contest problem list": "比赛题目列表",
})[<string>route.name], })[route.name as string],
) )
const isContestProblemList = computed( const isContestProblemList = computed(
() => route.name === "admin contest problem list", () => route.name === "admin contest problem list",

View File

@@ -1,5 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { Exercise, ExerciseMcqData, ExerciseSortData } from "utils/types" import {
Exercise,
ExerciseMcqData,
ExerciseSortData,
ExerciseFillData,
} from "utils/types"
import { import {
getAdminExercises, getAdminExercises,
createExercise, createExercise,
@@ -14,15 +19,19 @@ const dialog = useDialog()
const exercises = ref<Exercise[]>([]) const exercises = ref<Exercise[]>([])
const showForm = ref(false) const showForm = ref(false)
const editingId = ref<number | null>(null) const editingId = ref<number | null>(null)
const formType = ref<"mcq" | "sort">("mcq") const formType = ref<"mcq" | "sort" | "fill">("mcq")
const formOrder = ref(0) const formOrder = ref(0)
const mcqQuestion = ref("") const mcqQuestion = ref("")
const mcqOptions = ref(["", ""]) const mcqOptions = ref(["", ""])
const mcqAnswer = ref(0) const mcqAnswer = ref<number[]>([])
const sortQuestion = ref("")
const sortCode = ref("") const sortCode = ref("")
const fillQuestion = ref("")
const fillCode = ref("")
async function load() { async function load() {
exercises.value = await getAdminExercises(props.tutorialId) exercises.value = await getAdminExercises(props.tutorialId)
} }
@@ -35,8 +44,11 @@ function openCreate() {
formOrder.value = exercises.value.length formOrder.value = exercises.value.length
mcqQuestion.value = "" mcqQuestion.value = ""
mcqOptions.value = ["", ""] mcqOptions.value = ["", ""]
mcqAnswer.value = 0 mcqAnswer.value = []
sortQuestion.value = ""
sortCode.value = "" sortCode.value = ""
fillQuestion.value = ""
fillCode.value = ""
showForm.value = true showForm.value = true
} }
@@ -48,29 +60,62 @@ function openEdit(ex: Exercise) {
const d = ex.data as ExerciseMcqData const d = ex.data as ExerciseMcqData
mcqQuestion.value = d.question mcqQuestion.value = d.question
mcqOptions.value = [...d.options] mcqOptions.value = [...d.options]
mcqAnswer.value = d.answer mcqAnswer.value = [...d.answer]
} else { } else if (ex.type === "sort") {
const d = ex.data as ExerciseSortData const d = ex.data as ExerciseSortData
sortQuestion.value = d.question
sortCode.value = d.lines.join("\n") sortCode.value = d.lines.join("\n")
} else {
const d = ex.data as ExerciseFillData
fillQuestion.value = d.question
fillCode.value = d.code
} }
showForm.value = true showForm.value = true
} }
function toggleAnswer(i: number) {
const idx = mcqAnswer.value.indexOf(i)
if (idx === -1) mcqAnswer.value.push(i)
else mcqAnswer.value.splice(idx, 1)
}
async function save() { async function save() {
const data = if (formType.value === "mcq" && mcqAnswer.value.length === 0) {
formType.value === "mcq" message.error("请至少勾选一个正确答案")
? { question: mcqQuestion.value, options: mcqOptions.value, answer: mcqAnswer.value } return
: { }
question: "将下列代码行排列为正确顺序", let data: Record<string, unknown>
if (formType.value === "mcq") {
data = {
question: mcqQuestion.value || "下面选项中正确是哪个?",
options: mcqOptions.value,
answer: mcqAnswer.value,
}
} else if (formType.value === "sort") {
data = {
question: sortQuestion.value || "将下列代码行排列为正确顺序",
lines: sortCode.value.split("\n").filter((l) => l.trim() !== ""), lines: sortCode.value.split("\n").filter((l) => l.trim() !== ""),
} }
} else {
data = { question: fillQuestion.value, code: fillCode.value }
}
try { try {
if (editingId.value) { if (editingId.value) {
await updateExercise({ id: editingId.value, type: formType.value, data, order: formOrder.value }) await updateExercise({
id: editingId.value,
type: formType.value,
data,
order: formOrder.value,
})
message.success("练习题已更新") message.success("练习题已更新")
} else { } else {
await createExercise({ tutorial_id: props.tutorialId, type: formType.value, data, order: formOrder.value }) await createExercise({
tutorial_id: props.tutorialId,
type: formType.value,
data,
order: formOrder.value,
})
message.success("练习题已创建") message.success("练习题已创建")
} }
showForm.value = false showForm.value = false
@@ -99,7 +144,15 @@ function copyPlaceholder(id: number) {
} }
function typeName(type: string) { function typeName(type: string) {
return type === "mcq" ? "选择题" : "代码排序" if (type === "mcq") return "选择题"
if (type === "sort") return "代码排序"
return "代码填空"
}
function typeTagType(type: string): "success" | "info" | "warning" {
if (type === "mcq") return "success"
if (type === "sort") return "info"
return "warning"
} }
</script> </script>
@@ -107,7 +160,9 @@ function typeName(type: string) {
<div> <div>
<n-flex justify="space-between" align="center" style="margin-bottom: 16px"> <n-flex justify="space-between" align="center" style="margin-bottom: 16px">
<n-text> {{ exercises.length }} 道练习题</n-text> <n-text> {{ exercises.length }} 道练习题</n-text>
<n-button type="primary" size="small" @click="openCreate">+ 添加练习题</n-button> <n-button type="primary" size="small" @click="openCreate"
>+ 添加练习题</n-button
>
</n-flex> </n-flex>
<n-empty v-if="exercises.length === 0" description="暂无练习题" /> <n-empty v-if="exercises.length === 0" description="暂无练习题" />
@@ -116,11 +171,7 @@ function typeName(type: string) {
<n-list-item v-for="ex in exercises" :key="ex.id"> <n-list-item v-for="ex in exercises" :key="ex.id">
<n-flex justify="space-between" align="center"> <n-flex justify="space-between" align="center">
<div> <div>
<n-tag <n-tag size="small" :type="typeTagType(ex.type)" :bordered="false">
size="small"
:type="ex.type === 'mcq' ? 'success' : 'info'"
:bordered="false"
>
{{ typeName(ex.type) }} {{ typeName(ex.type) }}
</n-tag> </n-tag>
<n-text style="margin-left: 10px"> <n-text style="margin-left: 10px">
@@ -130,12 +181,16 @@ function typeName(type: string) {
<n-space :size="8"> <n-space :size="8">
<n-tooltip trigger="hover"> <n-tooltip trigger="hover">
<template #trigger> <template #trigger>
<n-button size="small" @click="copyPlaceholder(ex.id)">复制占位符</n-button> <n-button size="small" @click="copyPlaceholder(ex.id)">
复制占位符
</n-button>
</template> </template>
[[exercise:{{ ex.id }}]] 粘贴到 Markdown 内容中 [[exercise:{{ ex.id }}]] 粘贴到 Markdown 内容中
</n-tooltip> </n-tooltip>
<n-button size="small" @click="openEdit(ex)">编辑</n-button> <n-button size="small" @click="openEdit(ex)">编辑</n-button>
<n-button size="small" type="error" @click="confirmDelete(ex.id)">删除</n-button> <n-button size="small" type="error" @click="confirmDelete(ex.id)">
删除
</n-button>
</n-space> </n-space>
</n-flex> </n-flex>
</n-list-item> </n-list-item>
@@ -152,24 +207,38 @@ function typeName(type: string) {
<n-radio-group v-model:value="formType" :disabled="!!editingId"> <n-radio-group v-model:value="formType" :disabled="!!editingId">
<n-radio value="mcq">选择题</n-radio> <n-radio value="mcq">选择题</n-radio>
<n-radio value="sort">代码排序</n-radio> <n-radio value="sort">代码排序</n-radio>
<n-radio value="fill">代码填空</n-radio>
</n-radio-group> </n-radio-group>
</n-form-item> </n-form-item>
<n-form-item label="顺序"> <n-form-item label="顺序">
<n-input-number v-model:value="formOrder" :min="0" style="width: 100px" /> <n-input-number
v-model:value="formOrder"
:min="0"
style="width: 100px"
/>
</n-form-item> </n-form-item>
<template v-if="formType === 'mcq'"> <template v-if="formType === 'mcq'">
<n-form-item label="题目"> <n-form-item label="题目">
<n-input v-model:value="mcqQuestion" type="textarea" :rows="2" /> <n-input
v-model:value="mcqQuestion"
type="textarea"
:rows="2"
placeholder="下面选项中正确是哪个?"
/>
</n-form-item> </n-form-item>
<n-form-item label="选项(正确答案前选择单选按钮"> <n-form-item label="选项(勾选所有正确答案)">
<n-space vertical style="width: 100%"> <n-space vertical style="width: 100%">
<n-flex v-for="(opt, i) in mcqOptions" :key="i" align="center" :size="8"> <n-flex
<n-radio v-for="(opt, i) in mcqOptions"
:value="i" :key="i"
:checked="mcqAnswer === i" align="center"
@update:checked="$event && (mcqAnswer = i)" :size="8"
>
<n-checkbox
:checked="mcqAnswer.includes(i)"
@update:checked="toggleAnswer(i)"
/> />
<n-input <n-input
v-model:value="mcqOptions[i]" v-model:value="mcqOptions[i]"
@@ -179,17 +248,34 @@ function typeName(type: string) {
<n-button <n-button
size="small" size="small"
:disabled="mcqOptions.length <= 2" :disabled="mcqOptions.length <= 2"
@click="mcqOptions.splice(i, 1)" @click="
() => {
mcqOptions.splice(i, 1)
mcqAnswer.value = mcqAnswer.value
.filter((a) => a !== i)
.map((a) => (a > i ? a - 1 : a))
}
"
> >
</n-button> </n-button>
</n-flex> </n-flex>
<n-button size="small" @click="mcqOptions.push('')">+ 添加选项</n-button> <n-button size="small" @click="mcqOptions.push('')">
+ 添加选项
</n-button>
</n-space> </n-space>
</n-form-item> </n-form-item>
</template> </template>
<template v-else> <template v-else-if="formType === 'sort'">
<n-form-item label="题目">
<n-input
v-model:value="sortQuestion"
type="textarea"
:rows="2"
placeholder="将下列代码行排列为正确顺序"
/>
</n-form-item>
<n-form-item label="正确代码(每行将自动成为一道排序项)"> <n-form-item label="正确代码(每行将自动成为一道排序项)">
<n-input <n-input
v-model:value="sortCode" v-model:value="sortCode"
@@ -200,6 +286,26 @@ function typeName(type: string) {
/> />
</n-form-item> </n-form-item>
</template> </template>
<template v-else>
<n-form-item label="题目说明">
<n-input
v-model:value="fillQuestion"
type="textarea"
:rows="2"
placeholder="例:补全下面的循环语句"
/>
</n-form-item>
<n-form-item label="含空位的代码">
<n-input
v-model:value="fillCode"
type="textarea"
:rows="10"
placeholder="用 {{答案}} 标记空位,多个合法答案用 | 分隔例如for {{i|idx}} in range(10):"
style="font-family: monospace"
/>
</n-form-item>
</template>
</n-form> </n-form>
<template #footer> <template #footer>

View File

@@ -64,7 +64,6 @@ async function submit() {
await updateTutorial(tutorial) await updateTutorial(tutorial)
message.success("修改已保存") message.success("修改已保存")
} }
router.push({ name: "admin tutorial list" })
} catch (err: any) { } catch (err: any) {
message.error(err.data) message.error(err.data)
} }

View File

@@ -10,6 +10,26 @@ body {
--md-theme-color: var(--n-text-color) !important; --md-theme-color: var(--n-text-color) !important;
} }
.oj-mermaid-surface {
box-sizing: border-box;
padding: 18px;
overflow: auto;
border: 1px solid rgba(148, 163, 184, 0.24);
border-radius: 8px;
background:
linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
linear-gradient(135deg, #ffffff 0%, #f8fafc 52%, #eef6ff 100%);
background-size:
24px 24px,
24px 24px,
auto;
}
.oj-mermaid-surface > svg {
max-width: 100%;
}
::view-transition-old(root), ::view-transition-old(root),
::view-transition-new(root) { ::view-transition-new(root) {
animation: none; animation: none;

View File

@@ -423,6 +423,8 @@ export function getProblemSetUserProgress(
} }
export async function getExercises(tutorialId: number): Promise<Exercise[]> { export async function getExercises(tutorialId: number): Promise<Exercise[]> {
const res = await http.get("exercises", { params: { tutorial_id: tutorialId } }) const res = await http.get("exercises", {
params: { tutorial_id: tutorialId },
})
return res.data return res.data
} }

View File

@@ -0,0 +1,160 @@
<script setup lang="ts">
import hljs from "highlight.js/lib/core"
import python from "highlight.js/lib/languages/python"
import c from "highlight.js/lib/languages/c"
import { Exercise, ExerciseFillData } from "utils/types"
hljs.registerLanguage("python", python)
hljs.registerLanguage("c", c)
const props = defineProps<{ exercise: Exercise; lang?: string }>()
const data = computed(() => props.exercise.data as ExerciseFillData)
type CodeSeg = { type: "code"; html: string }
type BlankSeg = { type: "blank"; answers: string[]; index: number }
type Segment = CodeSeg | BlankSeg
function escapeHtml(s: string): string {
return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
}
const segments = computed<Segment[]>(() => {
const blanks: string[][] = []
const markedCode = data.value.code.replace(/\{\{([^}]+)\}\}/g, (_, inner) => {
blanks.push(inner.split("|"))
return `____${blanks.length - 1}____`
})
const lang =
props.lang === "python" ? "python" : props.lang === "c" ? "c" : null
let highlighted: string
if (lang) {
try {
highlighted = hljs.highlight(markedCode, { language: lang }).value
} catch {
highlighted = escapeHtml(markedCode)
}
} else {
highlighted = escapeHtml(markedCode)
}
const parts = highlighted.split(/____(\d+)____/)
const result: Segment[] = []
for (let i = 0; i < parts.length; i++) {
if (i % 2 === 0) {
if (parts[i]) result.push({ type: "code", html: parts[i] })
} else {
const idx = parseInt(parts[i])
result.push({ type: "blank", answers: blanks[idx], index: idx })
}
}
return result
})
const blankCount = computed(
() => segments.value.filter((s) => s.type === "blank").length,
)
const userInputs = ref<string[]>([])
const wrongBlanks = ref<Set<number>>(new Set())
const allCorrect = ref(false)
watch(() => props.exercise.id, reset, { immediate: true })
function reset() {
userInputs.value = Array(blankCount.value).fill("")
wrongBlanks.value = new Set()
allCorrect.value = false
}
function submit() {
if (allCorrect.value) return
const wrong = new Set<number>()
for (const seg of segments.value) {
if (seg.type !== "blank") continue
if (!seg.answers.includes(userInputs.value[seg.index]?.trim() ?? "")) {
wrong.add(seg.index)
}
}
wrongBlanks.value = wrong
allCorrect.value = wrong.size === 0
}
function inputWidth(idx: number): string {
return Math.max(4, (userInputs.value[idx]?.length ?? 0) + 2) + "ch"
}
</script>
<template>
<n-card
size="small"
style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"
>
<template #header>
<n-tag type="warning" size="small" :bordered="false"
>练一练 · 代码填空</n-tag
>
</template>
<p style="font-weight: 500; margin-bottom: 12px">{{ data.question }}</p>
<pre
:style="{
fontFamily: 'monospace',
lineHeight: '1.6',
background: 'var(--n-color)',
border: '1px solid var(--n-border-color)',
borderRadius: '6px',
padding: '12px',
overflowX: 'auto',
whiteSpace: 'pre-wrap',
margin: 0,
}"
><template v-for="(seg, i) in segments" :key="i"
><span v-if="seg.type === 'code'" v-html="seg.html" /><input
v-else
:value="userInputs[seg.index]"
:disabled="allCorrect"
:style="{
width: inputWidth(seg.index),
fontFamily: 'monospace',
padding: '1px 4px',
borderRadius: '3px',
border: `1.5px solid ${
allCorrect
? '#18a058'
: wrongBlanks.has(seg.index)
? '#d03050'
: 'var(--n-border-color)'
}`,
background: allCorrect
? 'rgba(24,160,88,0.08)'
: wrongBlanks.has(seg.index)
? 'rgba(208,48,80,0.07)'
: 'transparent',
outline: 'none',
color: 'inherit',
minWidth: '4ch',
}"
@input="userInputs[seg.index] = ($event.target as HTMLInputElement).value"
/></template></pre>
<n-alert
v-if="wrongBlanks.size > 0 || allCorrect"
:type="allCorrect ? 'success' : 'error'"
:title="allCorrect ? '全部正确!' : '有填写错误,请检查红色标注的空位'"
style="margin-top: 12px"
/>
<n-space style="margin-top: 12px" :size="8">
<n-button
type="warning"
size="small"
:disabled="allCorrect"
@click="submit"
>
提交
</n-button>
<n-button size="small" @click="reset">重置</n-button>
</n-space>
</n-card>
</template>

View File

@@ -3,46 +3,75 @@ import { Exercise, ExerciseMcqData } from "utils/types"
const props = defineProps<{ exercise: Exercise }>() const props = defineProps<{ exercise: Exercise }>()
const data = computed(() => props.exercise.data as ExerciseMcqData) const data = computed(() => props.exercise.data as ExerciseMcqData)
const isSingle = computed(() => data.value.answer.length === 1)
const selected = ref<number | null>(null) const selected = ref<Set<number>>(new Set())
const correct = ref(false) const correct = ref(false)
const wrong = ref(false) const wrong = ref(false)
const partial = ref(false)
function select(idx: number) { function select(idx: number) {
if (correct.value) return if (correct.value) return
selected.value = idx const s = new Set(selected.value)
if (isSingle.value) {
s.clear()
if (!selected.value.has(idx)) s.add(idx)
} else {
if (s.has(idx)) s.delete(idx)
else s.add(idx)
}
selected.value = s
wrong.value = false wrong.value = false
partial.value = false
} }
function submit() { function submit() {
if (selected.value === null || correct.value) return if (selected.value.size === 0 || correct.value) return
if (selected.value === data.value.answer) { const answer = new Set(data.value.answer)
const sel = selected.value
const isEqual =
sel.size === answer.size && [...sel].every((v) => answer.has(v))
if (isEqual) {
correct.value = true correct.value = true
wrong.value = false wrong.value = false
partial.value = false
} else {
selected.value = new Set()
const hasIntersection = [...sel].some((v) => answer.has(v))
if (hasIntersection) {
partial.value = true
wrong.value = false
} else { } else {
wrong.value = true wrong.value = true
selected.value = null partial.value = false
}
} }
} }
function reset() { function reset() {
selected.value = null selected.value = new Set()
correct.value = false correct.value = false
wrong.value = false wrong.value = false
partial.value = false
} }
function optionType(idx: number): "default" | "primary" | "success" { function optionType(idx: number): "default" | "primary" | "success" {
if (correct.value && idx === data.value.answer) return "success" if (correct.value && data.value.answer.includes(idx)) return "success"
if (idx === selected.value) return "primary" if (selected.value.has(idx)) return "primary"
return "default" return "default"
} }
</script> </script>
<template> <template>
<n-card size="small" style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"> <n-card
size="small"
style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"
>
<template #header> <template #header>
<n-space align="center" :size="8"> <n-space align="center" :size="8">
<n-tag type="success" size="small" :bordered="false">练一练 · 选择题</n-tag> <n-tag type="success" size="small" :bordered="false">
练一练 · {{ isSingle ? "单选题" : "多选题" }}
</n-tag>
</n-space> </n-space>
</template> </template>
@@ -55,21 +84,29 @@ function optionType(idx: number): "default" | "primary" | "success" {
:type="optionType(idx)" :type="optionType(idx)"
:secondary="optionType(idx) !== 'default'" :secondary="optionType(idx) !== 'default'"
:tertiary="optionType(idx) === 'default'" :tertiary="optionType(idx) === 'default'"
:strong="idx === selected" :strong="selected.has(idx)"
:style="{ justifyContent: 'flex-start', width: '100%', textAlign: 'left' }" :style="{
justifyContent: 'flex-start',
width: '100%',
textAlign: 'left',
}"
@click="select(idx)" @click="select(idx)"
> >
<template #icon> <template #icon>
<span style="font-weight: 700">{{ String.fromCharCode(65 + idx) }}</span> <span style="font-weight: 700">{{
String.fromCharCode(65 + idx)
}}</span>
</template> </template>
{{ opt }} {{ opt }}
</n-button> </n-button>
</n-space> </n-space>
<n-alert <n-alert
v-if="correct || wrong" v-if="correct || wrong || partial"
:type="correct ? 'success' : 'error'" :type="correct ? 'success' : partial ? 'warning' : 'error'"
:title="correct ? '正确!' : '选择有误,请重试'" :title="
correct ? '正确!' : partial ? '部分正确,请重试' : '选择有误,请重试'
"
style="margin-top: 12px" style="margin-top: 12px"
/> />
@@ -77,7 +114,7 @@ function optionType(idx: number): "default" | "primary" | "success" {
<n-button <n-button
type="primary" type="primary"
size="small" size="small"
:disabled="selected === null || correct" :disabled="selected.size === 0 || correct"
@click="submit" @click="submit"
> >
提交 提交

View File

@@ -22,11 +22,14 @@ function shuffle(arr: LineItem[]): LineItem[] {
;[a[i], a[j]] = [a[j], a[i]] ;[a[i], a[j]] = [a[j], a[i]]
} }
const isCorrect = a.every((item, i) => item.originalIdx === i) const isCorrect = a.every((item, i) => item.originalIdx === i)
return isCorrect && a.length > 1 ? shuffle(arr) : a if (isCorrect && a.length > 1) [a[0], a[1]] = [a[1], a[0]]
return a
} }
function init() { function init() {
lines.value = shuffle(data.value.lines.map((text, idx) => ({ originalIdx: idx, text }))) lines.value = shuffle(
data.value.lines.map((text, idx) => ({ originalIdx: idx, text })),
)
submitted.value = false submitted.value = false
} }
@@ -54,7 +57,9 @@ function lineStatus(idx: number): "correct" | "wrong" | "default" {
return lines.value[idx].originalIdx === idx ? "correct" : "wrong" return lines.value[idx].originalIdx === idx ? "correct" : "wrong"
} }
const allCorrect = computed(() => lines.value.every((item, i) => item.originalIdx === i)) const allCorrect = computed(() =>
lines.value.every((item, i) => item.originalIdx === i),
)
function submit() { function submit() {
submitted.value = true submitted.value = true
@@ -71,11 +76,14 @@ function escapeHtml(text: string): string {
const lineHtmlMap = computed<Record<number, string>>(() => { const lineHtmlMap = computed<Record<number, string>>(() => {
const rawLines = data.value.lines const rawLines = data.value.lines
const map: Record<number, string> = {} const map: Record<number, string> = {}
const lang = props.lang === "python" ? "python" : props.lang === "c" ? "c" : null const lang =
props.lang === "python" ? "python" : props.lang === "c" ? "c" : null
if (lang) { if (lang) {
try { try {
const result = hljs.highlight(rawLines.join("\n"), { language: lang }).value const result = hljs.highlight(rawLines.join("\n"), {
language: lang,
}).value
result.split("\n").forEach((html, i) => { result.split("\n").forEach((html, i) => {
map[i] = html map[i] = html
}) })
@@ -93,9 +101,14 @@ const lineHtmlMap = computed<Record<number, string>>(() => {
</script> </script>
<template> <template>
<n-card size="small" style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"> <n-card
size="small"
style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"
>
<template #header> <template #header>
<n-tag type="info" size="small" :bordered="false">练一练 · 代码排序</n-tag> <n-tag type="info" size="small" :bordered="false"
>练一练 · 代码排序</n-tag
>
</template> </template>
<p style="font-weight: 500; margin-bottom: 12px">{{ data.question }}</p> <p style="font-weight: 500; margin-bottom: 12px">{{ data.question }}</p>
@@ -126,7 +139,6 @@ const lineHtmlMap = computed<Record<number, string>>(() => {
: 'transparent', : 'transparent',
cursor: 'grab', cursor: 'grab',
fontFamily: 'monospace', fontFamily: 'monospace',
fontSize: '13px',
userSelect: 'none', userSelect: 'none',
}" }"
@dragstart="onDragStart(idx)" @dragstart="onDragStart(idx)"
@@ -146,7 +158,12 @@ const lineHtmlMap = computed<Record<number, string>>(() => {
/> />
<n-space style="margin-top: 12px" :size="8"> <n-space style="margin-top: 12px" :size="8">
<n-button type="info" size="small" :disabled="submitted && allCorrect" @click="submit"> <n-button
type="info"
size="small"
:disabled="submitted && allCorrect"
@click="submit"
>
提交 提交
</n-button> </n-button>
<n-button size="small" @click="reset">重置</n-button> <n-button size="small" @click="reset">重置</n-button>
@@ -157,29 +174,51 @@ const lineHtmlMap = computed<Record<number, string>>(() => {
<style> <style>
.hljs-keyword, .hljs-keyword,
.hljs-operator, .hljs-operator,
.hljs-selector-tag { color: #d73a49; } .hljs-selector-tag {
color: #d73a49;
}
.hljs-string, .hljs-string,
.hljs-regexp, .hljs-regexp,
.hljs-template-literal { color: #032f62; } .hljs-template-literal {
color: #032f62;
}
.hljs-comment, .hljs-comment,
.hljs-quote { color: #6a737d; font-style: italic; } .hljs-quote {
color: #6a737d;
font-style: italic;
}
.hljs-number, .hljs-number,
.hljs-literal { color: #005cc5; } .hljs-literal {
color: #005cc5;
}
.hljs-built_in, .hljs-built_in,
.hljs-title.function_, .hljs-title.function_,
.hljs-class .hljs-title { color: #6f42c1; } .hljs-class .hljs-title {
color: #6f42c1;
}
.dark .hljs-keyword, .dark .hljs-keyword,
.dark .hljs-operator, .dark .hljs-operator,
.dark .hljs-selector-tag { color: #c678dd; } .dark .hljs-selector-tag {
color: #c678dd;
}
.dark .hljs-string, .dark .hljs-string,
.dark .hljs-regexp, .dark .hljs-regexp,
.dark .hljs-template-literal { color: #98c379; } .dark .hljs-template-literal {
color: #98c379;
}
.dark .hljs-comment, .dark .hljs-comment,
.dark .hljs-quote { color: #7f848e; font-style: italic; } .dark .hljs-quote {
color: #7f848e;
font-style: italic;
}
.dark .hljs-number, .dark .hljs-number,
.dark .hljs-literal { color: #e5c07b; } .dark .hljs-literal {
color: #e5c07b;
}
.dark .hljs-built_in, .dark .hljs-built_in,
.dark .hljs-title.function_, .dark .hljs-title.function_,
.dark .hljs-class .hljs-title { color: #61afef; } .dark .hljs-class .hljs-title {
color: #61afef;
}
</style> </style>

View File

@@ -3,11 +3,21 @@ import { Exercise } from "utils/types"
const ExerciseMcq = defineAsyncComponent(() => import("./ExerciseMcq.vue")) const ExerciseMcq = defineAsyncComponent(() => import("./ExerciseMcq.vue"))
const ExerciseSort = defineAsyncComponent(() => import("./ExerciseSort.vue")) const ExerciseSort = defineAsyncComponent(() => import("./ExerciseSort.vue"))
const ExerciseFill = defineAsyncComponent(() => import("./ExerciseFill.vue"))
defineProps<{ exercise: Exercise; lang?: string }>() defineProps<{ exercise: Exercise; lang?: string }>()
</script> </script>
<template> <template>
<ExerciseMcq v-if="exercise.type === 'mcq'" :exercise="exercise" /> <ExerciseMcq v-if="exercise.type === 'mcq'" :exercise="exercise" />
<ExerciseSort v-else-if="exercise.type === 'sort'" :exercise="exercise" :lang="lang" /> <ExerciseSort
v-else-if="exercise.type === 'sort'"
:exercise="exercise"
:lang="lang"
/>
<ExerciseFill
v-else-if="exercise.type === 'fill'"
:exercise="exercise"
:lang="lang"
/>
</template> </template>

View File

@@ -4,7 +4,10 @@ type Segment =
| { type: "md"; content: string } | { type: "md"; content: string }
| { type: "exercise"; exercise: Exercise } | { type: "exercise"; exercise: Exercise }
export function parseExercises(content: string, exercises: Exercise[]): Segment[] { export function parseExercises(
content: string,
exercises: Exercise[],
): Segment[] {
const exerciseMap = new Map(exercises.map((e) => [e.id, e])) const exerciseMap = new Map(exercises.map((e) => [e.id, e]))
const segments: Segment[] = [] const segments: Segment[] = []
const regex = /\[\[exercise:(\d+)\]\]/g const regex = /\[\[exercise:(\d+)\]\]/g
@@ -13,7 +16,10 @@ export function parseExercises(content: string, exercises: Exercise[]): Segment[
while ((match = regex.exec(content)) !== null) { while ((match = regex.exec(content)) !== null) {
if (match.index > lastIndex) { if (match.index > lastIndex) {
segments.push({ type: "md", content: content.slice(lastIndex, match.index) }) segments.push({
type: "md",
content: content.slice(lastIndex, match.index),
})
} }
const id = parseInt(match[1]) const id = parseInt(match[1])
const exercise = exerciseMap.get(id) const exercise = exerciseMap.get(id)

View File

@@ -34,7 +34,11 @@
:theme="isDark ? 'dark' : 'light'" :theme="isDark ? 'dark' : 'light'"
:model-value="seg.content" :model-value="seg.content"
/> />
<ExerciseWidget v-else :exercise="seg.exercise" :lang="tutorial.type" /> <ExerciseWidget
v-else
:exercise="seg.exercise"
:lang="tutorial.type"
/>
</template> </template>
</n-card> </n-card>
</n-gi> </n-gi>
@@ -74,7 +78,11 @@
:theme="isDark ? 'dark' : 'light'" :theme="isDark ? 'dark' : 'light'"
:model-value="seg.content" :model-value="seg.content"
/> />
<ExerciseWidget v-else :exercise="seg.exercise" :lang="tutorial.type" /> <ExerciseWidget
v-else
:exercise="seg.exercise"
:lang="tutorial.type"
/>
</template> </template>
</n-tab-pane> </n-tab-pane>
@@ -86,11 +94,21 @@
<n-divider style="margin: 12px 0" /> <n-divider style="margin: 12px 0" />
<n-flex align="center" justify="space-between"> <n-flex align="center" justify="space-between">
<n-button secondary type="primary" :disabled="isFirstLesson" @click="goToPrevLesson"> <n-button
secondary
type="primary"
:disabled="isFirstLesson"
@click="goToPrevLesson"
>
上一课 上一课
</n-button> </n-button>
<n-text>{{ step }} / {{ titles.length }}</n-text> <n-text>{{ step }} / {{ titles.length }}</n-text>
<n-button secondary type="primary" :disabled="isLastLesson" @click="goToNextLesson"> <n-button
secondary
type="primary"
:disabled="isLastLesson"
@click="goToNextLesson"
>
下一课 下一课
</n-button> </n-button>
</n-flex> </n-flex>
@@ -106,8 +124,12 @@ import { getTutorial, getTutorials, getExercises } from "../api"
import { parseExercises } from "./composables/useExerciseParse" import { parseExercises } from "./composables/useExerciseParse"
import { useBreakpoints } from "shared/composables/breakpoints" import { useBreakpoints } from "shared/composables/breakpoints"
const ExerciseWidget = defineAsyncComponent(() => import("./components/ExerciseWidget.vue")) const ExerciseWidget = defineAsyncComponent(
const CodeEditor = defineAsyncComponent(() => import("shared/components/CodeEditor.vue")) () => import("./components/ExerciseWidget.vue"),
)
const CodeEditor = defineAsyncComponent(
() => import("shared/components/CodeEditor.vue"),
)
const isDark = useDark() const isDark = useDark()
const route = useRoute() const route = useRoute()
@@ -119,7 +141,12 @@ const step = computed(() => {
return parseInt(route.params.step[0]) return parseInt(route.params.step[0])
}) })
const tutorial = ref<Partial<Tutorial>>({ id: 0, title: "", content: "", code: "" }) const tutorial = ref<Partial<Tutorial>>({
id: 0,
title: "",
content: "",
code: "",
})
const titles = ref<{ id: number; title: string }[]>([]) const titles = ref<{ id: number; title: string }[]>([])
const exercises = ref<Exercise[]>([]) const exercises = ref<Exercise[]>([])
const activeTab = ref("content") const activeTab = ref("content")
@@ -147,9 +174,12 @@ async function init() {
titles.value = res1.data titles.value = res1.data
if (titles.value.length === 0) return if (titles.value.length === 0) return
const id = titles.value[step.value - 1].id const id = titles.value[step.value - 1].id
const [res2, exs] = await Promise.all([getTutorial(id), getExercises(id)]) const [res2, exs] = await Promise.allSettled([
tutorial.value = res2.data getTutorial(id),
exercises.value = exs getExercises(id),
])
if (res2.status === "fulfilled") tutorial.value = res2.value.data
exercises.value = exs.status === "fulfilled" ? exs.value : []
} }
watch( watch(

View File

@@ -6,20 +6,18 @@ const problemStore = useProblemStore()
const { problem } = storeToRefs(problemStore) const { problem } = storeToRefs(problemStore)
const mermaidContainer = useTemplateRef<HTMLElement>("mermaidContainer") const mermaidContainer = useTemplateRef<HTMLElement>("mermaidContainer")
// 使用 mermaid composable
const { renderError, renderFlowchart } = useMermaid() const { renderError, renderFlowchart } = useMermaid()
// 渲染流程图的函数
const renderProblemFlowchart = async () => { const renderProblemFlowchart = async () => {
if (problem.value?.mermaid_code) { await renderFlowchart(
await renderFlowchart(mermaidContainer.value, problem.value.mermaid_code) mermaidContainer.value,
} problem.value?.mermaid_code ?? "",
)
} }
// 初始化Mermaid并渲染 onMounted(renderProblemFlowchart)
onMounted(() => {
renderProblemFlowchart() watch(() => problem.value?.mermaid_code, renderProblemFlowchart)
})
</script> </script>
<template> <template>

View File

@@ -50,7 +50,7 @@ const columns: DataTableColumn<Submission>[] = [
text: true, text: true,
type: "info", type: "info",
onClick: () => { onClick: () => {
showCodePanel(row.id, <string>route.params.problemID ?? "") showCodePanel(row.id, (route.params.problemID as string) ?? "")
}, },
}, },
() => row.id.slice(0, 12), () => row.id.slice(0, 12),
@@ -116,8 +116,8 @@ async function listSubmissions() {
...query, ...query,
myself: "1", myself: "1",
offset, offset,
problem_id: <string>route.params.problemID ?? "", problem_id: (route.params.problemID as string) ?? "",
contest_id: <string>route.params.contestID ?? "", contest_id: (route.params.contestID as string) ?? "",
}) })
submissions.value = res.data.results submissions.value = res.data.results
total.value = res.data.total total.value = res.data.total
@@ -125,7 +125,7 @@ async function listSubmissions() {
async function getRankOfThisProblem() { async function getRankOfThisProblem() {
loading.value = true loading.value = true
const res = await getRankOfProblem(<string>route.params.problemID ?? "") const res = await getRankOfProblem((route.params.problemID as string) ?? "")
loading.value = false loading.value = false
class_name.value = res.data.class_name class_name.value = res.data.class_name

View File

@@ -24,8 +24,8 @@ const codeStore = useCodeStore()
const problemStore = useProblemStore() const problemStore = useProblemStore()
const { problem } = storeToRefs(problemStore) const { problem } = storeToRefs(problemStore)
const route = useRoute() const route = useRoute()
const contestID = <string>route.params.contestID ?? "" const contestID = (route.params.contestID as string) ?? ""
const problemSetId = <string>route.params.problemSetId ?? "" const problemSetId = (route.params.problemSetId as string) ?? ""
const router = useRouter() const router = useRouter()
const [commentPanel] = useToggle() const [commentPanel] = useToggle()

View File

@@ -72,15 +72,19 @@ export function useMermaidConverter() {
// 添加样式定义来区分不同类型的节点 // 添加样式定义来区分不同类型的节点
mermaid += "\n" mermaid += "\n"
mermaid += mermaid +=
" classDef startEnd fill:#e1f5fe,stroke:#01579b,stroke-width:2px\n" " classDef startNode fill:#dcfce7,stroke:#16a34a,stroke-width:2.5px,color:#0f172a\n"
mermaid += mermaid +=
" classDef input fill:#e3f2fd,stroke:#1976d2,stroke-width:2px\n" " classDef endNode fill:#fee2e2,stroke:#dc2626,stroke-width:2.5px,color:#0f172a\n"
mermaid += mermaid +=
" classDef output fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px\n" " classDef input fill:#dbeafe,stroke:#2563eb,stroke-width:2.5px,color:#0f172a\n"
mermaid += mermaid +=
" classDef process fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px\n" " classDef output fill:#ede9fe,stroke:#7c3aed,stroke-width:2.5px,color:#0f172a\n"
mermaid += mermaid +=
" classDef decision fill:#fff3e0,stroke:#e65100,stroke-width:2px\n" " classDef process fill:#f0f9ff,stroke:#0284c7,stroke-width:2.5px,color:#0f172a\n"
mermaid +=
" classDef decision fill:#fef3c7,stroke:#d97706,stroke-width:2.5px,color:#0f172a\n"
mermaid +=
" classDef loop fill:#fae8ff,stroke:#c026d3,stroke-width:2.5px,color:#0f172a\n"
mermaid += "\n" mermaid += "\n"
// 为节点应用样式 // 为节点应用样式
@@ -90,8 +94,10 @@ export function useMermaidConverter() {
switch (originalType) { switch (originalType) {
case "start": case "start":
mermaid += ` class ${nodeId} startNode\n`
break
case "end": case "end":
mermaid += ` class ${nodeId} startEnd\n` mermaid += ` class ${nodeId} endNode\n`
break break
case "input": case "input":
mermaid += ` class ${nodeId} input\n` mermaid += ` class ${nodeId} input\n`
@@ -100,9 +106,11 @@ export function useMermaidConverter() {
mermaid += ` class ${nodeId} output\n` mermaid += ` class ${nodeId} output\n`
break break
case "decision": case "decision":
case "loop":
mermaid += ` class ${nodeId} decision\n` mermaid += ` class ${nodeId} decision\n`
break break
case "loop":
mermaid += ` class ${nodeId} loop\n`
break
default: default:
mermaid += ` class ${nodeId} process\n` mermaid += ` class ${nodeId} process\n`
} }

View File

@@ -15,7 +15,6 @@ import { renderTableTitle } from "utils/renders"
import ProblemStatus from "./components/ProblemStatus.vue" import ProblemStatus from "./components/ProblemStatus.vue"
import AuthorSelect from "shared/components/AuthorSelect.vue" import AuthorSelect from "shared/components/AuthorSelect.vue"
import ProblemListTitle from "./components/ProblemListTitle.vue" import ProblemListTitle from "./components/ProblemListTitle.vue"
import { labelRect } from "mermaid/dist/rendering-util/rendering-elements/shapes/labelRect"
interface Tag { interface Tag {
id: number id: number
@@ -221,12 +220,12 @@ function rowProps(row: ProblemFiltered) {
<template> <template>
<n-flex vertical size="large"> <n-flex vertical size="large">
<n-flex justify="space-between"> <div class="problem-list-toolbar">
<n-space> <n-space>
<n-form :show-feedback="false" inline label-placement="left"> <n-form :show-feedback="false" inline label-placement="left">
<n-form-item label="难度"> <n-form-item label="难度">
<n-select <n-select
style="width: 120px" style="width: 100px"
v-model:value="query.difficulty" v-model:value="query.difficulty"
:options="difficultyOptions" :options="difficultyOptions"
/> />
@@ -238,7 +237,7 @@ function rowProps(row: ProblemFiltered) {
<n-form :show-feedback="false" inline label-placement="left"> <n-form :show-feedback="false" inline label-placement="left">
<n-form-item label="排序"> <n-form-item label="排序">
<n-select <n-select
style="width: 120px" style="width: 100px"
v-model:value="query.sort" v-model:value="query.sort"
:options="sortOptions" :options="sortOptions"
/> />
@@ -274,8 +273,8 @@ function rowProps(row: ProblemFiltered) {
</n-form-item> </n-form-item>
</n-form> </n-form>
</n-space> </n-space>
<Hitokoto v-if="isDesktop" /> <Hitokoto v-if="isDesktop" class="problem-list-hitokoto" />
</n-flex> </div>
<n-collapse-transition :show="showTag"> <n-collapse-transition :show="showTag">
<n-flex> <n-flex>
<n-tag <n-tag
@@ -304,4 +303,32 @@ function rowProps(row: ProblemFiltered) {
/> />
</template> </template>
<style scoped></style> <style scoped>
.problem-list-toolbar {
display: grid;
grid-template-columns: minmax(0, auto) minmax(250px, 1fr);
align-items: start;
gap: 12px 16px;
}
.problem-list-toolbar :deep(.n-space) {
min-width: 0;
}
.problem-list-hitokoto {
justify-self: end;
width: 100%;
max-width: 720px;
min-width: 0;
}
@media (max-width: 768px) {
.problem-list-toolbar {
grid-template-columns: minmax(0, 1fr);
}
.problem-list-toolbar :deep(.n-space) {
width: 100%;
}
}
</style>

View File

@@ -81,7 +81,7 @@ async function copyToProblem() {
} }
const contestID = submission.value!.contest const contestID = submission.value!.contest
const problemSetId = <string>route.params.problemSetId ?? "" const problemSetId = (route.params.problemSetId as string) ?? ""
if (contestID) { if (contestID) {
// 竞赛题目 // 竞赛题目
router.push({ router.push({

View File

@@ -103,7 +103,7 @@ async function listSubmissions() {
...query, ...query,
offset, offset,
problem_id: query.problem, problem_id: query.problem,
contest_id: <string>route.params.contestID ?? "", contest_id: (route.params.contestID as string) ?? "",
language: query.language, language: query.language,
today: query.today, today: query.today,
}) })

View File

@@ -93,7 +93,7 @@ function groupBadgesByIcon(badges: UserBadgeType[]): GroupedBadge[] {
async function init() { async function init() {
toggle(true) toggle(true)
try { try {
const res = await getProfile(<string>route.query.name) const res = await getProfile(route.query.name as string)
profile.value = res.data profile.value = res.data
const acm = res.data.acm_problems_status.problems || {} const acm = res.data.acm_problems_status.problems || {}
const oi = res.data.oi_problems_status.problems || {} const oi = res.data.oi_problems_status.problems || {}
@@ -114,7 +114,7 @@ async function init() {
} }
if (route.query.name) { if (route.query.name) {
promises.push(getUserBadges(<string>route.query.name)) promises.push(getUserBadges(route.query.name as string))
} else { } else {
promises.push(getUserBadges()) promises.push(getUserBadges())
} }

View File

@@ -26,7 +26,7 @@ import { useBreakpoints } from "shared/composables/breakpoints"
const route = useRoute() const route = useRoute()
const { isMobile } = useBreakpoints() const { isMobile } = useBreakpoints()
const hiddenICP = computed(() => const hiddenICP = computed(() =>
["problem", "contest problem"].includes(<string>route.name), ["problem", "contest problem"].includes(route.name as string),
) )
function goICP() { function goICP() {

View File

@@ -30,9 +30,11 @@ function toggleDark(event: MouseEvent) {
isDark.value = !isDark.value isDark.value = !isDark.value
return return
} }
document.startViewTransition(() => { document
.startViewTransition(() => {
isDark.value = !isDark.value isDark.value = !isDark.value
}).ready.then(() => { })
.ready.then(() => {
document.documentElement.animate( document.documentElement.animate(
{ {
clipPath: [ clipPath: [
@@ -46,7 +48,8 @@ function toggleDark(event: MouseEvent) {
pseudoElement: "::view-transition-new(root)", pseudoElement: "::view-transition-new(root)",
}, },
) )
}).catch(() => {}) })
.catch(() => {})
} }
// 从 store 中获取屏幕模式状态 // 从 store 中获取屏幕模式状态

View File

@@ -26,27 +26,44 @@ onMounted(receive)
@click="receive" @click="receive"
v-if="hitokoto.sentence" v-if="hitokoto.sentence"
> >
<div class="sentence">{{ hitokoto.sentence }}</div> <span class="from">{{ "来自 " + hitokoto.from }}</span>
<div class="from">{{ "来自 " + hitokoto.from }}</div> <span class="sentence">{{ hitokoto.sentence }}</span>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.hitokoto { .hitokoto {
cursor: pointer; cursor: pointer;
height: 34px; height: 36px;
min-width: 0;
display: flow-root;
overflow: hidden;
text-align: right;
line-height: 18px;
word-break: break-all;
}
.hitokoto::before {
content: "";
float: right;
width: 0;
height: 18px;
} }
.hitokoto .sentence { .hitokoto .sentence {
max-width: 400px; text-align: right;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
} }
.hitokoto .from { .hitokoto .from {
float: right; float: right;
clear: right;
max-width: min(45%, 260px);
margin-left: 8px;
text-align: right;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 12px; font-size: 12px;
line-height: 18px;
color: grey; color: grey;
} }
</style> </style>

View File

@@ -1,102 +1,35 @@
<script setup lang="ts"> <script setup lang="ts">
import { copyToClipboard, getRandomId } from "utils/functions" import { copyToClipboard } from "utils/functions"
import { useMermaid } from "shared/composables/useMermaid"
// 动态导入 mermaid
let mermaid: any = null
const modelValue = defineModel<string>({ default: "" }) const modelValue = defineModel<string>({ default: "" })
const mermaidContainer = useTemplateRef<HTMLElement>("mermaidContainer") const mermaidContainer = useTemplateRef<HTMLElement>("mermaidContainer")
// 渲染状态 const { renderFlowchart, renderError, renderSuccess } = useMermaid()
const renderSuccess = ref(false)
// 定义事件
const emit = defineEmits<{ const emit = defineEmits<{
renderSuccess: [] renderSuccess: []
}>() }>()
// 动态加载 Mermaid
const loadMermaid = async () => {
if (!mermaid) {
const mermaidModule = await import("mermaid")
mermaid = mermaidModule.default
mermaid.initialize({
startOnLoad: false,
securityLevel: "strict",
theme: "default",
})
}
return mermaid
}
// 初始化
onMounted(async () => {
await loadMermaid()
nextTick(() => {
renderMermaid()
})
})
// 监听代码变化
watch(modelValue, () => {
renderMermaid()
})
// 渲染Mermaid图表
const renderMermaid = async () => { const renderMermaid = async () => {
if (!mermaidContainer.value) { await renderFlowchart(mermaidContainer.value, modelValue.value)
renderSuccess.value = false if (renderSuccess.value) emit("renderSuccess")
return
}
// 总是先清空容器
mermaidContainer.value.innerHTML = ""
// 如果没有内容,直接返回
if (!modelValue.value.trim()) {
renderSuccess.value = false
return
}
try {
// 确保 mermaid 已加载
const mermaidInstance = await loadMermaid()
const id = `mermaid-${getRandomId()}`
const { svg } = await mermaidInstance.render(id, modelValue.value)
mermaidContainer.value.innerHTML = svg
// 渲染成功
renderSuccess.value = true
emit("renderSuccess")
} catch (error: any) {
const errorMessage = error?.message || "请检查代码语法"
renderSuccess.value = false
const errorDiv = document.createElement("div")
errorDiv.style.cssText = "color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;"
const titleP = document.createElement("p")
titleP.textContent = "Mermaid语法错误"
const detailP = document.createElement("p")
detailP.style.cssText = "font-size: 12px; color: #666;"
detailP.textContent = errorMessage
errorDiv.appendChild(titleP)
errorDiv.appendChild(detailP)
mermaidContainer.value.innerHTML = ""
mermaidContainer.value.appendChild(errorDiv)
}
} }
// 清空代码 onMounted(() => {
nextTick(renderMermaid)
})
watch(modelValue, renderMermaid)
const clearCode = () => { const clearCode = () => {
modelValue.value = "" modelValue.value = ""
} }
// 复制代码 const copyCode = () => {
const copyCode = async () => {
copyToClipboard(modelValue.value) copyToClipboard(modelValue.value)
} }
// 组件卸载时清空容器
onBeforeUnmount(() => { onBeforeUnmount(() => {
if (mermaidContainer.value) { if (mermaidContainer.value) {
mermaidContainer.value.innerHTML = "" mermaidContainer.value.innerHTML = ""
@@ -120,7 +53,6 @@ onBeforeUnmount(() => {
</n-flex> </n-flex>
<n-input <n-input
class="code-editor" class="code-editor"
ref="codeEditor"
v-model:value="modelValue" v-model:value="modelValue"
type="textarea" type="textarea"
:autosize="{ minRows: 10, maxRows: 20 }" :autosize="{ minRows: 10, maxRows: 20 }"
@@ -133,6 +65,14 @@ onBeforeUnmount(() => {
渲染成功 渲染成功
</n-tag> </n-tag>
</n-flex> </n-flex>
<n-alert
v-if="renderError"
type="error"
title="Mermaid 语法错误"
style="margin-bottom: 8px"
>
<n-text style="font-size: 12px">{{ renderError }}</n-text>
</n-alert>
<div ref="mermaidContainer" class="mermaid-container"></div> <div ref="mermaidContainer" class="mermaid-container"></div>
</n-flex> </n-flex>
</n-flex> </n-flex>

View File

@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { import type {
IDomEditor, IDomEditor,
IEditorConfig, IEditorConfig,
IToolbarConfig, IToolbarConfig,
@@ -25,6 +25,7 @@ const props = withDefaults(defineProps<Props>(), {
const message = useMessage() const message = useMessage()
const editorRef = shallowRef<IDomEditor>() const editorRef = shallowRef<IDomEditor>()
const toolbarEditorRef = shallowRef<IDomEditor>()
const toolbarConfig: Partial<IToolbarConfig> = { const toolbarConfig: Partial<IToolbarConfig> = {
toolbarKeys: [ toolbarKeys: [
@@ -91,8 +92,10 @@ function onClick() {
editorRef.value.focus() editorRef.value.focus()
} }
function handleCreated(editor: IDomEditor) { async function handleCreated(editor: IDomEditor) {
editorRef.value = editor editorRef.value = editor
await nextTick()
toolbarEditorRef.value = editor
} }
async function customUpload(file: File, insertFn: InsertFnType) { async function customUpload(file: File, insertFn: InsertFnType) {
@@ -113,7 +116,7 @@ async function customUpload(file: File, insertFn: InsertFnType) {
<div class="editorWrapper"> <div class="editorWrapper">
<Toolbar <Toolbar
class="toolbar" class="toolbar"
:editor="editorRef" :editor="toolbarEditorRef"
:defaultConfig="props.simple ? toolbarConfigSimple : toolbarConfig" :defaultConfig="props.simple ? toolbarConfigSimple : toolbarConfig"
mode="simple" mode="simple"
/> />

View File

@@ -1,43 +1,177 @@
import { getRandomId } from "utils/functions" import { getRandomId } from "utils/functions"
export function useMermaid() { const mermaidThemeVariables = {
// 渲染状态 primaryColor: "#eff6ff",
const renderError = ref<string | null>(null) primaryTextColor: "#1d4ed8",
primaryBorderColor: "#3b82f6",
lineColor: "#94a3b8",
background: "#ffffff",
mainBkg: "#eff6ff",
fontFamily:
'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
}
// 动态导入 mermaid const displayStyleId = "oj-mermaid-display-style"
let mermaid: any = null
// 动态加载 Mermaid const shapes = ["rect", "polygon", "ellipse", "circle", "path"]
const loadMermaid = async () => {
if (!mermaid) { function nodeShapeRule(cls: string, fill: string, stroke: string) {
const sel = shapes
.map((s) => `.oj-mermaid-flowchart g.node.${cls} ${s}`)
.join(",\n")
return `${sel} { fill: ${fill} !important; stroke: ${stroke} !important; }`
}
function nodeLabelRule(cls: string, color: string) {
const bases = [".label", ".nodeLabel", ".nodeLabel p", ".label span"]
const sel = bases
.map((b) => `.oj-mermaid-flowchart g.node.${cls} ${b}`)
.join(",\n")
return `${sel} { color: ${color} !important; fill: ${color} !important; }`
}
const mermaidDisplayStyle = `
.oj-mermaid-flowchart {
max-width: 100%;
height: auto;
}
/* Default node */
.oj-mermaid-flowchart g.node rect,
.oj-mermaid-flowchart g.node polygon,
.oj-mermaid-flowchart g.node ellipse,
.oj-mermaid-flowchart g.node circle,
.oj-mermaid-flowchart g.node path {
fill: #eff6ff !important;
stroke: #3b82f6 !important;
stroke-width: 1.8px !important;
}
/* Default node text */
.oj-mermaid-flowchart g.node .label,
.oj-mermaid-flowchart g.node .nodeLabel,
.oj-mermaid-flowchart g.node .nodeLabel p,
.oj-mermaid-flowchart g.node .label span {
color: #1d4ed8 !important;
fill: #1d4ed8 !important;
font-weight: 600 !important;
}
/* startNode / startEnd */
${nodeShapeRule("startNode", "#dcfce7", "#16a34a")}
${nodeShapeRule("startEnd", "#dcfce7", "#16a34a")}
${nodeLabelRule("startNode", "#166534")}
${nodeLabelRule("startEnd", "#166534")}
/* endNode */
${nodeShapeRule("endNode", "#fee2e2", "#dc2626")}
${nodeLabelRule("endNode", "#991b1b")}
/* input */
${nodeShapeRule("input", "#dbeafe", "#2563eb")}
${nodeLabelRule("input", "#1e40af")}
/* output */
${nodeShapeRule("output", "#ede9fe", "#7c3aed")}
${nodeLabelRule("output", "#5b21b6")}
/* process */
${nodeShapeRule("process", "#f1f5f9", "#64748b")}
${nodeLabelRule("process", "#334155")}
/* decision */
${nodeShapeRule("decision", "#fef9c3", "#ca8a04")}
${nodeLabelRule("decision", "#92400e")}
/* loop */
${nodeShapeRule("loop", "#fae8ff", "#c026d3")}
${nodeLabelRule("loop", "#7e22ce")}
/* Edges */
.oj-mermaid-flowchart .edgePaths path.path,
.oj-mermaid-flowchart .flowchart-link {
stroke: #94a3b8 !important;
stroke-width: 1.8px !important;
}
/* Arrowheads */
.oj-mermaid-flowchart marker path,
.oj-mermaid-flowchart .marker {
fill: #94a3b8 !important;
stroke: #94a3b8 !important;
}
/* Edge label background */
.oj-mermaid-flowchart .edgeLabel rect,
.oj-mermaid-flowchart .edgeLabel .labelBkg {
fill: rgba(255, 255, 255, 0.9) !important;
stroke: #e2e8f0 !important;
}
/* Edge label text */
.oj-mermaid-flowchart .edgeLabel,
.oj-mermaid-flowchart .edgeLabel span,
.oj-mermaid-flowchart .edgeLabel p {
color: #475569 !important;
font-weight: 600 !important;
}
`
const svgNamespace = "http://www.w3.org/2000/svg"
function applyFlowchartDisplayStyle(container: HTMLElement) {
container.classList.add("oj-mermaid-surface")
const svg = container.querySelector("svg")
if (!svg) return
svg.classList.add("oj-mermaid-flowchart")
svg.querySelector(`#${displayStyleId}`)?.remove()
const style = document.createElementNS(svgNamespace, "style")
style.setAttribute("id", displayStyleId)
style.textContent = mermaidDisplayStyle
svg.insertBefore(style, svg.firstChild)
}
let mermaidInstance: any = null
async function loadMermaid() {
if (!mermaidInstance) {
const mermaidModule = await import("mermaid") const mermaidModule = await import("mermaid")
mermaid = mermaidModule.default mermaidInstance = mermaidModule.default
mermaid.initialize({ mermaidInstance.initialize({
startOnLoad: false, startOnLoad: false,
securityLevel: "strict", securityLevel: "strict",
theme: "default", theme: "base",
themeVariables: mermaidThemeVariables,
}) })
} }
return mermaid return mermaidInstance
} }
export function useMermaid() {
const renderError = ref<string | null>(null)
const renderSuccess = ref(false)
// 渲染流程图的函数
const renderFlowchart = async ( const renderFlowchart = async (
container: HTMLElement | null, container: HTMLElement | null,
mermaidCode: string, mermaidCode: string,
) => { ) => {
try {
renderError.value = null renderError.value = null
renderSuccess.value = false
// 确保 mermaid 已加载 if (container) container.innerHTML = ""
await loadMermaid()
// 渲染流程图 if (!container || !mermaidCode?.trim()) return
if (container && mermaidCode) {
try {
const m = await loadMermaid()
const id = `mermaid-${getRandomId()}` const id = `mermaid-${getRandomId()}`
const { svg } = await mermaid.render(id, mermaidCode) const { svg } = await m.render(id, mermaidCode)
container.innerHTML = svg container.innerHTML = svg
} applyFlowchartDisplayStyle(container)
renderSuccess.value = true
} catch (error) { } catch (error) {
renderError.value = renderError.value =
error instanceof Error error instanceof Error
@@ -46,13 +180,13 @@ export function useMermaid() {
} }
} }
// 清除渲染错误
const clearError = () => { const clearError = () => {
renderError.value = null renderError.value = null
} }
return { return {
renderError: readonly(renderError), renderError: readonly(renderError),
renderSuccess: readonly(renderSuccess),
renderFlowchart, renderFlowchart,
clearError, clearError,
} }

View File

@@ -582,7 +582,7 @@ export interface Tutorial {
export interface ExerciseMcqData { export interface ExerciseMcqData {
question: string question: string
options: string[] options: string[]
answer: number answer: number[]
} }
export interface ExerciseSortData { export interface ExerciseSortData {
@@ -590,10 +590,15 @@ export interface ExerciseSortData {
lines: string[] lines: string[]
} }
export interface ExerciseFillData {
question: string
code: string
}
export interface Exercise { export interface Exercise {
id: number id: number
type: 'mcq' | 'sort' type: "mcq" | "sort" | "fill"
data: ExerciseMcqData | ExerciseSortData data: ExerciseMcqData | ExerciseSortData | ExerciseFillData
order: number order: number
} }

20
tsconfig.app.json Normal file
View File

@@ -0,0 +1,20 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"paths": {
"utils/*": ["./src/utils/*"],
"oj/*": ["./src/oj/*"],
"admin/*": ["./src/admin/*"],
"shared/*": ["./src/shared/*"]
},
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["src/**/*.ts", "src/**/*.vue"]
}

View File

@@ -1,24 +1,7 @@
{ {
"compilerOptions": { "files": [],
"target": "ESNext", "references": [
"useDefineForClassFields": true, { "path": "./tsconfig.app.json" },
"module": "ESNext", { "path": "./tsconfig.node.json" }
"strict": true, ]
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true,
"paths": {
"shared/*": ["./src/shared/*"],
"utils/*": ["./src/utils/*"],
"oj/*": ["./src/oj/*"],
"admin/*": ["./src/admin/*"],
},
"types": ["naive-ui/volar"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
} }

View File

@@ -1,9 +1,24 @@
{ {
"compilerOptions": { "compilerOptions": {
"composite": true, "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Node", "skipLibCheck": true,
"allowSyntheticDefaultImports": true
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
}, },
"include": ["rsbuild.config.ts"] "include": ["rsbuild.config.ts"]
} }