app
Component Widgets
Public Made by Adomby adom
Reusable component widgets for pinouts, thermal vias, molecule relationships, reviewed chip outlines and lightweight four-level LOD cache listings.
← Commit history
README: document <adom-table>, now fully registered in adom/widgets
The page has shipped widgets/adom-table.js for a while without naming it
anywhere in its own docs. adom/widgets#3 merged, so the registry entry is
complete at 9 attrs (colorby was the last), and any page can now reach the
tag from plain markdown. Records the attr list, the data-driven colorby
rule, and the private-page caveat (adom/wiki#166) with repo-ownership as
the working host.
1 file changed
+22
README.md+22@@ -27,6 +27,28 @@ Each is one custom element: Shadow DOM, no dependencies, light + dark (or or `src=`. All speak one `BroadcastChannel('lbr-hover')` bus, so pin-keyed widgets (pinout, heat-sink via, and adom-lbr's footprint + 3D) light the same pin together. +## Also here: `<adom-table>`++`widgets/adom-table.js` is the generic one — any JSON array as a filterable, sortable,+facetable table, not component-specific and not on the hover bus. 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`](/adom/widgets), so any page can write it as plain+markdown rather than hosting the script:++```markdown+::adom-table{src="/OWNER/SLUG/render/data.json" columns="repo,owner,policy" facet="owner"}+```++Allowlisted attributes: `src` `columns` `heading` `filter` `facet` `sort` `dim` `mark`+`colorby`. `mark="warn:col:re"` colours cells matching a pattern; `colorby="col:field"`+takes the colour from each row's own data (`#rgb` / `#rrggbb` only), so a page and any other+rendering of the same data — an `.svg` export, say — cannot drift into disagreeing.++On a **private** page the tag renders empty: its frame is an opaque origin, so the `src`+fetch carries no session and 404s. Host the widget in a section with inline JSON instead —+see adom/wiki#166, and [`adom/repo-ownership`](/adom/repo-ownership) for a working host.+ ## Use in a page Copy a `widgets/*-widget.js` into your HTML and add the tag: