* this condition is always true
* rename child_frag to first_child
* no need to use is_array, it is always an array when hydrating
* simplify close_template
* spread is faster than Array.from
* avoid reassigning argument
* remove some indirection
* tidy up
* tidy
* tidy up
* simplify
* fix
* don't attempt to hydrate children of void dynamic element
* simplify
* tighten up
* fix
* add note, simplify
* tidy up
* changeset
* revert this change, save for a separate PR
* use server-rendered HTML as hydration test starting point
* update tests
* remove _before.html files
* remove _before_head.html files
* override output with _expected.html
* expected output for binding-input case
* remove unused files
* fix
* changeset
* attach DOM to effects
* null out effect.dom
* remove some block.d references
* another
* drive-by fix
* better comment
* unused arg
* another
* another
* another
* more
* finish renaming stuff
* more
* remove item.d
* remove block.d
* remove effect.block
* remove current_block
* delete delete delete
* rename
* remove some stuff we dont need
* simplify
* feat: take form resets into account for two way bindings
When resetting a form, the value of the inputs within it get out of sync with the bound value of those inputs. This PR introduces a reset listener on the parent form to reset the value in that case
closes#2659
* slightly different approach
* tweaks, test
* this is a breaking change, strictly speaking
* bind:files
* use capture phase
* tweak wording
* use promise, explain
* breaking: apply fallback value every time in runes mode
closes#9948
* apply fallback value in setter
* encapsulate fallback logic
* we should keep this logic out of b.set, since it's very specific to accessors
* oops
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* replace transition code
* get rid of some stuff
* simplify
* remove some junk
* not sure how we solved this before, but i guess this makes sense
* oh hey i don't think we need this
* make elseif transparent for transition purposes
* oops
* edge case
* fix
* do not want
* rename
* transition out ecah blocks when emptying
* baby steps
* hydration fix
* tidy up
* tidy up
* tidy up
* fallbacks
* man i love deleting code
* tidy up
* note to self
* why was this an effect
* tidy up
* tidy up
* key blocks
* temporary
* fix
* WIP
* fix
* simplify
* emit events
* delete delete delete
* destroy child effects
* simplify helper
* simplify helper
* fix
* remove commented out code
* fix wonky test
* fix test
* fix test
* fix test
* dynamic components
* fix test
* await
* tidy up
* fix
* fix
* fix test
* tidy up
* we dont need to reconcile during hydration
* simplify
* tidy up
* fix
* reduce indentation
* simplify
* remove some junk
* remove some junk
* simplify
* tidy up
* prefer while over do-while (this appears to have the same behaviour)
* group fast paths
* rename
* unused import
* unused exports
* try this
* simplify
* simplify
* simplify
* simplify
* tidy up
* simplify
* simplify
* tidy up
* simplify
* simplify
* more compact names
* simplify
* better comments
* simplify
* tidy up
* we don't actually gain anything from this
* fix binding group order bug (revealed by previous commit, but exists separately from it)
* tidy up
* simplify
* tidy up
* remove some junk
* simplify
* note to self
* tidy up
* revert this bit
* tidy up
* simplify
* simplify
* simplify
* symmetry
* tidy up
* var
* rename some stuff
* tidy up
* simplify
* keyed each transitions
* make elements inert
* deferred transitions
* fix
* fix test
* fix some tests
* simplify
* fix
* fix test
* fix
* eh that'll do for now
* fix
* revert all these random changes
* fix
* fix
* simplify
* tidy up
* simplify
* simplify
* tidy up
* tidy up
* tidy up
* WIP
* WIP
* working
* tidy up
* fix
* tidy up
* tidy up
* lerp
* tidy up
* rename
* rename
* almost everything working
* tidy up
* ALL TESTS PASSING
* fix treeshaking
* Apply suggestions from code review
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* comment
* explain elseif locality
* explain flushSync
* comments
* this is accounted for
* add some comments
* remove outdated comment
* add comment
* add comments
* rename
* a few naming tweaks
* explain each_item_block stuff
* remove unused arg
* optimise
* add some comments
* fix test post-optimisation
* explicit comparisons
* some docs
* fix intro events
* move effect.ran into the bitmask
* docs
* rename run_transitions to should_intro, add explanatory jsdoc
* add some more docs
* remove animation before measuring
* only animate blocks that persist
* note to self
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
pre effects, which also contain `$:` statements, are more controlled in legacy mode and should only run once per tick, in their defined order. Flushing them out of order can result in bugs. Related to #10795 and #10787
* fix: improve element class attribute behaviour
* Update packages/svelte/src/internal/client/dom/elements/class.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
The await block scope analysis was flawed because it did not set the scope for the value/error field before visiting those nodes, resulting in the wrong scopes getting references
As a byproduct, this fixes#8141
* follow up to 10846
* lint
* simplify
* don't update value
* rework logic, rely more on mutation observer, fix bug related to select multiple
* fix lazy select options bug
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: brunnerh <brunnerh@users.noreply.github.com>
* feat: add support for webkitdirectory DOM boolean attribute
* add to types
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* feat: adds reactive Map class to svelte/reactivity
* add docs
* add docs
* add test case
* types
* make reactive set better
* address feedback
* fix typo
* more efficient initialisation
* this is incorrect, it would fail if given a map for example
* increase consistency (with e.g. proxy.js)
* tidy up
* Revert "more efficient initialisation"
This reverts commit 29d4a8078b.
* efficient initialization, without bugs this time
* convention
* delete make_iterable
* update changeset
* efficient initialization
* avoid generator functions
* Update sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>