Tan Li Hau
43d13e92a0
feat: allow $inspect reactivity map, set, date ( #11164 )
...
* feat: allow $inspect reactivity map, set, date
* feat: inspect map without adding new data source
* feat: add inspect
* feat: define inspect on dev mode only
* fix: lint error
5 months ago
Rich Harris
70b47de124
chore: follow-up to #11197 ( #11213 )
...
* simplify
* make each item first nodes explicit
* remove a couple of var declarations
5 months ago
Simon H
4b59ef3c41
fix: widen ownership when sub state is assigned to new state ( #11217 )
...
Ownership was not widened when assigning a sub state to a different top level state. The set of owners for the state was zero because the owner was on the original parent, but that one was reset to null because it's now the top level of a different state. That meant that there was no owner but also no parent to check for the owner, which is an invalid combination resulting in a nullpointer (and also potentially false positive warnings in other situations).
fixes #11204
5 months ago
Rich Harris
c44234dc2f
fix: take outroing elements out of the flow when animating siblings ( #11208 )
...
* fix: take outroing elements out of the flow when animating siblings
* changeset
5 months ago
Tan Li Hau
27d48c601f
fix: catch clause scope ( #11209 )
5 months ago
Simon H
d51075c154
breaking: warn/error on old syntax in runes mode ( #11203 )
...
* breaking: warn/error on old syntax in runes mode
- warn on slots and event handlers in runes mode
- error on `<slot>` + `{@render ...}` tag usage in same component
closes #9416
* render tag + slot could occur in legacy mode as well, error there, too
5 months ago
github-actions[bot]
4ef64541dd
Version Packages (next) ( #11201 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Tan Li Hau
3d49731b1b
fix: refine css `:global()` selector checks in a compound selector ( #11142 )
5 months ago
Azarattum
e7301af1e5
fix: no data duplication in reactive Set/Map ( #11200 )
...
* fix: get rid of data duplication in reactive map
* fix: get rid of data duplication in reactive set
5 months ago
Tan Li Hau
1510c13113
feat: add warning when using $bindable runes without calling it ( #11181 )
...
* feat: add warning when using `$bindable` rune without calling it
* --amend
5 months ago
Dominic Gannaway
777527b5a3
fix: remove memory leak from retaining old DOM elements ( #11197 )
...
* fix: remove memory leak from retaining old DOM elements
* missing logic
* fix dynamic html bug
5 months ago
Dominic Gannaway
63456f1df9
fix: remove memory leak from bind:this ( #11194 )
...
* fix: remove memory leak from bind:this
* alternative approach
* add error
* tidy
* tidy
* add TODO
* add TODO
* alternative approach
5 months ago
github-actions[bot]
9aebae83a5
Version Packages (next) ( #11192 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Simon H
1cc6a32069
fix: ConstTag AST tweak ( #11196 )
...
VariableDeclaration should start at `const`, not at `@const`
As a side-effect, this will create less diff noise for language tools tests
5 months ago
Rich Harris
1c33ff0107
fix: make snippet effects transparent for transitions ( #11195 )
5 months ago
Rich Harris
8fef412dbb
feat: use state proxy ancestry for ownership validation ( #11184 )
...
* rename metadata.o to metadata.owners, tweak check_ownership implementation
* track parent relationships
* update
* changeset
* adjust test to reflect new semantics
* prevent component using bind: with object it does not own
* failing test
* fix #11060
* add explanatory comment
* don't accidentally narrow global ownership, fix has_owner method
* widen ownership if assigning different state proxies to one another
* don't set owners to null when parent exists
* fix
* only recurse into POJOs
* handle cycles on context
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Dominic Gannaway <dg@domgan.com>
5 months ago
Dominic Gannaway
77ed790fb3
fix: ensure bind:this unmount behavior for members is conditional ( #11193 )
...
* fix: ensure bind:this unmount behavior for members is conditional
* revise
5 months ago
Simon H
e7869faf4d
fix: return ast from `compile` ( #11191 )
...
Svelte 4 does it and language tools assumes it's there
This also uncovered another case of how ridicoulus the old AST was
5 months ago
Simon H
7363f873df
chore: remove unused code ( #11190 )
...
leftover from earlier iterations of #11183
5 months ago
Rich Harris
1a341a25f0
docs: rename /docs/functions to /docs/imports, include svelte/reactivity, tweak various things ( #11187 )
5 months ago
github-actions[bot]
30fa876a79
Version Packages (next) ( #11186 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Dominic Gannaway
18097478fc
breaking: remove unstate(), replace with $state.snapshot rune ( #11180 )
...
* breaking: remove untrack(), replace with $state.clean rune
* lol
* update types
* update types
* undo
* undo
* rename to raw
* rename to snapshot
* fix
* tweak docs, to make it explicitly that we're converting to and from proxies
* remove vestiges
* validation
* tweak
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Simon H
cd7c3fea16
fix: more accurate default value handling ( #11183 )
...
- don't call fallback values eagerly, only when it's actually needed. Avoids potential unwanted side effects
- use derived_safe_equals to memoize results of destructured snippet/each context values with default values to ensure they're only recalculated when their dependencies change. Avoids unstable default values getting called multiple times yielding different results. Use derived_safe_equals to ensure new values are always set, even when mutated. fixes #11143
5 months ago
github-actions[bot]
ae7d73453c
Version Packages (next) ( #11176 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Dominic Gannaway
2fa095b61e
fix: improve spreading of attributes ( #11177 )
...
* fix: improve spreading of attributes
* twak
5 months ago
Daniel
d061f2f137
fix: ssr comments in head elements that require raw content ( #10936 )
...
* added raw elements set
* added test
* added changeset
* moved raw text elements to constands and made array
* moved to correct constants
* fix test
* fix constants formatting
5 months ago
github-actions[bot]
322737ac01
Version Packages (next) ( #11162 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Tan Li Hau
8caaa375cf
feat: add reactive URL object to svelte/reactivity ( #11157 )
...
* feat: reactive url
* fix
* simplify
* tidy
* simplify, make ReactiveURLSearchParams signature match URLSearchParams
* Update .changeset/tidy-chefs-taste.md
* fix
* fix
* regenerate types
* improve minifiability
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
5 months ago
Rich Harris
2cefd785a4
fix: make ownership validation work with HMR ( #11171 )
...
* fix: make ownership validation work with HMR
* bump vite-plugin-svelte in playground
* missed a spot
5 months ago
Tan Li Hau
a092899843
feat: update error message for snippet binding and assignments ( #11168 )
...
* feat: update error message for snippet binding and assignments
* make invalid-snippet-assignment apply in non-runes mode too
* update tests
* update types
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Tan Li Hau
d1976c07ff
fix: fix string name of reactive map and set iterator ( #11169 )
...
* fix: fix string name of reactive map and set iterator
* remove solo: true
* lint
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Tan Li Hau
dd9a8a2578
feat: remove todo ( #11167 )
5 months ago
Tan Li Hau
9b67ee18eb
fix: throw error when auto-subscribed store variable shadow by local variable ( #11170 )
5 months ago
Rich Harris
f90639d89c
add missing changeset for #11155 ( #11161 )
5 months ago
Rich Harris
dc6a8398d1
Revert "fix: ensure deep mutation ownership widening" ( #11155 )
...
* Revert "fix: ensure deep mutation ownership widening (#11094 )"
This reverts commit 8578857332
.
* don't delete the changeset, it's already merged
5 months ago
github-actions[bot]
be842425f5
Version Packages (next) ( #11154 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Rich Harris
02f8dafeaa
changeset ( #11153 )
5 months ago
Rich Harris
c1a549e801
check generated types ( #11068 )
...
* check generated types
* bump dts-buddy
5 months ago
Ben M
51faf07897
update runes $effect example ( #11137 )
5 months ago
Tee Ming
fe21a799db
fix broken links ( #11145 )
5 months ago
github-actions[bot]
70ddaf4048
Version Packages (next) ( #11133 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Dominic Gannaway
4b52884b8a
fix: improve REPL console method wrapping ( #11150 )
...
* fix: improve REPL console method wrapping
* fix: improve REPL console method wrapping
5 months ago
Dominic Gannaway
19144b000f
fix: add validation around disallowed sequence expressions to element attributes ( #11149 )
5 months ago
Tan Li Hau
15eb5b5864
fix: missing classes after dynamic expressions in class attributes ( #11134 )
5 months ago
Rich Harris
d5776c3ec3
feat: simplify HMR implementation ( #11132 )
...
* chore: simplify HMR implementation
* changeset
* unused
* prettier
5 months ago
github-actions[bot]
a740b7bb43
Version Packages (next) ( #11130 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Dominic Gannaway
0896543e67
fix: further improvements to hmr component key generation ( #11129 )
5 months ago
github-actions[bot]
3f9f28604e
Version Packages (next) ( #11126 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Dominic Gannaway
53e6a99458
fix: use correct meta property for hmr key ( #11125 )
5 months ago
github-actions[bot]
37b689b320
Version Packages (next) ( #11121 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago