feat: circuit builder, electronics lab, SPICE simulator, expanded skill tree
Workbenches: - Circuit Builder: drag-and-drop logic gates, wire connections, truth table verification, fullscreen mode - Electronics Lab: SPICE-like DC simulator with MNA solver, voltage sources, resistors, capacitors, LEDs, switches, NMOS/PMOS transistors, voltmeter, ammeter, play/pause simulation, fullscreen mode - Explanation renderer: auto-detects ASCII truth tables and renders them as styled HTML Skill tree: - 65+ nodes across 19 groups spanning math → electronics → CPU → ASM → OS → networking → web - Groups: Aritmética, Álgebra, Lógica, Electrónica, Circuitos Digitales, Secuenciales, Tu CPU, Verilog/HDL, Arquitectura Extendida, Sistemas Operativos, Programación en C, Redes, La Web, Señales, Síntesis Audio, Gráficos, Tu Consola - Dependency highlighting: clicking a node dims all others and highlights the full path - Group boxes with colored borders around related nodes - Dependency chain audit: fixed illogical prerequisites throughout the tree Content: - 24 electronics challenges (basics, series/parallel, capacitors, diodes, transistors, op-amps, power supplies) - 12 circuit builder challenges (logic gates, NAND universality, combinational circuits) - Fixed all explanation spoilers: examples now use different numbers than the challenge questions - Probe system now requires voltmeter/ammeter instruments instead of checking arbitrary node IDs UX: - Custom dark-themed scrollbars - Fullscreen mode for circuit/electronics editors (portal-based, Esc to exit) - SVG coordinate fix using getScreenCTM for accurate wire placement in fullscreen - Meter reading labels positioned correctly regardless of component rotation - Scratchpad defaults to closed, persists open/close state in localStorage - Empty placeholder nodes show "Próximamente" instead of appearing completed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -126,7 +126,7 @@ export const useProgressStore = create<ProgressStore>()(
|
||||
const state = get();
|
||||
const completedNodeIds: string[] = [];
|
||||
for (const node of skillNodes) {
|
||||
const allDone = node.challenges.every(
|
||||
const allDone = node.challenges.length > 0 && node.challenges.every(
|
||||
(cId) => state.completedChallenges[`${node.id}/${cId}`]
|
||||
);
|
||||
if (allDone) completedNodeIds.push(node.id);
|
||||
@@ -141,7 +141,7 @@ export const useProgressStore = create<ProgressStore>()(
|
||||
|
||||
const completedNodeIds = get().getCompletedNodeIds();
|
||||
|
||||
const allDone = node.challenges.every(
|
||||
const allDone = node.challenges.length > 0 && node.challenges.every(
|
||||
(cId) => state.completedChallenges[`${node.id}/${cId}`]
|
||||
);
|
||||
if (allDone) return 'completed';
|
||||
|
||||
Reference in New Issue
Block a user