import { html, render } from "lit-html"; import { keyed } from "lit-html/directives/keyed.js"; import { marked } from "marked"; import { unsafeHTML } from "lit-html/directives/unsafe-html.js"; import * as Output from "~/common/output.js"; import foundation from "~/common/facets/foundation.js"; import { effect } from "~/common/signal.js"; import { nothing } from "~/common/element.js"; //////////////////////////////////////////// // YOUR COLLECTION //////////////////////////////////////////// /** @type {HTMLElement | null} */ const listEl = document.querySelector("#list"); if (!listEl) throw new Error("List element not found"); const output = foundation.orchestrator.output(); listEl.innerHTML = ""; effect(() => { const col = output.facets.collection().sort((a, b) => { return a.name.toLocaleLowerCase().localeCompare(b.name.toLocaleLowerCase()); }); const state = output.facets.state(); const h = col.length && state === "loaded" ? html`