diff --git a/.gitignore b/.gitignore index 8fa8188..5990973 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ dist/docs/ +dist/.* # Logs logs *.log diff --git a/README.md b/README.md index eae793f..07e05cc 100644 --- a/README.md +++ b/README.md @@ -2,94 +2,120 @@ | [source code on GitHub](https://github.com/jaandrle/deka-dom-el) | [*mirrored* on Gitea](https://gitea.jaandrle.cz/jaandrle/deka-dom-el) +

+ Deka DOM Elements Logo +

+ +# Deka DOM Elements + ***Vanilla for flavouring — a full-fledged feast for large projects*** *…use simple DOM API by default and library tools and logic when you need them* ```javascript +// 🌟 Reactive component with clear separation of concerns document.body.append( - el(HelloWorldComponent, { initial: "🚀" }) + el(EmojiCounter, { initial: "🚀" }) ); -/** @typedef {"🎉" | "🚀"} Emoji */ -/** @param {{ initial: Emoji }} attrs */ -function HelloWorldComponent({ initial }){ - const clicks= S(0); - const emoji= S(initial); + +function EmojiCounter({ initial }) { + // ✨ State - Define reactive data + const count = S(0); + const emoji = S(initial); + /** @param {HTMLOptionElement} el */ const isSelected= el=> (el.selected= el.value===initial); - // @ts-expect-error 2339: The