Adds the runtime plumbing that Phase 1b's SPICE event loop will drive: - `publishVoltage(componentId, pin, voltage)` updates a (componentId, pin) → volts cache and notifies every matching subscriber. - `getCurrentVoltage(...)` reads the cache (was previously stubbed null). - subscribe/publish routing exercised by 7 new unit tests. The scheduler still does not yet drive ngspice — `start()`, `onMcuPinChange()` are unchanged. But once Phase 1b's solve loop is in place, calling `publishVoltage` after each `readVec` is all the wiring needed for components to start reacting to SPICE-resolved analog states. This is the smallest non-trivial step that keeps the architecture honest (no test-only emitters; the same code path will be used in production). Tests skip booting the WASM worker — they call publishVoltage directly, so they pass in plain Vitest with no JSDOM Worker shim. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __pro_stub__ | ||
| __tests__ | ||
| assets | ||
| components | ||
| data | ||
| hooks | ||
| i18n | ||
| lib | ||
| pages | ||
| services | ||
| simulation | ||
| store | ||
| tokens | ||
| types | ||
| utils | ||
| velxio-elements | ||
| App.css | ||
| App.tsx | ||
| entry-server.tsx | ||
| index.css | ||
| main.tsx | ||
| seoRoutes.ts | ||
| vite-env.d.ts | ||