* use $$props directly in runes mode
* this makes no sense
* use $$props directly in runes mode
* tidy up
* typo
* remove unreachable code
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix: prevent infinite loops stemming from invalidation method
The logic was flawed: the captured signals where always added to the previous captured no matter what, which meant a) memory leak b) that when another one runs afterwards, it will falsely contain the signals from the previous run
fixes#9788
* fix lint
- Expect the thing that's checked to be wrapped with the proxy already, so that we can just check for the state symbol
- Make error message more descriptive
* use proxy instead of signal in createRoot
* DRY
* remove for now
* lint
* chore: use proxies instead of signals for spread/rest props (#9801)
* use proxies instead of signals for spread/rest
* fix some spread attribute stuff
* remove is_signal calls
* simplify some more
* more
* remove some unnecessary unwrapping
* another
* simplify
* simplify
* simplify
* remove another MaybeSignal
* more
* remove more unwraps
* code-golf, docs
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
* add missing jsdoc annotation
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
also add event and snippets section to old vs new
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* WIP
* update tests
* only make readonly in runes mode
* remove this for now
* changeset
* ugh
* add reassignment test
* tweak message
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* feat: add unstate utility function
* Update packages/svelte/src/internal/client/proxy/proxy.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* update docs
* add class support
* oops
* lint
* fix docs
* remove symbol and class support
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* magic objects
* read length eagerly — triggers reconciliation
* nested magic
* tests
* more tests
* fix array memory leak
* skipped, partially passing array test
* Fix each
revert bad changes
* more 1337
* eliminate closures
* maybe this is unnecessary?
* only create sources for own properties
* more
* rename stuff
* shuffle things around
* emit $.proxy
* remove proxy helper from public API
* only create sources for writable properties
* update test
* get tests passing
* fix
* remove state-not-mutated warning, which is no longer valid
* track reassignments separately from mutations
* update test - effects no longer fire on mutations unnecessarily
* move util into utils file
* move each logic into its own module; breathe sigh of relief
* tweaks
* more tweaks
* improve runtime
* fix mistake
* ensure we proxy when assigning to state
* fix test
* handle frozen
* create sources when reading proxy properties inside deriveds
* only mutate in legacy mode
* add immutable to transform state
* remove unused second argument to derived
* remove unused second argument to source, and runtime immutable option to createRoot (not sure what that was doing there?)
* oops, backwards
* dedicated binding.kind for legacy reactive imports
* avoid using prop_source in more cases. bit hacky, could be tidier, but it works
* distinguish between source and mutable_source
* remove immutable option from mount
* remove unused apparatus around immutable option
* deprecate immutable
* fix
* tweak
* better default value handling
* remove unnecessary exports
* whitespace is free
* remove obsolete symbol from proxy
* cleanup ts
* improve runtime perf by removing version reads in has()
* add missing proxy call
* tune perf of has() more
* ensure we only create sources in effect_active()
* fix proxy of computed fields
* simplify and fix issue with indexed each blocks
* fix compiler errors around exported state
* only create source for state that is reassigned
* temporary fix, we should come up with something better than this
* readonly props
* fix test
* add test for bind:
* make readonly dev-only
* docs
* forbid setPrototypeOf
* lol whoops
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Dominic Gannaway <dg@domgan.com>