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

Verification, 3D files, footprint variants new#

Three widgets every component page can carry, each fed by a JSON file committed in the page's own repo. Embed them in a README with the registered tags; the tools that write the JSON live in tools/ here.

::adom-verified{src="/OWNER/SLUG/render/verification.json"}
::adom-models{src="/OWNER/SLUG/render/models.json"}
::adom-footprint-variants{src="/OWNER/SLUG/render/footprint-variants/MPN.variants.json"}

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

Reuse reviewed chip artwork

The chip-thumbnail widget now accepts a cached-artwork manifest as well as an image. Its cache mode shows vector chip outlines, download links, exact virtual MPN placement, Z-up orientation and review state. The page’s existing 3D viewer shows the full chip. Existing image-only pages continue to work.

Read the component’s artwork/MPN-thumbs.json before generating anything. Compare source hashes and reuse its reviewed placement. Hash verification is recorded at publication time; native pin-1 and model-seating qualification remain separate.

::adom-chip-thumbnail{src="/OWNER/COMPONENT/render/artwork/MPN-thumbs.json"}

LOD previews now use on-demand component-owned asset frames for authenticated wiki sandbox loading. No GLBs load before the user enables 3D; disabling releases the viewer resources.

Component LOD listings

The adom-component-lod widget lists high, medium, low and super-low model derivatives, download sizes, decoded geometry buffer estimates, triangles, primitives, source hashes and review states. By default it shows small cached images of each level and creates no WebGL context. Turn on the optional 3D preview to inspect zoom-driven detail changes, then turn it off to release the model and viewer resources. Missing levels remain visible as missing.

::adom-component-lod{src="/OWNER/COMPONENT/render/lod/manifest.json"}

Feed the adom/component-lod@1 manifest through the registered Markdown tag. For sandboxed HTML, inline the shared script and manifest JSON. Reuse the reviewed pose and marking placement; verify hashes before downstream use. Candidate files and a listing alone do not establish native seating or manufacturing qualification.