picoapp
picoapp copied to clipboard
refactor: complete rewrite powered by web components
BREAKING CHANGE: Such changes warrant a major release 🎉
This is a complete rewrite of picoapp and a new major version.
- Powered by custom elements
- Refs API to simplify the selection of many elements within components via
@ref
attribute - Context-aware store and dom events that auto cleanup when elements
- Still ~1kb gzipped
- Written in TypeScript and tooling powered by Vite
- Test suite powered by Vitest
- Semantic release pipeline
Still WIP / Todo:
- [ ] Add optional 3rd argument for
component
to pass in options such as{ extends: 'button' }
to create custom elements that are instances of other constructors likeHTMLButtonElement
orHTMLParagraphElement
that then get written like<p is="word-count"></p>
or created likedocument.createElement('p', { is: 'word-count' })
. Currently we are just checking if the component name containsbutton
and doing the necessary things internally, but this is limited to just button at the moment lol - [ ] Update documentation
- [ ] Consider evx update since we are changing the store API and it needs types anyway. Do we build the store into picoapp? or do we do a new major version of evx?