Rich Harris
75ea6da9cd
chore: modularize server code ( #12596 )
...
* start modularizing server code
* more
* more
* more
* more
* alphabetize
* start on JS visitors
* more
* more
* more
* more
* less
* more
* alphabetize
* lint
* combine into single visitors folder
* alphabetize
4 months ago
Simon H
6223a7e87e
docs: event delegation tweaks ( #12597 )
...
closes #11317
4 months ago
Simon H
bc78391bdc
docs: mention xmlns attribute for `<svelte:element>` ( #12598 )
...
closes #11993
4 months ago
Dominic Gannaway
7a8cf3a9a1
fix: ensure directives run in sequential order ( #12591 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 months ago
Rich Harris
c173140969
chore: use JSDoc import ( #12595 )
...
* more
* more
* more
4 months ago
Rich Harris
8d139210b7
Revert "breaking: avoid flushing queued updates on mount/hydrate" ( #12593 )
...
* Revert "breaking: avoid flushing queued updates on mount/hydrate (#12587 )"
This reverts commit 20b879717a
.
* Update packages/svelte/src/internal/client/render.js
4 months ago
Rich Harris
c548932390
chore: use JSDoc imports ( #12592 )
...
* more
* more
* more
* more
* more
* more
* more
* regenerate types
4 months ago
Rich Harris
7a5c6b588f
chore: more JSDoc imports ( #12590 )
...
* more
* more
* more
* more
* fix
4 months ago
Dominic Gannaway
20b879717a
breaking: avoid flushing queued updates on mount/hydrate ( #12587 )
...
* breaking: avoid flushing queued updates on mount/hydrat
* Fix tests
* Update packages/svelte/src/internal/client/render.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* tweak
* tweak
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 months ago
Rich Harris
6037b961c0
chore: more JSDoc ( #12588 )
4 months ago
Dominic Gannaway
abaa4413df
fix: tweak element_invalid_self_closing_tag to exclude namespace ( #12585 )
4 months ago
Rich Harris
621eb76e1e
chore: use JSDoc `@import` ( #12581 )
...
* chore: use JSDoc @import
* regenerate types
4 months ago
Dominic Gannaway
37f58cf318
fix: apply dynamic event fixes to OnDirective ( #12582 )
...
* fix: apply dynamic event fixes to OnDirective
* build
4 months ago
Simon H
528d3468d0
docs: note hydration comments change ( #12580 )
...
closes #10375
4 months ago
github-actions[bot]
c18221dcc3
Version Packages (next) ( #12579 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Simon H
c0832fd85d
fix: exclude `bind:this` from reactive state validation ( #12566 )
4 months ago
Simon H
2ea2be3324
docs: explain `runes` compiler option behavior ( #12578 )
...
closes #11523
4 months ago
Rich Harris
cf8df0bacc
chore: remove `binding.expression` ( #12530 )
...
* add state.getters as alternative to binding.expression
* on second thoughts
* fix
* first of many
* couple more
* regenerate types
* more
* another
* more
* another
* another
* another
* remove binding.expression from client-side code
* tweak
* last one
* comment
* regenerate types
* add a changeset
* small tidy up
* simplify
* simplify
* simplify and fix
* simplify
4 months ago
Rich Harris
37782be9b1
chore: add <meta charset> to playground ( #12574 )
4 months ago
github-actions[bot]
9b512ca91d
Version Packages (next) ( #12576 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Rich Harris
9f3ed8968f
fix: correctly set anchor inside HMR block ( #12575 )
4 months ago
Rich Harris
642f5f4df8
chore: fix playground HMR ( #12572 )
4 months ago
github-actions[bot]
5669c7de4f
Version Packages (next) ( #12552 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Dominic Gannaway
64e9f0e5f6
fix: improve dynamic event handling ( #12570 )
4 months ago
Dominic Gannaway
d17755a8b5
fix: ensure dynamic event handlers are wrapped in a derived ( #12563 )
...
* fix: ensure dynamic event handlers are wrapped in a derived
* fix test
* feedback
* more feedback
* address feedback
* we have .svelte.js files
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 months ago
Dominic Gannaway
d73c5b8434
fix: ensure $state.snapshot correctly clones Date objects ( #12564 )
4 months ago
Rich Harris
7b2279d84c
chore: tidy up dynamic event handler generated code ( #12553 )
...
* chore: tidy up dynamic event handler generated code
* actually we need a proper function
4 months ago
Simon H
e2b75d1a6e
fix: properly update store values ( #12562 )
...
We need to extend the "don't use `set` on first run" logic to the falsy branch aswell
Fixes #12558
4 months ago
Rich Harris
72f5539f51
fix: remove runtime validation of components/snippets, rely on types instead ( #12507 )
...
closes #12446
4 months ago
Dominic Gannaway
90d6f573e3
fix: dynamic event delegation for stateful call expressions ( #12549 )
4 months ago
github-actions[bot]
55400fd16c
Version Packages (next) ( #12548 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Rich Harris
6fdfc537e4
fix: update original source in HMR update ( #12547 )
...
* fix: update original source in HMR update
* tidy up
* comments
* oops
4 months ago
github-actions[bot]
53d32d4dfe
Version Packages (next) ( #12536 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Rich Harris
73ac4fe456
fix: only emit binding_property_non_reactive warning in runes mode ( #12544 )
4 months ago
Rich Harris
fd5cfd77d8
fix: correctly set filename on HMR wrappers ( #12543 )
...
* fix: correctly set filename on HMR wrappers
* changeset
4 months ago
Dominic Gannaway
346cf96599
fix: bail-out of hydrating head if no anchor is found ( #12541 )
...
* fix: bail-out of hydrating head if no anchor is found
* add failing test
* fix
* fix comment
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 months ago
Dominic Gannaway
5253c8f8ff
fix: typo in snippert nodeType ( #12540 )
4 months ago
Dominic Gannaway
518d9854f5
chore: add warning for invalid render function of createRawSnippet ( #12535 )
...
* chore: add warning for invalid render function of createRawSnippet
* add test
* warnings
* Update packages/svelte/messages/client-warnings/warnings.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* build
* build
* build
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 months ago
Simon H
2698716bdf
docs: fine-tune $props types info ( #12534 )
...
Show how to do optional props, add jsdoc example to non-preview-docs
closes #12528
4 months ago
Cevdet Arda Haran
0fb9fb9a95
docs: change meta element from "Description" to "description" ( #12526 )
4 months ago
Rich Harris
a01f658f01
chore: tidy up each block compiler logic ( #12513 )
...
* small tidy-up
* each_type -> flags
* tidy up
4 months ago
github-actions[bot]
ca2f02c23e
Version Packages (next) ( #12515 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Rich Harris
ff080cbbdc
fix: improve validation error that occurs when using `{@render ...}` to render default slotted content ( #12521 )
...
* add invalid_default_snippet error message
* fix: improve validation error that occurs when using `{@render ...}` to render default slotted content
* cheeky hack to keep treeshakeability until we can nuke this validation altogether
4 months ago
Kohei Yoshino
0891fa7a18
docs: Fix a typo and spelling in Svelte 5 breaking changes doc ( #12517 )
...
* Fix a typo in Svelte 5 breaking changes doc: “accessors”
* Fix inconsistent spelling: “favour”
4 months ago
Rich Harris
f402d01454
fix: reset hydrate_node after `hydrate(...)` ( #12512 )
4 months ago
github-actions[bot]
30b143cef0
Version Packages (next) ( #12504 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 months ago
Simon H
e02c90209b
fix: make animations more robust to quick shuffling ( #12496 )
...
Previously, if transitions/animations were playing in quick succession, overlapping each other, it could have disastrous outcomes, leading to elements jumping all over the place.
This PR gets that into much better state (not completely fixed, but close) by applying a few fixes:
- destructure style object from `getComputedStyles`, because it's a live object with getters and we're interested in the fixed values at the beginning
- `unfix` for animations didn't reset the transition styles
- don't apply `fix` when we detect already-running animations on the element. That means it's already away from its original position, and doesn't need fixing. Worse, applying an absolute position can lead to the element jumping to the top left if the running animation also applies a transition style - those take precedence over the one we would apply
fixes #10252
4 months ago
Dominic Gannaway
20e6508c47
fix: ensure $state proxy invokes set accessor if present ( #12503 )
4 months ago
Rich Harris
2ce2b7d98b
feat: warn if binding to a non-reactive property ( #12500 )
...
* feat: warn if binding to a non-reactive property
* tweak
4 months ago
Simon H
dd9ade7736
fix: ensure `bind:this` happens before transitions and animations ( #12497 )
...
* fix: ensure `bind:this` happens before transitions and animations
* test
4 months ago