svelte 5 clone (hopefully)
- Templating syntax: literally svelte, you can even use svelte lsp.
- you can do interpolation e.g.
{count.value}. #if:else:else if- one component can contain multiple root nodes like svelte
- you can do interpolation e.g.
- Reactivity: i want it to look like svelte but i hate doing transformation so
.valueit is then.signalbehave the same as svelte$stateexcept you need to use.value. (i should say "more like vue" tho)- there is also
effectandcomputed
- event listener
eachsyntax should be ok now. see each.ts for more technical note.- value binding for
inputandtextarea- auto coerce type to number for
<input type="number"> - the same go for checkbox
- auto coerce type to number for
- Dynamic attribute
class="border {someExpression}"orplaceholder={anotherExpression} - a reactive proxy like vue
reactivefor deep reactivity- we also do array patching.
- pass getter and setter instead of a
Signalto a binding - Component
- no generated props type becuase im too lazy
- you can access props via
$$props mount(...),#if,#each,#key (not yet implemented)do produce effect scope.
- shorthand props syntax
name={name}->{name},bind:name={name}->bind:name - lifecycle hooks:
onMount,onDestroy - Component instance binding
bind:this- you cant use
export function something(...)syntax yet. for now use$$exports.something = ...
- you cant use
- non dom support with custom renderer
- think about each binding: should we make each item a signal or not.
- parse more complex expression here
#each {expression} as something, index#each cats.filter(it => it.id.length < lenght) as cat, i- currently, this is parse failure
- Async stuff
- await block
- some kind of react-like suspense boundary
- async derived 💀💀💀
do transpiling magic that allow you to use signal without.valuelike runes- typescript support
- type definitions of stuff exported form
swayis for some reason all gone when used in.swayfile. maybe its becuase of svelte lsp
- type definitions of stuff exported form
- SSR
- i need to
create a new transformerand maybe a new parser too - hydration look like pain in the ass
- think about vite integration or may be we could offload this to
sway/kitlmao
- i need to
- a router (or
sway/kit, beside from ssr thing this look quite fun to make, especially ts magic for PageData) - realworld (frontend only)
- value binding for
select - scoped style
:elseblock under#each- transition, animation
- packages/sway core framework
- it export signal primitives
- there are also
sway/compilerandsway/runtime
- packages/vite-plugin-sway vite plugin for .sway template
- playgrounds/development a vite project to experiment with the framework. If you want to try sway you should play around with package.
- playgrounds/server nothing yet