Add author-mode level editor: forms, live checks, Python execution of solutions, learner preview, YAML export

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
denis
2026-10-16 16:51:33 +02:00
parent 3003eda8a2
commit 57bda6eecf
27 changed files with 1712 additions and 10 deletions
+5 -3
View File
@@ -180,12 +180,14 @@ export class LevelLinter {
// ---- Règles de contribution et cohérence des tests ----------------------------------------------------
#contribution(level, add) {
// Un seul rappel pour toutes les étapes narrées (sinon une ligne par étape noie le reste).
const narrated = level.steps.map((step, index) => (step.type === 'explain' && step.voice ? index : null)).filter((index) => index !== null);
if (narrated.length > 0) {
add('info', 'voice_to_generate', ['steps', narrated[0]], { steps: narrated.map((index) => index + 1).join(', ') });
}
level.steps.forEach((step, index) => {
const path = ['steps', index];
if (step.type === 'explain') {
if (step.voice) {
add('info', 'voice_to_generate', path);
}
return;
}
this.#tests(step.tests, [...path, 'tests'], add);