app
adom-layout-viewer
Public Made by Adomby adom
Interactive PCB layout viewer: your EDA's own render plus live net/trace highlighting and per-pad stock, price and wiki lookup
import puppeteer from 'puppeteer';
const b = await puppeteer.launch({ headless: 'new', args: ['--no-sandbox'] });
const p = await b.newPage();
await p.setViewport({ width: 900, height: 760, deviceScaleFactor: 2 });
const errs = []; p.on('pageerror', e => errs.push(String(e)));
await p.goto('http://localhost:8795/', { waitUntil: 'networkidle0' });
await new Promise(r => setTimeout(r, 500));
// hover U1 (has MPN) → card + enrichment
await p.evaluate(async () => {
const hs = [...document.querySelectorAll('.adom-hotspot')].find(h => h.getAttribute('data-ref') === 'U1');
const r = hs.getBoundingClientRect();
hs.dispatchEvent(new MouseEvent('mousemove', { bubbles: true, clientX: r.left + r.width / 2, clientY: r.top + r.height / 2 }));
});
// wait for enrichment pills to arrive (server already warmed cache)
await new Promise(r => setTimeout(r, 2500));
const card = await p.evaluate(() => document.querySelector('#card').innerText);
console.log('CARD:\n' + card);
console.log('ERRORS', JSON.stringify(errs));
await p.screenshot({ path: '/tmp/pcbtest/live_card.png' });
await b.close();