teaching: run lessons in-app through an iframe-driven console
The teaching console now lives inside Web FreeCAD: web/teaching-console.html hosts the workbench in a same-origin iframe and drives its DOM directly, with no Node server and no spawned Chrome. The driver modules run in the framed page's own realm (bridge.ts publishes window.__teaching), so the proven driver/assembly code is reused unchanged and the CSP without 'unsafe-eval' is never crossed. - steps.ts globs both courses' ui-steps records (skipping their index.json manifests) so each lesson downloads only its own chunk - runner.ts checks prerequisites in dependency order, then runs part or assembly lessons; a pass stores the FCStd in OPFS freecad-documents under the course document name, which is what assembly lessons consume - assembly lessons insert, joint, solve and save through lib/assembly.mjs; insertLink falls back to UI-suffixed object names (Body1 for Body) - check-inapp-console.mjs (npm run check:console-inapp) is green: preflight, P01 volume within 6e-13, OPFS evidence, both viewports - run-inapp-lessons.mjs runs a whole course in one browser; reducer 23 parts + assembly and carrier 20 parts + assembly all pass in-browser Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
17
web/tsconfig.json
Normal file
17
web/tsconfig.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"jsx": "react-jsx",
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
"isolatedModules": true,
|
||||
"allowJs": true,
|
||||
"resolveJsonModule": true,
|
||||
"types": ["vite/client"]
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
Reference in New Issue
Block a user