Readme-drop-in widgets

Component Widgets

One home for the reusable widgets you drop into any component or molecule page. Each is a self-contained web component — no build, no dependencies — and every one below is running live in this readme, not a screenshot. Hover them.

Feed them

Three ways in: src="…json", an inline <script type="application/json">, or el.data = {…}. Shadow-DOM isolated, light + dark.

They gang up

All widgets speak one lbr-hover bus (BroadcastChannel). Pin-keyed widgets — pinout, footprint, 3D, heat-sink via — cross-highlight by pin number.

Datasheet-style chip diagram

Pinout <adom-pinout>#

Pins on the sides, colored by type, exposed pad centered. The diagram and the table cross-highlight each other — hover a pin. Give it real pad xy and it lays out from the true footprint; omit it and it infers a quad/dual package.

<adom-pinout><script type="application/json">
  { mpn, package, pins:[{ number, name, type?, xy? }] }
</script></adom-pinout>
Live · hover a pin
Thermal design

Heat-sink via <adom-heatsink-via> new#

The recommended thermal-via array under the exposed pad, with via count, drill and pitch. It only renders when the part actually has an exposed pad — hand it a part with none and it says so instead of drawing a fake grid. Keyed on the EP's pin number, so it lights when you hover that pad in the pinout or footprint.

<adom-heatsink-via><script type="application/json">
  { mpn, package, ep:{ w_mm, h_mm, number } }   // or pads:[…] to detect the EP
</script></adom-heatsink-via>
Live
Reusable sub-circuit

Ganged molecule <adom-molecule> new#

A molecule as its ganged part set plus how they connect. Hover a net to light every part on it; hover a part to light its nets — the ganged relationship, made legible.

<adom-molecule><script type="application/json">
  { name, components:[{ ref, mpn, value?, package?, type? }], nets:[{ name, pins:[{ ref, pin }] }] }
</script></adom-molecule>
Live · hover a net or a part
At-a-glance render

Chip thumbnail <adom-chip-thumbnail> new#

A small rendered image of the actual part — in production, glb2png / the chip-thumbnailer off the part's GLB. Falls back to a clean placeholder when there's no render.

<adom-chip-thumbnail src="thumb.png" mpn="74HC00" package="SOIC-14"></adom-chip-thumbnail>
Live
Board page

Board → molecule <adom-moleculize> new#

Drop a .kicad_pcb and it reads the Edge.Cuts size in your browser, no backend, and shows the workcell molecule kicad-to-molecule would produce: wings + 4 grid-snapped machine pins. Only generating the file needs an AI thread.

<adom-moleculize></adom-moleculize>  <!-- drop a .kicad_pcb, or seed { width_mm, height_mm } -->
Live · drop a .kicad_pcb, or click ↻ to load one

Why these are live, not pictures

This page is a readme.html — the wiki serves it byte-for-byte in a sandboxed iframe where scripts run. So the widgets above aren't renders of the widgets; they are the widgets. Drop the same <adom-*> tags into any component page and they behave identically.

The generic one — registered wiki-wide

Table <adom-table> new#

Any JSON array as a filterable, sortable, facetable table. Not component-specific and not on the lbr-hover bus — and unlike the widgets above it ships with the adom-widget runtime bundled in, because the wiki's widget frame loads exactly one script. It is registered in adom/widgets, so any page can write the tag in plain markdown instead of hosting the script.

› in any README.md, on its own line
::adom-table{src="/OWNER/SLUG/render/data.json" columns="repo,owner,policy" facet="owner"}

Nine allowlisted attributes

src columns heading filter facet sort dim mark colorby. mark colours cells matching a pattern; colorby="col:field" takes the colour from each row's own data (#rgb / #rrggbb only, anything else dropped), so a page and any other rendering of the same data — an .svg export, say — cannot drift into disagreeing about who is which colour.

adom/widgets

On a private page, host it instead

The tag's frame is an opaque origin, so its src fetch carries no session: it 404s and the table renders empty with no error anywhere. Feed the widget inline JSON from a page section instead. See adom/wiki#166; adom/repo-ownership is a working host.

adom/wiki#166
Already covered — don't rebuild

Symbol · Footprint · 3D · Datasheet#

The heavy viewers already exist. These widgets sit alongside them on the same lbr-hover bus — they don't reimplement them.

Symbol · Footprint · 3D — adom-lbr

Canonical adom-lbr JSON: schematic symbol, footprint with layer stackup (KiCad + Altium), a first-class pin table, and per-lead 3D highlight. Embed the adom-lbr viewer; it already shares the hover bus, so it cross-links with the widgets here.

adom-lbr viewers

Datasheet — native viewer

Push the part's PDF and the wiki's native datasheet viewer renders it inline with pop-out. Nothing to build.

native