Rich Harris
d4718e0755
playground: better console ( #11719 )
...
* remove unused code
* better console
* simplify
* simplify
* fix
* fix
* fix
* fix console.table
* more table tweaks
* improve table styles
* tweaks
* bump svelte-json-tree
* tweak group styles
* level -> command
* remove stack from assertions
* nicer style for duplicates
* styles
* tidy/simplify
* tweaks
* tweaks
* tweaks
* fixes
* better stack traces (albeit not sourcemapped yet)
6 months ago
Simon H
4f9096a5a8
chore: delegate input event ( #11732 )
...
We didn't delegate the input event back when we were also delegating `on:x` events, because it messes up the event/bindings/actions order. Since we're only doing that for `onx` event attributes now that reason is obsolete and we can start delegating it.
6 months ago
github-actions[bot]
c3489eb5de
Version Packages (next) ( #11714 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Dominic Gannaway
4a3f7ac257
fix: improved checked/value handling ( #11726 )
...
* fix: improved checked/value handling
* tweak
6 months ago
Paolo Ricciuti
77f91459b6
fix: update value like attributes in a separate template_effect ( #11720 )
...
* fix: update value like attributes in a separate template_effect
* chore: remove unnecessary commented code
* chore: add test for spread values
6 months ago
Simon H
c21f019a4b
chore: speedup hydration around input and select values ( #11717 )
...
* chore: speedup hydration around input and select values
* use idle tasks to do the work
---------
Co-authored-by: Dominic Gannaway <dg@domgan.com>
6 months ago
Simon H
d590cd8bea
fix: ignore value attribute on select during SSR ( #11724 )
...
The value attribute on select elements does nothing - it does not influence the initial value (in SSR that's the job of the `selected` attribute on an option element), updating it does not influence the current value either. Instead of rendering it out and then removing it on hydration (which is costly because the mutation causes work) we just don't render it in SSR.
No test/changeset because no change in behavior.
6 months ago
Paolo Ricciuti
6d2f1a48b4
fix: allow comments after last selector in css ( #11723 )
...
Fixes #11721
6 months ago
Rich Harris
0128df33da
fix: don't add scoping modifier to nesting selectors ( #11713 )
6 months ago
Rich Harris
a17e84b61f
chore: tooltip tweaks ( #11716 )
...
* chore: tooltip tweaks
* fix tooltip background
* light/dark mode fix
6 months ago
Rich Harris
881040fb78
playground: reset on navigate ( #11715 )
6 months ago
Dominic Gannaway
09addad9ae
fix: improve handling of unowned derived signal ( #11712 )
6 months ago
github-actions[bot]
fba6b5676b
Version Packages (next) ( #11663 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Paolo Ricciuti
f48001ac63
fix: check for invalid bindings on window and document ( #11676 )
...
Fixes #11673
6 months ago
Paolo Ricciuti
b788b72862
fix: migrate derivations without semicolons ( #11704 )
...
Closes #11689
6 months ago
Rich Harris
02520aea48
better tooltips in playground ( #11705 )
...
* better tooltips in playground
* update some tests that a drive-by fix broke
6 months ago
Rich Harris
506f9d2892
add pnpm prod command to playground ( #11697 )
6 months ago
Dominic Gannaway
a5fd28a14b
fix: inline pointer events now correctly work in Chrome ( #11695 )
...
* fix: inline pointer events now correctly work in Chrome
* fix more
6 months ago
Dominic Gannaway
e6f8e95199
chore: tidy up tests to use flushSync ( #11703 )
6 months ago
Rich Harris
e45d1c37b6
chore: fix compiler warnings when developing preview site ( #11699 )
6 months ago
Rich Harris
c49903f62b
chore: bump site-kit ( #11698 )
...
* chore: bump site-kit
* fix
6 months ago
Rich Harris
43d2f750b6
Revert "chore: consistent nextSibling usage ( #11694 )" ( #11696 )
...
This reverts commit f3dbfc91d6
.
6 months ago
Dominic Gannaway
f3dbfc91d6
chore: consistent nextSibling usage ( #11694 )
...
* chore: consistent nextSibling usage
* cleanup
6 months ago
Simon H
1784026843
fix: don't require commas between warnings in legacy mode ( #11669 )
...
also add commas in migration
closes #11666
6 months ago
Rich Harris
c70533a5a7
fix: more efficient spread attributes in SSR output ( #11660 )
...
* fix: more efficient spread attributes in SSR output
* more tweaks
6 months ago
github-actions[bot]
62e2647c8a
Version Packages (next) ( #11656 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Rich Harris
c29b74669d
feat: migrate `<svelte:element this="div">` ( #11659 )
6 months ago
Simon H
110a5a852f
fix: robustify `bind:scrollX/Y` binding ( #11655 )
...
- we were scrolling to the given value, which we shouldn't for accessibility reasons (Svelte 4 didn't do it either)
- we need to notify of the value 0 if there's no scroll (https://github.com/sveltejs/svelte/issues/11623#issuecomment-2113495573 )
6 months ago
Rich Harris
d288735fa8
breaking: disallow string literal values in `<svelte:element this="...">` ( #11454 )
...
* breaking: disallow string literal values in `<svelte:element this="...">`
* note breaking change
* Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md
Co-authored-by: Jeremiasz Major <jrh.mjr@gmail.com>
* prettier
* make invalid `<svelte:element this>` a warning instead of an error (#11641 )
* make it a warning instead of an error
* format
---------
Co-authored-by: Jeremiasz Major <jrh.mjr@gmail.com>
6 months ago
Simon H
ade6b6e480
chore: add css regression test ( #11658 )
...
closes #9207
6 months ago
Simon H
c2f75dc7ba
fix: use coarse-grained updates for derived expressions in legacy mode ( #11652 )
...
fixes #11648
Also deduplicates the code a bit
6 months ago
Dominic Gannaway
54083fb9cc
fix: replay load and error events on load during hydration ( #11642 )
...
* fix: replay load and error events on load during hydration
* oops
* fix replacement logic
* make less evasive
* address feedback
* address feedback
* address feedback
* Update packages/svelte/src/internal/client/dom/elements/events.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* address feedback
* Update packages/svelte/src/internal/client/dom/elements/attributes.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/elements/attributes.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* address more feedback
* address more feedback
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Rich Harris
7b9fad4b0e
chore: remove `handle_compile_error` ( #11639 )
...
We don't need the awkward handle_compile_error stuff any more, because the relevant information now lives in state.js
6 months ago
Rich Harris
2ebb277be7
feat: more information when hydration fails ( #11649 )
...
In the case of an invalid child element, we already get information about the parent and the child, but in other cases where a mismatch could occur you're pretty much on your own.
This adds a bit more context to hydration_mismatch warnings — 'The error occurred near ...'
6 months ago
github-actions[bot]
019b26b775
Version Packages (next) ( #11645 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Dominik G
dc9b0d08c1
feat: add rootDir option and set __svelte_meta.file like in svelte4 ( #11627 )
...
* feat: add rootDir option and set __svelte_meta.file like in svelte4
* Update packages/svelte/src/compiler/validate-options.js
* update tests
* centralise logic
* fix
* note to self
* Apply suggestions from code review
* lint
* one dollar towards the windows backslash bugfix foundation please
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
6 months ago
Rich Harris
2e7e399160
chore: use indirect eval, avoid exposing stuff to the global scope ( #11646 )
...
* chore: use indirect eval, avoid exposing stuff to the global scope
* prettier
6 months ago
Dominic Gannaway
c131e6f494
Revert "chore: ensure we use event system code paths throughout" ( #11644 )
...
* Revert "chore: ensure we use event system code paths throughout (#11640 )"
This reverts commit c00d8245ee
.
* Update packages/svelte/src/internal/client/dom/elements/attributes.js
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Rich Harris
3bf68b4765
fix: make messages more consistent ( #11643 )
6 months ago
Dominic Gannaway
053159bf0b
fix: avoid state_referenced_locally warning within type annotations ( #11638 )
...
* fix: avoid state_referenced_locally warning within type annotations
* better fix
* prettier
* better fix
* fix
* fix
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Dominic Gannaway
c00d8245ee
chore: ensure we use event system code paths throughout ( #11640 )
6 months ago
Rich Harris
a7b61c0f30
docs: use a canvas demo for `$effect` ( #10745 )
...
* use a canvas demo for effect docs
* use js block
* update text
* fix
6 months ago
github-actions[bot]
ec25208ba4
Version Packages (next) ( #11617 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Simon H
4365562228
fix: deduplicate children prop from default slot ( #10800 )
...
* feat: provide isSnippet type, deduplicate children prop from default slot
fixes #10790
part of #9774
* fix ce bug
* remove isSnippet type, adjust test
* fix types
* revert unrelated changes
* remove changeset
* enhance test
* fix
* fix
* fix
* fix, different approach without needing symbol
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Mathias
cac8630de6
chore: use CustomEvent constructor instead of deprecated createEvent method ( #11629 )
...
* chore: use CustomEvent constructor instead of deprecated createEvent method
* while we're here...
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Simon H
4bedd0e4fb
feat: error on imports to `svelte/internal/*` ( #11632 )
...
* feat: error on imports to `svelte/internal/*`
closes #11622
* regenerate
* also error on svelte/internal
6 months ago
Simon H
13ce43a0a8
docs: document more breaking changes ( #11636 )
...
* docs: document more breaking changes
Related to #11400
closes #11590
* Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Dominic Gannaway
4f8bba2f80
fix: cleanup array prototype monkeypatching ( #11634 )
...
* fix: cleanup array prototype monkeypatching
* Update packages/svelte/src/internal/client/dev/equality.js
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
6 months ago
Dominic Gannaway
e5e7ec2404
fix: better handle img loading attribute ( #11635 )
...
* fix: better handle img loading attribute
* better fix
* switch to symbol
6 months ago
adiGuba
6f28e41b6d
chore: tidy up scrolling code logic ( #11630 )
...
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
6 months ago