adiGuba
cf56973bf0
fix: class:directive not working with $$restProps ( #15389 )
...
* add spread to test
* fix #15386
* do no set cssHash on non-scoped element
* changeset
1 month ago
Ben McCann
da98c894b8
chore: switch to `tinyglobby` ( #15388 )
...
* chore: switch to tinyglobby
* update snapshot
* update parameter name
* changeset
* delete changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Paolo Ricciuti
3d59e84a65
fix: allow double hyphen css selector names ( #15384 )
1 month ago
Paolo Ricciuti
c2ec0d9ac2
fix: allow for duplicate `var` declarations ( #15382 )
1 month ago
github-actions[bot]
bbeeed421b
Version Packages ( #15380 )
...
* Version Packages
* this changeset was unnecessary
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Rich Harris
5f3b4d5421
chore: DRY out assignment validation ( #15360 )
1 month ago
Rich Harris
51337f22bd
chore: simplify flushing ( #15348 )
...
* this appears to be unnecessary
* DRY out
* this doesnt appear to do anything useful
* simplify
* remove unused if block
* simplify, make non-recursive
* unused
* DRY
* simplify
* tidy up
* simplify
* changeset
* unused
* Revert "changeset"
This reverts commit 946e00dcf7
.
* make flush_sync non-recursive
* fix flushSync types
* fix
* unused
* simplify
* tidy up
* tidy up
* present unnecessary microtasks, avoid flushing if no function provided
* simplify
1 month ago
Rich Harris
7958eb74df
chore: remove unnecessary `binding.is_called` property ( #15361 )
1 month ago
Rich Harris
1b882fb1b5
chore: remove reactive_statements from state ( #15363 )
1 month ago
Rich Harris
bfeb9ad448
chore: create `binding.updated` getter ( #15362 )
1 month ago
Rich Harris
53d1b17ce9
remove some unused exports ( #15365 )
1 month ago
Rich Harris
52d6ed1c73
remove instance_scope ( #15364 )
1 month ago
github-actions[bot]
220c2418d1
Version Packages ( #15358 )
...
* Version Packages
* tweak
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
adiGuba
d4360af751
chore: rewrite set_class() to handle directives ( #15352 )
...
* set_class with class: directives
* update expected result (remove leading space)
* fix
* optimize literals
* add test
* add test for mutations on hydration
* clean observer
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js
unused
Co-authored-by: Rich Harris <hello@rich-harris.dev>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js
unused for now
Co-authored-by: Rich Harris <hello@rich-harris.dev>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/element.js
unused for now
Co-authored-by: Rich Harris <hello@rich-harris.dev>
* Update packages/svelte/src/compiler/phases/3-transform/server/visitors/shared/element.js
nit
Co-authored-by: Rich Harris <hello@rich-harris.dev>
* Update packages/svelte/src/internal/client/dom/elements/attributes.js
nit
Co-authored-by: Rich Harris <hello@rich-harris.dev>
* Update packages/svelte/src/internal/shared/attributes.js
rename clazz to value :D
Co-authored-by: Rich Harris <hello@rich-harris.dev>
* remove unused + fix JSDoc
* drive-by fix
* minor style tweaks
* tweak test
* this is faster
* tweak
* tweak
* this is faster
* typo
* tweak
* changeset
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Alexis
5a946e7905
fix: Allow @const inside #key ( #15377 )
1 month ago
Rich Harris
3c4a8d425b
chore: make Binding a class ( #15359 )
...
* chore: make Binding a class
* reorder
* regenerate
1 month ago
adiGuba
1e1aea4063
chore: remove unnecessary `?? ''` on some expressions ( #15287 )
...
* no `?? ''` on some expressions
* changeset
* delete operator returns boolean
* inverted conditions are a lil confusing
* no need for else after return
* simplify condition
* may as well add special handling for undefined while we're here
* use normal string literal when there are no values
* omit assignment when there is no text content
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
realguse
60b22c0b5f
docs: update casing ( #15321 )
1 month ago
realguse
ac215d9b23
docs: rephrase copyright holder ( #15333 )
1 month ago
Rich Harris
c582b5d3b5
chore: simplify flush_sync ( #15346 )
1 month ago
github-actions[bot]
9873443337
Version Packages ( #15304 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Paolo Ricciuti
d8e78f7f57
fix: `muted` reactive without `bind` and select/autofocus attributes … ( #15326 )
...
* fix: `muted` reactive without `bind` and select/autofocus attributes working with function calls
Co-authored-by: Joel Howse <joel@helicalco.com>
* chore: add comments
---------
Co-authored-by: Joel Howse <joel@helicalco.com>
1 month ago
Simon H
9091e7e930
fix: fire delegated events on target even it was disabled in the meantime ( #15319 )
...
They DOM could've been updated already by the time the event bubbling logic is reached, so the target element itself could not be notified of the event because it is marked as disabled. But the target could not have been disabled because it emits the event in the first place, so we emit regardless.
No test because not reproducible in jsdom environment.
Fixes #15256
1 month ago
adiGuba
0d5d9ab760
docs: fix two element_invalid_self_closing_tag warning in example ( #15324 )
...
* code is incorrect (warning element_invalid_self_closing_tag)
* close canvas
1 month ago
Ranjan Purbey
575900de88
fix: Add more checks to determine if element is non-static ( #15259 )
...
Fixes #15241
1 month ago
tomoam
073f4d8911
fix: prevent writable store value from becoming a proxy when reassigning using $-prefix ( #15283 )
...
fixes #15281
1 month ago
Paolo Ricciuti
dde8603872
fix: do not warn for `binding_property_non_reactive` if binding is a store in an each ( #15318 )
...
Fixes #15315
1 month ago
Ben McCann
87d7cc7d89
chore: add missing await in tests ( #15301 )
1 month ago
Eric Liu
75f81991c2
docs(bindable): fix `file:` annotation for App.svelte ( #15314 )
1 month ago
adiGuba
c40392c1e8
chore: remove options.uid in render() ( #15302 )
...
* remove options.uid in render()
* changeset
* chore: update changeset
---------
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
2 months ago
github-actions[bot]
32b78c9954
Version Packages ( #15279 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Simon H
7e3253745e
fix: ensure AST analysis on `svelte.js` modules succeeds ( #15297 )
...
This was the result of a `@ts-expect-error` silencing other type errors, which lead to this creeping in. This changes it so that the object is fully set, so we'll get type errors when new properties need to be added
fixes #15284
2 months ago
Paolo Ricciuti
8b977253f3
chore: fix `$props.id` tests ( #15294 )
...
* chore: fix `$props.id` tests
* chore: reset uid between tests
2 months ago
Paolo Ricciuti
b6bf735a23
fix: correctly ssr component in `svelte:head` with `$props.id()` or `css='injected'` ( #15291 )
2 months ago
Caique Torres
21dadfc997
fix: ignore typescript abstract methods during code transformation ( #15267 )
2 months ago
github-actions[bot]
23ecc364da
Version Packages ( #15271 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Dominic Gannaway
f747c412f4
chore: tweak effect self invalidation logic ( #15275 )
...
Also make sure events dispatched via transition/animation logic runs outside event context
Related to #15262
2 months ago
Paolo Ricciuti
5e52825d60
fix: take private and public into account for `constant_assignment` of derived state ( #15276 )
...
Fixes #15273
2 months ago
Paolo Ricciuti
18481386f3
fix: use `importNode` to clone templates for Firefox ( #15272 )
...
* fix: use `importNode` to clone templates for Firefox
* fix: move `is_firefox` check to line 28
* fix: revert using `is_firefox` too soon
2 months ago
Kid
5fe0272868
docs: remove duplicate `onDestroy` description ( #15274 )
2 months ago
Simon H
a3e49b6110
fix: recurse into `$derived` for ownership validation ( #15166 )
...
- `$derived` can contain `$state` declarations so we cannot ignore them, so this reverts #14533
- instead, we add equality checks to not do this expensive work unnecessarily
- this also adds a render effect similar to the class ownership addition when it detects a getter on a POJO during ownership addition
fixes #15164
2 months ago
adiGuba
afae274587
fix: value/checked not correctly set using spread ( #15239 )
...
* set value/checked by JS
* test
* changeset
* fix test form-default-value-spread
2 months ago
adiGuba
85f83ec435
feat: $props.id(), a SSR-safe ID generation ( #15185 )
...
* first impl of $$uid
* fix
* $props.id()
* fix errors
* rename $.create_uid() into $.props_id()
* fix message
* relax const requirement, validate assignments instead
* oops
* simplify
* non-constants should be lowercased
* ditto
* start at 1
* add docs
* changeset
* add test
* add docs
* doc : add code example
* fix type reported by bennymi
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 months ago
Rich Harris
73220b8667
chore: simplify process_effects ( #15270 )
...
* chore: simplify process_effects
* return effects
2 months ago
github-actions[bot]
280d8c74cc
Version Packages ( #15263 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Dominic Gannaway
b602c59a22
fix: when re-connecting unowned deriveds, remove their unowned flag ( #15255 )
...
* fix: when an unowned derived is tracked again, remove unowned flag
* fix: when an unowned derived is tracked again, remove unowned flag
* test case
* test case
* cleanup unused logic
* simplify
* simplify
* simplify
* simplify
* add test
* fix other issue
* back to original plan
* Apply suggestions from code review
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2 months ago
Paolo Ricciuti
02788f8e62
fix: allow mutation of private derived state ( #15228 )
...
Also disallow reassignment of private derived state
Fixes #15227
2 months ago
Ben McCann
7ab18bba50
chore: allow pnpm 10 ( #15258 )
2 months ago
github-actions[bot]
c4d4349d0a
Version Packages ( #15234 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Simon H
4883fd2c83
fix: hydrate `href` that is part of spread attributes ( #15226 )
...
We had some duplicated and buggy code, removing it fixes #15120
2 months ago