Compare commits

..

30 Commits

Author SHA1 Message Date
4ecd7bb229 fix3
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 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
67a23c51c8 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-23 02:31:57 -06:00
6331391792 feat: add interactive MCQ and code-sort exercise widgets to tutorial lessons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 01:52:20 -06:00
39 changed files with 1685 additions and 458 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

559
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": "^2.0.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", "core-js": "^3.49.0",
"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": {
@@ -923,97 +901,49 @@
"langium": "^4.0.0" "langium": "^4.0.0"
} }
}, },
"node_modules/@module-federation/error-codes": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@module-federation/error-codes/-/error-codes-0.22.0.tgz",
"integrity": "sha512-xF9SjnEy7vTdx+xekjPCV5cIHOGCkdn3pIxo9vU7gEZMIw0SvAEdsy6Uh17xaCpm8V0FWvR0SZoK9Ik6jGOaug==",
"dev": true,
"license": "MIT"
},
"node_modules/@module-federation/runtime": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@module-federation/runtime/-/runtime-0.22.0.tgz",
"integrity": "sha512-38g5iPju2tPC3KHMPxRKmy4k4onNp6ypFPS1eKGsNLUkXgHsPMBFqAjDw96iEcjri91BrahG4XcdyKi97xZzlA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@module-federation/error-codes": "0.22.0",
"@module-federation/runtime-core": "0.22.0",
"@module-federation/sdk": "0.22.0"
}
},
"node_modules/@module-federation/runtime-core": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@module-federation/runtime-core/-/runtime-core-0.22.0.tgz",
"integrity": "sha512-GR1TcD6/s7zqItfhC87zAp30PqzvceoeDGYTgF3Vx2TXvsfDrhP6Qw9T4vudDQL3uJRne6t7CzdT29YyVxlgIA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@module-federation/error-codes": "0.22.0",
"@module-federation/sdk": "0.22.0"
}
},
"node_modules/@module-federation/runtime-tools": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@module-federation/runtime-tools/-/runtime-tools-0.22.0.tgz",
"integrity": "sha512-4ScUJ/aUfEernb+4PbLdhM/c60VHl698Gn1gY21m9vyC1Ucn69fPCA1y2EwcCB7IItseRMoNhdcWQnzt/OPCNA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@module-federation/runtime": "0.22.0",
"@module-federation/webpack-bundler-runtime": "0.22.0"
}
},
"node_modules/@module-federation/sdk": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@module-federation/sdk/-/sdk-0.22.0.tgz",
"integrity": "sha512-x4aFNBKn2KVQRuNVC5A7SnrSCSqyfIWmm1DvubjbO9iKFe7ith5niw8dqSFBekYBg2Fwy+eMg4sEFNVvCAdo6g==",
"dev": true,
"license": "MIT"
},
"node_modules/@module-federation/webpack-bundler-runtime": {
"version": "0.22.0",
"resolved": "https://registry.npmjs.org/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.22.0.tgz",
"integrity": "sha512-aM8gCqXu+/4wBmJtVeMeeMN5guw3chf+2i6HajKtQv7SJfxV/f4IyNQJUeUQu9HfiAZHjqtMV5Lvq/Lvh8LdyA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@module-federation/runtime": "0.22.0",
"@module-federation/sdk": "0.22.0"
}
},
"node_modules/@napi-rs/wasm-runtime": { "node_modules/@napi-rs/wasm-runtime": {
"version": "1.0.7", "version": "1.1.4",
"resolved": "https://registry.npmmirror.com/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.7.tgz", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
"integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==", "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"dependencies": { "dependencies": {
"@emnapi/core": "^1.5.0",
"@emnapi/runtime": "^1.5.0",
"@tybys/wasm-util": "^0.10.1" "@tybys/wasm-util": "^0.10.1"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/Brooooooklyn"
},
"peerDependencies": {
"@emnapi/core": "^1.7.1",
"@emnapi/runtime": "^1.7.1"
} }
}, },
"node_modules/@rsbuild/core": { "node_modules/@rsbuild/core": {
"version": "1.7.5", "version": "2.0.5",
"resolved": "https://registry.npmmirror.com/@rsbuild/core/-/core-1.7.5.tgz", "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.0.5.tgz",
"integrity": "sha512-i37urpoV4y9NSsGiUOuLdoI42KJ5h4gAZ8EG8Ilmsond3bxoAoOCu7YvC+1pJ7p+r16suVPW8cki891ZKHOoXQ==", "integrity": "sha512-KajO50hbXb32S8MsyDh2f+xKcVeRy9Gfzdcy0JjpMLj22djHugly6jrGo7jH7ls9X6/TDcyCTncSuNK4+D2lTw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
"dependencies": { "dependencies": {
"@rspack/core": "~1.7.10", "@rspack/core": "~2.0.2",
"@rspack/lite-tapable": "~1.1.0", "@swc/helpers": "^0.5.21"
"@swc/helpers": "^0.5.20",
"core-js": "~3.47.0",
"jiti": "^2.6.1"
}, },
"bin": { "bin": {
"rsbuild": "bin/rsbuild.js" "rsbuild": "bin/rsbuild.js"
}, },
"engines": { "engines": {
"node": ">=18.12.0" "node": "^20.19.0 || >=22.12.0"
},
"peerDependencies": {
"core-js": ">= 3.0.0"
},
"peerDependenciesMeta": {
"core-js": {
"optional": true
}
} }
}, },
"node_modules/@rsbuild/plugin-vue": { "node_modules/@rsbuild/plugin-vue": {
@@ -1035,28 +965,28 @@
} }
}, },
"node_modules/@rspack/binding": { "node_modules/@rspack/binding": {
"version": "1.7.11", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/@rspack/binding/-/binding-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.0.2.tgz",
"integrity": "sha512-2MGdy2s2HimsDT444Bp5XnALzNRxuBNc7y0JzyuqKbHBywd4x2NeXyhWXXoxufaCFu5PBc9Qq9jyfjW2Aeh06Q==", "integrity": "sha512-0kZPplW9GWx8mfC6DfsaRY3QBIYPuUs42JfmSM6aSb8tMHZAXQeLeMB8M+h8i4SeI+aFtCgO6UuYGtyWf7+L+A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optionalDependencies": { "optionalDependencies": {
"@rspack/binding-darwin-arm64": "1.7.11", "@rspack/binding-darwin-arm64": "2.0.2",
"@rspack/binding-darwin-x64": "1.7.11", "@rspack/binding-darwin-x64": "2.0.2",
"@rspack/binding-linux-arm64-gnu": "1.7.11", "@rspack/binding-linux-arm64-gnu": "2.0.2",
"@rspack/binding-linux-arm64-musl": "1.7.11", "@rspack/binding-linux-arm64-musl": "2.0.2",
"@rspack/binding-linux-x64-gnu": "1.7.11", "@rspack/binding-linux-x64-gnu": "2.0.2",
"@rspack/binding-linux-x64-musl": "1.7.11", "@rspack/binding-linux-x64-musl": "2.0.2",
"@rspack/binding-wasm32-wasi": "1.7.11", "@rspack/binding-wasm32-wasi": "2.0.2",
"@rspack/binding-win32-arm64-msvc": "1.7.11", "@rspack/binding-win32-arm64-msvc": "2.0.2",
"@rspack/binding-win32-ia32-msvc": "1.7.11", "@rspack/binding-win32-ia32-msvc": "2.0.2",
"@rspack/binding-win32-x64-msvc": "1.7.11" "@rspack/binding-win32-x64-msvc": "2.0.2"
} }
}, },
"node_modules/@rspack/binding-darwin-arm64": { "node_modules/@rspack/binding-darwin-arm64": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-oduECiZVqbO5zlVw+q7Vy65sJFth99fWPTyucwvLJJtJkPL5n17Uiql2cYP6Ijn0pkqtf1SXgK8WjiKLG5bIig==", "integrity": "sha512-0o7lbgBBsDlICWdjIH0q3e0BsSco4GRiImHWVfZSVEG+q2+ykZJvSvYCVhPM1Co375Z0S3VMPa/8SjcY1FHwlw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1068,9 +998,9 @@
] ]
}, },
"node_modules/@rspack/binding-darwin-x64": { "node_modules/@rspack/binding-darwin-x64": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-a1+TtTE9ap6RalgFi7FGIgkJP6O4Vy6ctv+9WGJy53E4kuqHR0RygzaiVxCI/GMc/vBT9vY23hyrpWb3d1vtXA==", "integrity": "sha512-tOwxZpoPlTlRs/w6UyUinXJ4TYRVHMlR7+eQxO1R3muKpixvhXQjtvoaY16HuFyTVky5F0IfOoWr3x9FEsgdLg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1082,9 +1012,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-arm64-gnu": { "node_modules/@rspack/binding-linux-arm64-gnu": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-P0QrGRPbTWu6RKWfN0bDtbnEps3rXH0MWIMreZABoUrVmNQKtXR6e73J3ub6a+di5s2+K0M2LJ9Bh2/H4UsDUA==", "integrity": "sha512-1ZD4YFhG1rmgqj+W8hfwHyKV8xDxGsc/3KgU0FwmiVEX7JfzhCkgBO/xlCG79kRKSrzuVzt4icO/G3cCKn0pag==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1096,9 +1026,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-arm64-musl": { "node_modules/@rspack/binding-linux-arm64-musl": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-6ky7R43VMjWwmx3Yx7Jl7faLBBMAgMDt+/bN35RgwjiPgsIByz65EwytUVuW9rikB43BGHvA/eqlnjLrUzNBqw==", "integrity": "sha512-/PtTkM/DsDLjeuXTmeJeRfbjCDbcL9jvoVgZrgxYFZ28y2cdLvbChbW9uigOzs5dQEs1CIBQXMTTj7KhdBTuQg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1110,9 +1040,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-x64-gnu": { "node_modules/@rspack/binding-linux-x64-gnu": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-cuOJMfCOvb2Wgsry5enXJ3iT1FGUjdPqtGUBVupQlEG4ntSYsQ2PtF4wIDVasR3wdxC5nQbipOrDiN/u6fYsdQ==", "integrity": "sha512-bBjsZxMHRaPo6X9SokApm6ucs+UhXtAJFyJJyuk2BH4XJsLeCU9Dz1vMwioeohFbJUUeTASVPm6/BL+RhSaunw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1124,9 +1054,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-x64-musl": { "node_modules/@rspack/binding-linux-x64-musl": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-CoK37hva4AmHGh3VCsQXmGr40L36m1/AdnN5LEjUX6kx5rEH7/1nEBN6Ii72pejqDVvk9anEROmPDiPw10tpFg==", "integrity": "sha512-HjlpInqzabDNkhVsUJpsHPqa9QYVWBViJoyWNjzXCAW0vKMDvwaphyUvokSinX8FGTlZi/sr5UEaHJo6XtQ35g==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1138,9 +1068,9 @@
] ]
}, },
"node_modules/@rspack/binding-wasm32-wasi": { "node_modules/@rspack/binding-wasm32-wasi": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-OtrmnPUVJMxjNa3eDMfHyPdtlLRmmp/aIm0fQHlAOATbZvlGm12q7rhPW5BXTu1yh+1rQ1/uqvz+SzKEZXuJaQ==", "integrity": "sha512-YaRYNFLJRpkGfYjSWR7n9f+nQKtrlmrrffpAn/blc2geHcRvXoBc5SCs1idPtsLhj7H9qWWhs7ucjyHy4csWFg==",
"cpu": [ "cpu": [
"wasm32" "wasm32"
], ],
@@ -1148,13 +1078,15 @@
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"dependencies": { "dependencies": {
"@napi-rs/wasm-runtime": "1.0.7" "@emnapi/core": "1.10.0",
"@emnapi/runtime": "1.10.0",
"@napi-rs/wasm-runtime": "1.1.4"
} }
}, },
"node_modules/@rspack/binding-win32-arm64-msvc": { "node_modules/@rspack/binding-win32-arm64-msvc": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-lObFW6e5lCWNgTBNwT//yiEDbsxm9QG4BYUojqeXxothuzJ/L6ibXz6+gLMvbOvLGV3nKgkXmx8GvT9WDKR0mA==", "integrity": "sha512-d/3kTEKq+asLjRFPO96t+wfWiM7DLN76VQEPDD9bc1kdsZXlVJBuvyXfsgK8bbEvKplWXYcSsokhmEnuXrLOpg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -1166,9 +1098,9 @@
] ]
}, },
"node_modules/@rspack/binding-win32-ia32-msvc": { "node_modules/@rspack/binding-win32-ia32-msvc": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-0pYGnZd8PPqNR68zQ8skamqNAXEA1sUfXuAdYcknIIRq2wsbiwFzIc0Pov1cIfHYab37G7sSIPBiOUdOWF5Ivw==", "integrity": "sha512-161cWineq3RW+Jdm1FAfSpXeUtYWvhB3kAbm46vNT9h/YYz+spwsFMvveAZ1nsVSVL0IC5lDBGUte7yUAY8K2g==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -1180,9 +1112,9 @@
] ]
}, },
"node_modules/@rspack/binding-win32-x64-msvc": { "node_modules/@rspack/binding-win32-x64-msvc": {
"version": "1.7.11", "version": "2.0.2",
"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-2.0.2.tgz",
"integrity": "sha512-EeQXayoQk/uBkI3pdoXfQBXNIUrADq56L3s/DFyM2pJeUDrWmhfIw2UFIGkYPTMSCo8F2JcdcGM32FGJrSnU0Q==", "integrity": "sha512-y7Q0S1FE+OlkL5GMqLG0PwxrPw6E1r892KhGrGKE1Vdufe5YTEx6xTPxzZ+b7N2KPD7s9G1/iJmWHQxb1+Bjkg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -1194,23 +1126,25 @@
] ]
}, },
"node_modules/@rspack/core": { "node_modules/@rspack/core": {
"version": "1.7.11", "version": "2.0.2",
"resolved": "https://registry.npmmirror.com/@rspack/core/-/core-1.7.11.tgz", "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.0.2.tgz",
"integrity": "sha512-rsD9b+Khmot5DwCMiB3cqTQo53ioPG3M/A7BySu8+0+RS7GCxKm+Z+mtsjtG/vsu4Tn2tcqCdZtA3pgLoJB+ew==", "integrity": "sha512-VM3UHOo26uC+4QSqY5tU1ybI7KuXY5rTof8nhFOaBY9SYau0Smvr+hMSAPmrmHwknB6dXT8yaNVxrj7I+qxE1Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@module-federation/runtime-tools": "0.22.0", "@rspack/binding": "2.0.2"
"@rspack/binding": "1.7.11",
"@rspack/lite-tapable": "1.1.0"
}, },
"engines": { "engines": {
"node": ">=18.12.0" "node": "^20.19.0 || >=22.12.0"
}, },
"peerDependencies": { "peerDependencies": {
"@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",
"@swc/helpers": ">=0.5.1" "@swc/helpers": ">=0.5.1"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@module-federation/runtime-tools": {
"optional": true
},
"@swc/helpers": { "@swc/helpers": {
"optional": true "optional": true
} }
@@ -1225,7 +1159,7 @@
}, },
"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",
@@ -1240,9 +1174,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 +1835,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 +1849,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 +1861,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 +1899,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 +1942,65 @@
} }
}, },
"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/@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 +2010,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 +2035,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 +2285,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"
} }
@@ -2605,12 +2539,13 @@
} }
}, },
"node_modules/core-js": { "node_modules/core-js": {
"version": "3.47.0", "version": "3.49.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.47.0.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.49.0.tgz",
"integrity": "sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==", "integrity": "sha512-es1U2+YTtzpwkxVLwAFdSpaIMyQaq0PBgm3YD1W3Qpsn1NAmO3KSgZfu+oGSWVu6NvLHoHCV/aYcsE5wiB7ALg==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"peer": true,
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/core-js" "url": "https://opencollective.com/core-js"
@@ -3255,9 +3190,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 +3408,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",
@@ -3769,16 +3704,6 @@
"url": "https://github.com/sponsors/dmonad" "url": "https://github.com/sponsors/dmonad"
} }
}, },
"node_modules/jiti": {
"version": "2.6.1",
"resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.6.1.tgz",
"integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==",
"dev": true,
"license": "MIT",
"bin": {
"jiti": "lib/jiti-cli.mjs"
}
},
"node_modules/js-tokens": { "node_modules/js-tokens": {
"version": "9.0.1", "version": "9.0.1",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz",
@@ -3924,15 +3849,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 +3999,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 +4070,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 +4199,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 +4266,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 +4332,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 +4360,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 +4388,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 +4673,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 +4805,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 +4983,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 +5057,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 +5105,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 +5343,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": "^2.0.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", "core-js": "^3.49.0",
"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: {
@@ -73,10 +74,9 @@ export default defineConfig(({ envMode }) => {
}, },
define: publicVars, define: publicVars,
}, },
performance: { output: {
chunkSplit: { target: "web",
strategy: "split-by-module", polyfill: "usage",
},
}, },
resolve: { resolve: {
alias: { alias: {
@@ -96,3 +96,5 @@ export default defineConfig(({ envMode }) => {
}, },
} }
}) })
export default config

View File

@@ -58,8 +58,10 @@ provide("hljs", hljsInstance)
:date-locale="dateZhCN" :date-locale="dateZhCN"
:hljs="hljsInstance" :hljs="hljsInstance"
> >
<n-message-provider> <n-dialog-provider>
<router-view></router-view> <n-message-provider>
</n-message-provider> <router-view></router-view>
</n-message-provider>
</n-dialog-provider>
</n-config-provider> </n-config-provider>
</template> </template>

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

@@ -6,6 +6,7 @@ import {
BlankContest, BlankContest,
BlankProblem, BlankProblem,
Contest, Contest,
Exercise,
Server, Server,
TestcaseUploadedReturns, TestcaseUploadedReturns,
Tutorial, Tutorial,
@@ -261,6 +262,37 @@ export function setTutorialVisibility(id: number, is_public: boolean) {
return http.put("admin/tutorial/visibility", { id, is_public }) return http.put("admin/tutorial/visibility", { id, is_public })
} }
export async function getAdminExercises(tutorialId: number) {
const res = await http.get("admin/exercise", {
params: { tutorial_id: tutorialId },
})
return res.data as Exercise[]
}
export async function createExercise(data: {
tutorial_id: number
type: "mcq" | "sort" | "fill"
data: object
order: number
}) {
const res = await http.post("admin/exercise", data)
return res.data as Exercise
}
export async function updateExercise(data: {
id: number
type: "mcq" | "sort" | "fill"
data: object
order: number
}) {
const res = await http.put("admin/exercise", data)
return res.data as Exercise
}
export function deleteExercise(id: number) {
return http.delete("admin/exercise", { params: { id } })
}
// 将竞赛题目转为公开题目 // 将竞赛题目转为公开题目
export function makeProblemPublic(id: number, display_id: string) { export function makeProblemPublic(id: number, display_id: string) {
return http.post("admin/contest_problem/make_public", { return http.post("admin/contest_problem/make_public", {

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

@@ -0,0 +1,319 @@
<script setup lang="ts">
import {
Exercise,
ExerciseMcqData,
ExerciseSortData,
ExerciseFillData,
} from "utils/types"
import {
getAdminExercises,
createExercise,
updateExercise,
deleteExercise,
} from "admin/api"
const props = defineProps<{ tutorialId: number }>()
const message = useMessage()
const dialog = useDialog()
const exercises = ref<Exercise[]>([])
const showForm = ref(false)
const editingId = ref<number | null>(null)
const formType = ref<"mcq" | "sort" | "fill">("mcq")
const formOrder = ref(0)
const mcqQuestion = ref("")
const mcqOptions = ref(["", ""])
const mcqAnswer = ref<number[]>([])
const sortQuestion = ref("")
const sortCode = ref("")
const fillQuestion = ref("")
const fillCode = ref("")
async function load() {
exercises.value = await getAdminExercises(props.tutorialId)
}
onMounted(load)
function openCreate() {
editingId.value = null
formType.value = "mcq"
formOrder.value = exercises.value.length
mcqQuestion.value = ""
mcqOptions.value = ["", ""]
mcqAnswer.value = []
sortQuestion.value = ""
sortCode.value = ""
fillQuestion.value = ""
fillCode.value = ""
showForm.value = true
}
function openEdit(ex: Exercise) {
editingId.value = ex.id
formType.value = ex.type
formOrder.value = ex.order
if (ex.type === "mcq") {
const d = ex.data as ExerciseMcqData
mcqQuestion.value = d.question
mcqOptions.value = [...d.options]
mcqAnswer.value = [...d.answer]
} else if (ex.type === "sort") {
const d = ex.data as ExerciseSortData
sortQuestion.value = d.question
sortCode.value = d.lines.join("\n")
} else {
const d = ex.data as ExerciseFillData
fillQuestion.value = d.question
fillCode.value = d.code
}
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() {
if (formType.value === "mcq" && mcqAnswer.value.length === 0) {
message.error("请至少勾选一个正确答案")
return
}
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() !== ""),
}
} else {
data = { question: fillQuestion.value, code: fillCode.value }
}
try {
if (editingId.value) {
await updateExercise({
id: editingId.value,
type: formType.value,
data,
order: formOrder.value,
})
message.success("练习题已更新")
} else {
await createExercise({
tutorial_id: props.tutorialId,
type: formType.value,
data,
order: formOrder.value,
})
message.success("练习题已创建")
}
showForm.value = false
await load()
} catch (e: any) {
message.error(e.data ?? "保存失败")
}
}
function confirmDelete(id: number) {
dialog.warning({
title: "删除练习题",
content: "此操作不可撤销",
positiveText: "删除",
onPositiveClick: async () => {
await deleteExercise(id)
message.success("已删除")
await load()
},
})
}
function copyPlaceholder(id: number) {
navigator.clipboard.writeText(`[[exercise:${id}]]`)
message.success(`已复制 [[exercise:${id}]]`)
}
function typeName(type: string) {
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>
<template>
<div>
<n-flex justify="space-between" align="center" style="margin-bottom: 16px">
<n-text> {{ exercises.length }} 道练习题</n-text>
<n-button type="primary" size="small" @click="openCreate"
>+ 添加练习题</n-button
>
</n-flex>
<n-empty v-if="exercises.length === 0" description="暂无练习题" />
<n-list v-else bordered>
<n-list-item v-for="ex in exercises" :key="ex.id">
<n-flex justify="space-between" align="center">
<div>
<n-tag size="small" :type="typeTagType(ex.type)" :bordered="false">
{{ typeName(ex.type) }}
</n-tag>
<n-text style="margin-left: 10px">
{{ (ex.data as any).question }}
</n-text>
</div>
<n-space :size="8">
<n-tooltip trigger="hover">
<template #trigger>
<n-button size="small" @click="copyPlaceholder(ex.id)">
复制占位符
</n-button>
</template>
[[exercise:{{ ex.id }}]] 粘贴到 Markdown 内容中
</n-tooltip>
<n-button size="small" @click="openEdit(ex)">编辑</n-button>
<n-button size="small" type="error" @click="confirmDelete(ex.id)">
删除
</n-button>
</n-space>
</n-flex>
</n-list-item>
</n-list>
<n-modal
v-model:show="showForm"
:title="editingId ? '编辑练习题' : '新建练习题'"
preset="card"
style="width: 560px"
>
<n-form label-placement="top">
<n-form-item label="题型">
<n-radio-group v-model:value="formType" :disabled="!!editingId">
<n-radio value="mcq">选择题</n-radio>
<n-radio value="sort">代码排序</n-radio>
<n-radio value="fill">代码填空</n-radio>
</n-radio-group>
</n-form-item>
<n-form-item label="顺序">
<n-input-number
v-model:value="formOrder"
:min="0"
style="width: 100px"
/>
</n-form-item>
<template v-if="formType === 'mcq'">
<n-form-item label="题目">
<n-input
v-model:value="mcqQuestion"
type="textarea"
:rows="2"
placeholder="下面选项中正确是哪个?"
/>
</n-form-item>
<n-form-item label="选项(勾选所有正确答案)">
<n-space vertical style="width: 100%">
<n-flex
v-for="(opt, i) in mcqOptions"
:key="i"
align="center"
:size="8"
>
<n-checkbox
:checked="mcqAnswer.includes(i)"
@update:checked="toggleAnswer(i)"
/>
<n-input
v-model:value="mcqOptions[i]"
:placeholder="`选项 ${String.fromCharCode(65 + i)}`"
style="flex: 1"
/>
<n-button
size="small"
:disabled="mcqOptions.length <= 2"
@click="
() => {
mcqOptions.splice(i, 1)
mcqAnswer.value = mcqAnswer.value
.filter((a) => a !== i)
.map((a) => (a > i ? a - 1 : a))
}
"
>
</n-button>
</n-flex>
<n-button size="small" @click="mcqOptions.push('')">
+ 添加选项
</n-button>
</n-space>
</n-form-item>
</template>
<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-input
v-model:value="sortCode"
type="textarea"
:rows="10"
placeholder="在此粘贴正确的代码,保存后将自动按行拆分并乱序"
style="font-family: monospace"
/>
</n-form-item>
</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>
<template #footer>
<n-flex justify="end" :size="8">
<n-button @click="showForm = false">取消</n-button>
<n-button type="primary" @click="save">保存</n-button>
</n-flex>
</template>
</n-modal>
</div>
</template>

View File

@@ -3,6 +3,7 @@ import CodeEditor from "shared/components/CodeEditor.vue"
import MarkdownEditor from "shared/components/MarkdownEditor.vue" import MarkdownEditor from "shared/components/MarkdownEditor.vue"
import { Tutorial } from "utils/types" import { Tutorial } from "utils/types"
import { createTutorial, getTutorial, updateTutorial } from "../api" import { createTutorial, getTutorial, updateTutorial } from "../api"
import ExerciseManager from "./components/ExerciseManager.vue"
interface Props { interface Props {
tutorialID?: string tutorialID?: string
@@ -63,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)
} }
@@ -112,6 +112,10 @@ onMounted(init)
height="400px" height="400px"
/> />
</n-tab-pane> </n-tab-pane>
<n-tab-pane name="exercises" tab="练习题" :disabled="!tutorial.id">
<ExerciseManager v-if="tutorial.id" :tutorial-id="tutorial.id" />
<n-empty v-else description="请先保存教程后再添加练习题" />
</n-tab-pane>
</n-tabs> </n-tabs>
</template> </template>
<style scoped> <style scoped>

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

@@ -2,6 +2,7 @@ import { DIFFICULTY } from "utils/constants"
import { getACRate } from "utils/functions" import { getACRate } from "utils/functions"
import http from "utils/http" import http from "utils/http"
import { import {
Exercise,
Problem, Problem,
Submission, Submission,
SubmissionListPayload, SubmissionListPayload,
@@ -420,3 +421,10 @@ export function getProblemSetUserProgress(
) { ) {
return http.get(`problemset/${problemSetId}/users_progress`, { params }) return http.get(`problemset/${problemSetId}/users_progress`, { params })
} }
export async function getExercises(tutorialId: number): Promise<Exercise[]> {
const res = await http.get("exercises", {
params: { tutorial_id: tutorialId },
})
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

@@ -0,0 +1,125 @@
<script setup lang="ts">
import { Exercise, ExerciseMcqData } from "utils/types"
const props = defineProps<{ exercise: Exercise }>()
const data = computed(() => props.exercise.data as ExerciseMcqData)
const isSingle = computed(() => data.value.answer.length === 1)
const selected = ref<Set<number>>(new Set())
const correct = ref(false)
const wrong = ref(false)
const partial = ref(false)
function select(idx: number) {
if (correct.value) return
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
partial.value = false
}
function submit() {
if (selected.value.size === 0 || correct.value) return
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
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 {
wrong.value = true
partial.value = false
}
}
}
function reset() {
selected.value = new Set()
correct.value = false
wrong.value = false
partial.value = false
}
function optionType(idx: number): "default" | "primary" | "success" {
if (correct.value && data.value.answer.includes(idx)) return "success"
if (selected.value.has(idx)) return "primary"
return "default"
}
</script>
<template>
<n-card
size="small"
style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"
>
<template #header>
<n-space align="center" :size="8">
<n-tag type="success" size="small" :bordered="false">
练一练 · {{ isSingle ? "单选题" : "多选题" }}
</n-tag>
</n-space>
</template>
<p style="font-weight: 500; margin-bottom: 12px">{{ data.question }}</p>
<n-space vertical :size="8">
<n-button
v-for="(opt, idx) in data.options"
:key="idx"
:type="optionType(idx)"
:secondary="optionType(idx) !== 'default'"
:tertiary="optionType(idx) === 'default'"
:strong="selected.has(idx)"
:style="{
justifyContent: 'flex-start',
width: '100%',
textAlign: 'left',
}"
@click="select(idx)"
>
<template #icon>
<span style="font-weight: 700">{{
String.fromCharCode(65 + idx)
}}</span>
</template>
{{ opt }}
</n-button>
</n-space>
<n-alert
v-if="correct || wrong || partial"
:type="correct ? 'success' : partial ? 'warning' : 'error'"
:title="
correct ? '正确!' : partial ? '部分正确,请重试' : '选择有误,请重试'
"
style="margin-top: 12px"
/>
<n-space style="margin-top: 12px" :size="8">
<n-button
type="primary"
size="small"
:disabled="selected.size === 0 || correct"
@click="submit"
>
提交
</n-button>
<n-button size="small" @click="reset">重置</n-button>
</n-space>
</n-card>
</template>

View File

@@ -0,0 +1,224 @@
<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, ExerciseSortData } 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 ExerciseSortData)
type LineItem = { originalIdx: number; text: string }
const lines = ref<LineItem[]>([])
const submitted = ref(false)
function shuffle(arr: LineItem[]): LineItem[] {
const a = [...arr]
for (let i = a.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1))
;[a[i], a[j]] = [a[j], a[i]]
}
const isCorrect = a.every((item, i) => item.originalIdx === i)
if (isCorrect && a.length > 1) [a[0], a[1]] = [a[1], a[0]]
return a
}
function init() {
lines.value = shuffle(
data.value.lines.map((text, idx) => ({ originalIdx: idx, text })),
)
submitted.value = false
}
onMounted(init)
watch(() => props.exercise.id, init)
const dragIdx = ref<number | null>(null)
function onDragStart(idx: number) {
dragIdx.value = idx
}
function onDrop(targetIdx: number) {
if (dragIdx.value === null || dragIdx.value === targetIdx) return
const newLines = [...lines.value]
const [moved] = newLines.splice(dragIdx.value, 1)
newLines.splice(targetIdx, 0, moved)
lines.value = newLines
dragIdx.value = null
submitted.value = false
}
function lineStatus(idx: number): "correct" | "wrong" | "default" {
if (!submitted.value) return "default"
return lines.value[idx].originalIdx === idx ? "correct" : "wrong"
}
const allCorrect = computed(() =>
lines.value.every((item, i) => item.originalIdx === i),
)
function submit() {
submitted.value = true
}
function reset() {
init()
}
function escapeHtml(text: string): string {
return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
}
const lineHtmlMap = computed<Record<number, string>>(() => {
const rawLines = data.value.lines
const map: Record<number, string> = {}
const lang =
props.lang === "python" ? "python" : props.lang === "c" ? "c" : null
if (lang) {
try {
const result = hljs.highlight(rawLines.join("\n"), {
language: lang,
}).value
result.split("\n").forEach((html, i) => {
map[i] = html
})
} catch {
// fall through
}
}
rawLines.forEach((text, i) => {
if (map[i] === undefined) map[i] = escapeHtml(text)
})
return map
})
</script>
<template>
<n-card
size="small"
style="margin: 16px 0; border: 1.5px solid var(--n-border-color)"
>
<template #header>
<n-tag type="info" size="small" :bordered="false"
>练一练 · 代码排序</n-tag
>
</template>
<p style="font-weight: 500; margin-bottom: 12px">{{ data.question }}</p>
<n-space vertical :size="6">
<div
v-for="(line, idx) in lines"
:key="line.originalIdx"
draggable="true"
:style="{
display: 'flex',
alignItems: 'center',
gap: '10px',
padding: '8px 12px',
borderRadius: '6px',
border: `1.5px ${submitted ? 'solid' : 'dashed'} ${
lineStatus(idx) === 'correct'
? '#18a058'
: lineStatus(idx) === 'wrong'
? '#d03050'
: 'var(--n-border-color)'
}`,
background:
lineStatus(idx) === 'correct'
? 'rgba(24,160,88,0.08)'
: lineStatus(idx) === 'wrong'
? 'rgba(208,48,80,0.07)'
: 'transparent',
cursor: 'grab',
fontFamily: 'monospace',
userSelect: 'none',
}"
@dragstart="onDragStart(idx)"
@dragover.prevent
@drop="onDrop(idx)"
>
<span style="color: #bbb; cursor: grab"></span>
<span v-html="lineHtmlMap[line.originalIdx]" style="white-space: pre" />
</div>
</n-space>
<n-alert
v-if="submitted"
:type="allCorrect ? 'success' : 'error'"
:title="allCorrect ? '顺序正确!' : '顺序有误,红色行需要调整'"
style="margin-top: 12px"
/>
<n-space style="margin-top: 12px" :size="8">
<n-button
type="info"
size="small"
:disabled="submitted && allCorrect"
@click="submit"
>
提交
</n-button>
<n-button size="small" @click="reset">重置</n-button>
</n-space>
</n-card>
</template>
<style>
.hljs-keyword,
.hljs-operator,
.hljs-selector-tag {
color: #d73a49;
}
.hljs-string,
.hljs-regexp,
.hljs-template-literal {
color: #032f62;
}
.hljs-comment,
.hljs-quote {
color: #6a737d;
font-style: italic;
}
.hljs-number,
.hljs-literal {
color: #005cc5;
}
.hljs-built_in,
.hljs-title.function_,
.hljs-class .hljs-title {
color: #6f42c1;
}
.dark .hljs-keyword,
.dark .hljs-operator,
.dark .hljs-selector-tag {
color: #c678dd;
}
.dark .hljs-string,
.dark .hljs-regexp,
.dark .hljs-template-literal {
color: #98c379;
}
.dark .hljs-comment,
.dark .hljs-quote {
color: #7f848e;
font-style: italic;
}
.dark .hljs-number,
.dark .hljs-literal {
color: #e5c07b;
}
.dark .hljs-built_in,
.dark .hljs-title.function_,
.dark .hljs-class .hljs-title {
color: #61afef;
}
</style>

View File

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

View File

@@ -0,0 +1,37 @@
import { Exercise } from "utils/types"
type Segment =
| { type: "md"; content: string }
| { type: "exercise"; exercise: Exercise }
export function parseExercises(
content: string,
exercises: Exercise[],
): Segment[] {
const exerciseMap = new Map(exercises.map((e) => [e.id, e]))
const segments: Segment[] = []
const regex = /\[\[exercise:(\d+)\]\]/g
let lastIndex = 0
let match: RegExpExecArray | null
while ((match = regex.exec(content)) !== null) {
if (match.index > lastIndex) {
segments.push({
type: "md",
content: content.slice(lastIndex, match.index),
})
}
const id = parseInt(match[1])
const exercise = exerciseMap.get(id)
if (exercise) {
segments.push({ type: "exercise", exercise })
}
lastIndex = regex.lastIndex
}
if (lastIndex < content.length) {
segments.push({ type: "md", content: content.slice(lastIndex) })
}
return segments
}

View File

@@ -27,11 +27,19 @@
:bordered="false" :bordered="false"
size="small" size="small"
> >
<MdPreview <template v-for="(seg, i) in segments" :key="i">
preview-theme="vuepress" <MdPreview
:theme="isDark ? 'dark' : 'light'" v-if="seg.type === 'md'"
:model-value="tutorial.content" preview-theme="vuepress"
/> :theme="isDark ? 'dark' : 'light'"
:model-value="seg.content"
/>
<ExerciseWidget
v-else
:exercise="seg.exercise"
:lang="tutorial.type"
/>
</template>
</n-card> </n-card>
</n-gi> </n-gi>
@@ -63,11 +71,19 @@
</n-tab-pane> </n-tab-pane>
<n-tab-pane name="content" :tab="`第 ${step} 课`"> <n-tab-pane name="content" :tab="`第 ${step} 课`">
<MdPreview <template v-for="(seg, i) in segments" :key="i">
preview-theme="vuepress" <MdPreview
:theme="isDark ? 'dark' : 'light'" v-if="seg.type === 'md'"
:model-value="tutorial.content" preview-theme="vuepress"
/> :theme="isDark ? 'dark' : 'light'"
:model-value="seg.content"
/>
<ExerciseWidget
v-else
:exercise="seg.exercise"
:lang="tutorial.type"
/>
</template>
</n-tab-pane> </n-tab-pane>
<n-tab-pane name="code" tab="示例代码" v-if="tutorial.code"> <n-tab-pane name="code" tab="示例代码" v-if="tutorial.code">
@@ -103,25 +119,26 @@
<script setup lang="ts"> <script setup lang="ts">
import { MdPreview } from "md-editor-v3" import { MdPreview } from "md-editor-v3"
import "md-editor-v3/lib/preview.css" import "md-editor-v3/lib/preview.css"
import { Tutorial } from "utils/types" import { Tutorial, Exercise } from "utils/types"
import { getTutorial, getTutorials } from "../api" import { getTutorial, getTutorials, getExercises } from "../api"
import { parseExercises } from "./composables/useExerciseParse"
import { useBreakpoints } from "shared/composables/breakpoints" import { useBreakpoints } from "shared/composables/breakpoints"
const isDark = useDark()
const ExerciseWidget = defineAsyncComponent(
() => import("./components/ExerciseWidget.vue"),
)
const CodeEditor = defineAsyncComponent( const CodeEditor = defineAsyncComponent(
() => import("shared/components/CodeEditor.vue"), () => import("shared/components/CodeEditor.vue"),
) )
const isDark = useDark()
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const { isDesktop } = useBreakpoints() const { isDesktop } = useBreakpoints()
const step = computed(() => { const step = computed(() => {
if (!route.params.step || !route.params.step.length) return 1 if (!route.params.step || !route.params.step.length) return 1
else { return parseInt(route.params.step[0])
return parseInt(route.params.step[0])
}
}) })
const tutorial = ref<Partial<Tutorial>>({ const tutorial = ref<Partial<Tutorial>>({
@@ -130,29 +147,26 @@ const tutorial = ref<Partial<Tutorial>>({
content: "", content: "",
code: "", code: "",
}) })
const titles = ref<{ id: number; title: string }[]>([]) const titles = ref<{ id: number; title: string }[]>([])
const exercises = ref<Exercise[]>([])
const activeTab = ref("content") const activeTab = ref("content")
const segments = computed(() =>
parseExercises(tutorial.value.content ?? "", exercises.value),
)
const isFirstLesson = computed(() => step.value === 1) const isFirstLesson = computed(() => step.value === 1)
const isLastLesson = computed(() => step.value === titles.value.length) const isLastLesson = computed(() => step.value === titles.value.length)
function goToLesson(lessonNumber: number) { function goToLesson(lessonNumber: number) {
activeTab.value = "content" activeTab.value = "content"
const dest = lessonNumber.toString().padStart(2, "0") router.push("/learn/" + lessonNumber.toString().padStart(2, "0"))
router.push("/learn/" + dest)
} }
function goToPrevLesson() { function goToPrevLesson() {
if (step.value > 1) { if (step.value > 1) goToLesson(step.value - 1)
goToLesson(step.value - 1)
}
} }
function goToNextLesson() { function goToNextLesson() {
if (step.value < titles.value.length) { if (step.value < titles.value.length) goToLesson(step.value + 1)
goToLesson(step.value + 1)
}
} }
async function init() { async function init() {
@@ -160,15 +174,18 @@ 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 = await getTutorial(id) const [res2, exs] = await Promise.allSettled([
tutorial.value = res2.data getTutorial(id),
getExercises(id),
])
if (res2.status === "fulfilled") tutorial.value = res2.value.data
exercises.value = exs.status === "fulfilled" ? exs.value : []
} }
watch( watch(
() => route.params.step, () => route.params.step,
async () => { async () => {
if (route.name !== "learn") return if (route.name === "learn") init()
init()
}, },
{ immediate: true }, { immediate: true },
) )

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,23 +30,26 @@ function toggleDark(event: MouseEvent) {
isDark.value = !isDark.value isDark.value = !isDark.value
return return
} }
document.startViewTransition(() => { document
isDark.value = !isDark.value .startViewTransition(() => {
}).ready.then(() => { isDark.value = !isDark.value
document.documentElement.animate( })
{ .ready.then(() => {
clipPath: [ document.documentElement.animate(
`circle(0px at ${x}px ${y}px)`, {
`circle(${radius}px at ${x}px ${y}px)`, clipPath: [
], `circle(0px at ${x}px ${y}px)`,
}, `circle(${radius}px at ${x}px ${y}px)`,
{ ],
duration: 400, },
easing: "ease-in-out", {
pseudoElement: "::view-transition-new(root)", duration: 400,
}, easing: "ease-in-out",
) 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

@@ -73,7 +73,8 @@ const renderMermaid = async () => {
renderSuccess.value = false renderSuccess.value = false
const errorDiv = document.createElement("div") const errorDiv = document.createElement("div")
errorDiv.style.cssText = "color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;" errorDiv.style.cssText =
"color: #ff4d4f; padding: 20px; text-align: center; border: 1px dashed #ff4d4f; border-radius: 4px;"
const titleP = document.createElement("p") const titleP = document.createElement("p")
titleP.textContent = "Mermaid语法错误" titleP.textContent = "Mermaid语法错误"
const detailP = document.createElement("p") const detailP = document.createElement("p")

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,5 +1,236 @@
import { getRandomId } from "utils/functions" import { getRandomId } from "utils/functions"
const mermaidThemeVariables = {
primaryColor: "#e0f2fe",
primaryTextColor: "#0f172a",
primaryBorderColor: "#0284c7",
lineColor: "#64748b",
secondaryColor: "#f5f3ff",
tertiaryColor: "#ecfdf5",
background: "#ffffff",
mainBkg: "#f8fafc",
secondBkg: "#eef2ff",
tertiaryBkg: "#f0fdfa",
nodeBorder: "#2563eb",
clusterBkg: "#f8fafc",
clusterBorder: "#cbd5e1",
edgeLabelBackground: "#ffffff",
fontFamily:
'Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
}
const semanticNodeClasses = [
"startNode",
"endNode",
"startEnd",
"input",
"output",
"process",
"decision",
"loop",
]
const displayStyleId = "oj-mermaid-display-style"
const mermaidDisplayStyle = `
.oj-mermaid-flowchart {
max-width: 100%;
height: auto;
}
.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 {
stroke-width: 2.5px !important;
filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.12));
}
.oj-mermaid-flowchart g.node.startNode rect,
.oj-mermaid-flowchart g.node.startNode polygon,
.oj-mermaid-flowchart g.node.startNode ellipse,
.oj-mermaid-flowchart g.node.startNode circle,
.oj-mermaid-flowchart g.node.startNode path,
.oj-mermaid-flowchart g.node.startEnd rect,
.oj-mermaid-flowchart g.node.startEnd polygon,
.oj-mermaid-flowchart g.node.startEnd ellipse,
.oj-mermaid-flowchart g.node.startEnd circle,
.oj-mermaid-flowchart g.node.startEnd path {
fill: #dcfce7 !important;
stroke: #16a34a !important;
}
.oj-mermaid-flowchart g.node.endNode rect,
.oj-mermaid-flowchart g.node.endNode polygon,
.oj-mermaid-flowchart g.node.endNode ellipse,
.oj-mermaid-flowchart g.node.endNode circle,
.oj-mermaid-flowchart g.node.endNode path {
fill: #fee2e2 !important;
stroke: #dc2626 !important;
}
.oj-mermaid-flowchart g.node.input rect,
.oj-mermaid-flowchart g.node.input polygon,
.oj-mermaid-flowchart g.node.input ellipse,
.oj-mermaid-flowchart g.node.input circle,
.oj-mermaid-flowchart g.node.input path {
fill: #dbeafe !important;
stroke: #2563eb !important;
}
.oj-mermaid-flowchart g.node.output rect,
.oj-mermaid-flowchart g.node.output polygon,
.oj-mermaid-flowchart g.node.output ellipse,
.oj-mermaid-flowchart g.node.output circle,
.oj-mermaid-flowchart g.node.output path {
fill: #ede9fe !important;
stroke: #7c3aed !important;
}
.oj-mermaid-flowchart g.node.process rect,
.oj-mermaid-flowchart g.node.process polygon,
.oj-mermaid-flowchart g.node.process ellipse,
.oj-mermaid-flowchart g.node.process circle,
.oj-mermaid-flowchart g.node.process path {
fill: #f0f9ff !important;
stroke: #0284c7 !important;
}
.oj-mermaid-flowchart g.node.decision rect,
.oj-mermaid-flowchart g.node.decision polygon,
.oj-mermaid-flowchart g.node.decision ellipse,
.oj-mermaid-flowchart g.node.decision circle,
.oj-mermaid-flowchart g.node.decision path {
fill: #fef3c7 !important;
stroke: #d97706 !important;
}
.oj-mermaid-flowchart g.node.loop rect,
.oj-mermaid-flowchart g.node.loop polygon,
.oj-mermaid-flowchart g.node.loop ellipse,
.oj-mermaid-flowchart g.node.loop circle,
.oj-mermaid-flowchart g.node.loop path {
fill: #fae8ff !important;
stroke: #c026d3 !important;
}
.oj-mermaid-flowchart g.node.oj-node-palette-0 rect,
.oj-mermaid-flowchart g.node.oj-node-palette-0 polygon,
.oj-mermaid-flowchart g.node.oj-node-palette-0 ellipse,
.oj-mermaid-flowchart g.node.oj-node-palette-0 circle,
.oj-mermaid-flowchart g.node.oj-node-palette-0 path {
fill: #dbeafe !important;
stroke: #2563eb !important;
}
.oj-mermaid-flowchart g.node.oj-node-palette-1 rect,
.oj-mermaid-flowchart g.node.oj-node-palette-1 polygon,
.oj-mermaid-flowchart g.node.oj-node-palette-1 ellipse,
.oj-mermaid-flowchart g.node.oj-node-palette-1 circle,
.oj-mermaid-flowchart g.node.oj-node-palette-1 path {
fill: #ccfbf1 !important;
stroke: #0d9488 !important;
}
.oj-mermaid-flowchart g.node.oj-node-palette-2 rect,
.oj-mermaid-flowchart g.node.oj-node-palette-2 polygon,
.oj-mermaid-flowchart g.node.oj-node-palette-2 ellipse,
.oj-mermaid-flowchart g.node.oj-node-palette-2 circle,
.oj-mermaid-flowchart g.node.oj-node-palette-2 path {
fill: #ede9fe !important;
stroke: #7c3aed !important;
}
.oj-mermaid-flowchart g.node.oj-node-palette-3 rect,
.oj-mermaid-flowchart g.node.oj-node-palette-3 polygon,
.oj-mermaid-flowchart g.node.oj-node-palette-3 ellipse,
.oj-mermaid-flowchart g.node.oj-node-palette-3 circle,
.oj-mermaid-flowchart g.node.oj-node-palette-3 path {
fill: #ffe4e6 !important;
stroke: #e11d48 !important;
}
.oj-mermaid-flowchart g.node.oj-node-palette-4 rect,
.oj-mermaid-flowchart g.node.oj-node-palette-4 polygon,
.oj-mermaid-flowchart g.node.oj-node-palette-4 ellipse,
.oj-mermaid-flowchart g.node.oj-node-palette-4 circle,
.oj-mermaid-flowchart g.node.oj-node-palette-4 path {
fill: #fef3c7 !important;
stroke: #d97706 !important;
}
.oj-mermaid-flowchart g.node.oj-node-palette-5 rect,
.oj-mermaid-flowchart g.node.oj-node-palette-5 polygon,
.oj-mermaid-flowchart g.node.oj-node-palette-5 ellipse,
.oj-mermaid-flowchart g.node.oj-node-palette-5 circle,
.oj-mermaid-flowchart g.node.oj-node-palette-5 path {
fill: #dcfce7 !important;
stroke: #16a34a !important;
}
.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: #0f172a !important;
fill: #0f172a !important;
font-weight: 650 !important;
}
.oj-mermaid-flowchart .edgePaths path.path,
.oj-mermaid-flowchart .flowchart-link {
stroke: #64748b !important;
stroke-width: 2.4px !important;
}
.oj-mermaid-flowchart marker path,
.oj-mermaid-flowchart .marker {
fill: #64748b !important;
stroke: #64748b !important;
}
.oj-mermaid-flowchart .edgeLabel rect,
.oj-mermaid-flowchart .edgeLabel .labelBkg {
fill: rgba(255, 255, 255, 0.94) !important;
stroke: #cbd5e1 !important;
}
.oj-mermaid-flowchart .edgeLabel,
.oj-mermaid-flowchart .edgeLabel span,
.oj-mermaid-flowchart .edgeLabel p {
color: #334155 !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")
const nodes = Array.from(svg.querySelectorAll<SVGGElement>("g.node"))
nodes.forEach((node, index) => {
const hasSemanticClass = semanticNodeClasses.some((className) =>
node.classList.contains(className),
)
if (!hasSemanticClass) {
node.classList.add(`oj-node-palette-${index % 6}`)
}
})
svg.querySelector(`#${displayStyleId}`)?.remove()
const style = document.createElementNS(svgNamespace, "style")
style.setAttribute("id", displayStyleId)
style.textContent = mermaidDisplayStyle
svg.insertBefore(style, svg.firstChild)
}
export function useMermaid() { export function useMermaid() {
// 渲染状态 // 渲染状态
const renderError = ref<string | null>(null) const renderError = ref<string | null>(null)
@@ -15,7 +246,8 @@ export function useMermaid() {
mermaid.initialize({ mermaid.initialize({
startOnLoad: false, startOnLoad: false,
securityLevel: "strict", securityLevel: "strict",
theme: "default", theme: "base",
themeVariables: mermaidThemeVariables,
}) })
} }
return mermaid return mermaid
@@ -37,6 +269,7 @@ export function useMermaid() {
const id = `mermaid-${getRandomId()}` const id = `mermaid-${getRandomId()}`
const { svg } = await mermaid.render(id, mermaidCode) const { svg } = await mermaid.render(id, mermaidCode)
container.innerHTML = svg container.innerHTML = svg
applyFlowchartDisplayStyle(container)
} }
} catch (error) { } catch (error) {
renderError.value = renderError.value =

View File

@@ -579,6 +579,29 @@ export interface Tutorial {
created_at?: Date created_at?: Date
} }
export interface ExerciseMcqData {
question: string
options: string[]
answer: number[]
}
export interface ExerciseSortData {
question: string
lines: string[]
}
export interface ExerciseFillData {
question: string
code: string
}
export interface Exercise {
id: number
type: "mcq" | "sort" | "fill"
data: ExerciseMcqData | ExerciseSortData | ExerciseFillData
order: number
}
export interface DurationData { export interface DurationData {
unit: string unit: string
index: number index: number

14
tsconfig.app.json Normal file
View File

@@ -0,0 +1,14 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
/* 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"]
} }