Initial electronics inventory webapp

KV-store backed Express 5 app for tracking electronic components,
their arbitrary fields, and inventory locations (physical, BOM, digital).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 19:11:13 +00:00
commit ef2e53ea18
13 changed files with 2768 additions and 0 deletions

16
public/lib/dom.mjs Normal file
View File

@@ -0,0 +1,16 @@
export function qs(scope, selector) {
if (typeof scope === 'string') return document.querySelector(scope);
return scope.querySelector(selector);
}
export function clone(template_id) {
return document.getElementById(template_id).content.cloneNode(true).firstElementChild;
}
export function set_text(el, selector, text) {
const target = typeof selector === 'string' ? el.querySelector(selector) : selector;
target.textContent = text;
}
export function show(el) { el.hidden = false; }
export function hide(el) { el.hidden = true; }