Rich Harris
c51dfcfc00
feat: warn on invalid event handlers ( #12818 )
...
* feat: warn on invalid event handlers
* handle assignments etc
* handle component events too where possible
* lint
3 months ago
github-actions[bot]
c2fb1a6df1
Version Packages (next) ( #12816 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Rich Harris
b13d331f78
chore: remove stuff identified by knip as unused ( #12815 )
...
* chore: remove stuff identified by knip as unused
* need to continue exporting Parser, it is referenced as a type
3 months ago
Rich Harris
dfb6755514
feat: add compiler error when encountering a $-prefixed store value outside a `.svelte` file ( #12799 )
...
* feat: add compiler error when encountering a $-prefixed store value outside a .svelte file
* add fromState/toState APIs
* another test, update types
* rename fromState to toStore, and toState to fromStore
* docs
* add docs
* separate client/server entry points for svelte/store
3 months ago
Rich Harris
31a4449012
chore: remove unused EACH_KEYED constant ( #12814 )
3 months ago
Rich Harris
9ba370f305
docs: replace `$state.frozen` docs with `$state.raw` ( #12812 )
3 months ago
github-actions[bot]
9f17f766b7
Version Packages (next) ( #12811 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Rich Harris
8600caf952
fix: only proxy stuff in runes mode ( #12813 )
3 months ago
Rich Harris
7cbd188f80
breaking: replace `$state.frozen` with `$state.raw` ( #12808 )
...
* breaking: replace `$state.frozen` with `$state.raw`
* regenerate
* rename
* rename
* rename
* rename
* rename
* rename
* rename
* rename
* rename
* typo
* add compiler error for existing `$state.frozen` uses
* regenerate
* rename
* tidy up
* move proxy logic into props function
3 months ago
Dominic Gannaway
fa5d3a9002
fix: ensure inspect effects are skipped from effect parent logic ( #12810 )
3 months ago
Ignatius Bagus
34ad016a77
chore: configure provenance env var ( #12809 )
3 months ago
github-actions[bot]
b462c8d2e9
Version Packages (next) ( #12805 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Rich Harris
a5d349ebe5
feat: compiler-driven each block reactivity ( #12744 )
...
* WIP
* note to self
* WIP
* fix
* fix
* delete unwrap and is_signal
* simplify
* remove some junk
* regenerate
* reinstate key-is-item optimisation
3 months ago
Paolo Ricciuti
cbcd7617c4
feat: deprecate `svelte:component` ( #12694 )
...
* feat: deprecate `svelte:component`
Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
* move logic into the visitor
* tweak docs
---------
Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Rich Harris
5094cb9e89
feat: treat tag with `.` as a component, even if lowercase ( #12798 )
...
* feat: treat tag with `.` as a component, even if lowercase
* changeset
* consistency
* note breaking change
* oops, wrong place
3 months ago
github-actions[bot]
09db33979d
Version Packages (next) ( #12797 )
...
* Version Packages (next)
* Update CHANGELOG.md
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Theodor Steiner
7ae21ea97d
feat: make <svelte:option> customElement configuration's tag property optional ( #12751 ) ( #12754 )
...
* feat: make svelte:option customElement tag property optional (#12751 )
* tweak comment
* tweak docs
* tweak some more wording
* Update .changeset/four-kids-flow.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
3 months ago
Dominic Gannaway
97c0150b00
fix: improved memory profile for transitions/animations ( #12796 )
...
* fix: improved memory profile for transitions/animations
* put back the catch
3 months ago
github-actions[bot]
4aa6059712
Version Packages (next) ( #12795 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Dominic Gannaway
d2efca0b04
fix: prevent numerous transition/animation memory leaks ( #12759 )
...
* fix: prevent numerous transition/animation memory leaks
* address feedback
* tweak
3 months ago
Dominic Gannaway
ba116a1b43
fix: propagate custom element component prop changes ( #12774 )
...
* fix: propagate custom element component prop changes
* add test
3 months ago
github-actions[bot]
a0bbf2ace0
Version Packages (next) ( #12794 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Rich Harris
57a7b0cd48
chore: transformers ( #12780 )
...
* clear out getters on new scope
* fix
* fix
* fix
* fix
* consolidate legacy_reactive_import logic
* unused
* $$sanitized_props
* use getters mechanism for store_sub
* snapshot
* fix
* tests passing
* remove some stuff
* more
* fix
* tidy up
* simplify
* simplify
* getters -> transformers
* update
* use update transformers
* add assign transformer
* more
* tweak
* remove junk
* unused
* simplify
* tidy up
* tweak
* assign_property
* fix
* tidy up
* tidy up
* move store code
* this appears to be unused
* tidy up
* tweak
* simplify
* move code
* move stuff
* note to self
* move stuff
* each blocks
* note to self
* lengthen stack trace
* tweak
* more
* tidy up
* tidy up
* remove some junk
* tidy up
* move stuff
* remove stuff
* tweak
* tweak
* fix
* tweak
* tidy up
* tidy up
* tidy up
* tweak
* simplify
* tidy up
* simplify
* tidy up
* improve output
* delete comments
* more
* unused
* tidy up
* tidy up
* fix
* move some stuff
* tweak
* tidy up
* DRY
* synchronise
* DRY out
* tidy up
* tidy up
* tidy up
* add test that fails on main
* snapshot test
* changesets
* lint
* ugh
3 months ago
Dominic Gannaway
536be645fa
fix: ensure custom element styles append correctly during prod ( #12777 )
...
* fix: ensure custom element styles append correctly during prod
* fix
* fix
* fix
* feedback
* only add third argument for custom elements
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
github-actions[bot]
1a3dbda20c
Version Packages (next) ( #12789 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Dominic Gannaway
d8954d7add
fix: ensure custom elements do not sync flush on mount ( #12787 )
...
* fix: ensure Svelte4Components do not sync flush
* fix: ensure Svelte4Components do not sync flush
* lint
* feedback
* simplify test, remove redundant comments
* prettier
* fix test
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Rich Harris
057316ccd1
chore: simpler fallback values ( #12788 )
...
* DRY
* value_or_fallback_async doesnt do anything
* rename value_or_fallback to fallback
* DRY
* DRY
* make lazy the exception
* changeset
3 months ago
Dominic Gannaway
19819d0477
fix: provide more hydration mismatch coverage ( #12755 )
...
* fix: provide more hydration mismatch coverage
* tweak
* add test for safari borking stuff
* fix
* fix windows test
* failing test
* oops
* revert playground changes
* simplify
* template content hydration logic should really be separate from reset logic
* actually the test is incorrect, and now i cant seem to recreate what i saw before... hmm
* update comment to no longer mention templates
* failing test
* delete test for now
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Dominic Gannaway
c32a91891f
fix: ensure event handlers referencing $host are not hoisted ( #12775 )
3 months ago
github-actions[bot]
9ff33f1346
Version Packages (next) ( #12786 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
ottomated
7de3e3b703
feat: simplify derived object destructuring ( #12781 )
...
* simplify derived object destructuring
* add test for destructuring an array
* add changeset
* shorter temp variable name
* skip intermediate derived for simple cases
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
ottomated
d6e26c0953
chore: speed up exclude_from_object ( #12783 )
...
* speed up exclude_from_object
* changeset
* convert prop names to string at compile time
* faster still
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Ben McCann
9f28503bef
chore: publish package provenance info ( #12779 )
3 months ago
github-actions[bot]
37020384ca
Version Packages (next) ( #12750 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Rich Harris
ec8a029db4
fix: skip `is_standalone` optimisation for dynamic components ( #12767 )
...
* fix: skip `is_standalone` optimisation for dynamic components
* changeset
3 months ago
Paolo Ricciuti
60148d3352
fix: order of arguments for `push_element` in `svelte:element` ( #12763 )
...
* fix: order of arguments for `push_element` in `svelte:element`
* chore: move test to runtime
* fix: add line and column to function call
3 months ago
Dominic Gannaway
1942f87ed9
fix: improve prop binding warning validation for stores ( #12745 )
...
* fix: improve prop binding warning validation for stores
* ts
* address feedback
* add comment
* failing test
* fix/simplify
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Dominic Gannaway
d06174e461
chore: add error for derived self referencing ( #12746 )
...
* chore: add warning for derived self referencin
* update build
* address feedback
* address feedback
* build
* messages shouldn't end with a period
* simplify test
* regenerate
* newlines are free
* no need to export this, we can move it closer to where it's used
* fix double negative
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Dominic Gannaway
bd9a2d2077
fix: ensure unowned deriveds correctly update ( #12747 )
3 months ago
github-actions[bot]
98ae05b569
Version Packages (next) ( #12741 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
github-actions[bot]
e747a6f75d
Version Packages (next) ( #12718 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Rich Harris
59ea0b9e13
fix: better event handling ( #12722 )
...
* simplify
* fix/simplify
* fix/simplify
* start getting a grip of this mess
* tidy up
* more
* more
* more
* tidy up
* make things a bit less weird
* tweak
* more
* more
* add once once
* consolidate event handling code
* some progress. man, this stuff is entangled
* more
* tidy up
* simplify
* simplify
* more
* fix
* fix test names
* fix a bug
* tidy up
* changeset
* simplify
* regenerate
* tidy up
* tidy up
* tidy up
* simplify
* the module declaration case is already accounted for, above
* simplify/document
* typo
* "hoistable" is a misnomer
* hoist non_hoistable, rename
* more typos
* tweak
* regenerate
3 months ago
Dominic Gannaway
e78cfd393e
fix: correctly handle SvelteDate methods with arguments ( #12738 )
...
* fix: correctly handle SvelteDate methods with arguments
* tweak
* Update packages/svelte/src/reactivity/date.js
* Update packages/svelte/src/reactivity/date.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/reactivity/date.test.ts
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Dominic Gannaway
8bde2d5710
fix: add touch events on microtask to avoid Chromium bug ( #12735 )
3 months ago
Dominic Gannaway
76cb89c750
fix: allow deletion of $$restProps properties ( #12736 )
3 months ago
Rich Harris
e66416bec7
feat: more efficient code generation when referencing globals ( #12712 )
...
* feat: more efficient code generation when referencing globals
* update test
3 months ago
Paolo Ricciuti
93cfa6cd69
fix: add css hash to custom element rendered with `svelte:element` ( #12715 )
...
* fix: add css hash to custom element rendered with `svelte:element`
* simplify
* skip arg where possible
* drive-by improvements — remove some unnecessary arguments where possible
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
github-actions[bot]
8e04a91c67
Version Packages (next) ( #12707 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 months ago
Paolo Ricciuti
3286617e3c
feat: function called as tagged template literal is reactively called ( #12692 )
...
* feat: function called as tagged template literal is reactively called
Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
* chore: re-organize import of visitors
* simplify
---------
Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 months ago
Paolo Ricciuti
e4e66e237f
feat: allow for `svelte:options` css injected ( #12660 )
...
* feat: allow for `svelte:options` css injected
* chore: update test with different class
* fix: regenerate types
* remove external option
* regenerate
* Update .changeset/eight-comics-tell.md
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
3 months ago