Return `pop` directly by returning the component from it; gets rid of extraneous variable declaration
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* chore: ignore test directories left over from other branches
* tighten up
* one comment will do
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* failing test for :is(...)
* simplify
* trim
* factor out truncate function
* pass stylesheet around
* recurse into :is and :where
* fix types
* fix types
* almost there
* gah so close
* tada
* changeset
* simplify
* feat: nested CSS support (#10491)
* parse nested CSS
* tests
* track parent rules
* some progress
* switch it up
* pruning
* works
* changeset
* lint
* error early on invalid nesting selector
* tidy
* note to self
* fix some specificity stuff
* failing test
* note to self
* fix: correctly scope CSS selectors with descendant combinators (#10502)
* fix traversal, but break some other stuff
* man this is fucken hard
* fixes
* getting closer
* be conservative for now
* tidy
* invert
* invert
* simplify
* switch
* for now
* progress
* i think it works?
* fix
* tidy up
* revert some stuff
* remove some junk
* handle weird cases
* update
* tweak
* shrink
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update playgrounds/sandbox/run.js
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* feat: add hydrate method, make hydration treeshakeable
Introduces a new `hydrate` method which does hydration. Refactors code so that hydration-related code is treeshaken out when not using that method.
closes#9533
part of #9827
* get docs building
* ugh
* one more
* Update packages/svelte/scripts/check-treeshakeability.js
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* warn
* Update sites/svelte-5-preview/src/routes/docs/content/01-api/05-functions.md
---------
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Add source map merging for preprocessors and get tests passing.
- fixed some issues around the `sources` array where they weren't calculated relative to the input correctly
- adjusted some CSS tests because due to our own CSS parser the AST is less granular, so there are less mappings now. Don't think this is a problem, but worth thinking about
- removed enableSourcemap but only log a warning, the reason this was introduced was to mitigate a bug in Vite which occured when having the source map inlined into the SSR'd output. Since SSR doesn't contain inlined CSS anymore (and if it did, we would omit the source map) the reason for which it was introduced no longer exists
- files without js mapping in it have no source mappings yet (originally added in Svelte 4 for #6092)
* rename $derived.call to $derived.by
* more replacements, plus a compiler error
* regenerate types
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Relax the runtime error to only throw when you're passing a binding with an undefined value. This makes it possible to provide components in a way that can be used more flexibly while keeping the error to guard against the case that we want to avoid: a default value propagation up.
* fix: handle sole empty expression tags
When there's only a single expression tag and its value evaluates to the empty string, special handling is needed to create and insert a text node
fixes#10426
* fix
* need this, too
* Update packages/svelte/src/internal/client/operations.js
---------
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>