1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 04:12:14 +02:00

📦 🐛 ✏️ updates & types & docs

This commit is contained in:
2023-12-16 16:14:00 +01:00
parent 3fc585d012
commit f31808c2d6
14 changed files with 445 additions and 813 deletions

View File

@ -14,6 +14,7 @@ ${host}{
--shiki-token-punctuation: var(--code);
--shiki-token-link: #EE0000;
white-space: pre;
tab-size: 2;${""/* TODO: allow custom tab size?! */}
overflow: scroll;
}
${host}[data-js=todo]{

View File

@ -1,4 +1,4 @@
const highlighter= await shiki.getHighlighter({
const highlighter= await globalThis.shiki.getHighlighter({
theme: "css-variables",
langs: ["js", "ts", "css", "html", "shell"],
});

View File

@ -1,12 +1,13 @@
/* PSEUDO-CODE!!! */
import { el, on, scope } from "deka-dom-el";
function component(){
const { host }= scope;
const ul= el("ul");
const ac= new AbortController();
fetchAPI({ signal: ac.signal }).then(data=> {
data.forEach(d=> ul.append(el("li", d)));
});
scope.host(
host(
/* element was remove before data fetched */
on.disconnected(()=> ac.abort())
);