Please note that [the Svelte codebase is currently being rewritten](https://svelte.dev/blog/runes). Thus, it's best to hold off on new features or refactorings for the time being.
Please note that [the Svelte codebase is currently being rewritten for Svelte 5](https://svelte.dev/blog/runes). Changes should target Svelte 5, which lives on the default branch (`main`).
If your PR concerns Svelte 4 (including updates to [svelte.dev.docs](https://svelte.dev/docs)), please ensure the base branch is `svelte-4` and not `main`.
### Before submitting the PR, please make sure you do the following
@ -25,6 +67,34 @@ export function fade(node, { delay = 0, duration = 400, easing = linear } = {})
};
}
/**
*Animatesthexandypositionsandtheopacityofanelement.`in`transitionsanimatefromtheprovidedvalues,passedasparameterstotheelement's default values. `out` transitions animate from the element'sdefaultvaluestotheprovidedvalues.
*Animatestheopacityandscaleofanelement.`in`transitionsanimatefromanelement's current (default) values to the provided values, passed as parameters. `out` transitions animate from the provided values to an element'sdefaultvalues.
@ -22,22 +22,3 @@ To prevent something from being treated as an `$effect`/`$derived` dependency, u
});
</script>
```
## `selector`
`selector` allows you to track the currently selected item in a list in a performance optimized manner that runs in constant time (`O(1)`). With `selector`, you can immediately determine if an item is selected: