Commit Graph

1316 Commits (f8bf2826ab8b1c443363fb90d22613713501b396)

Author SHA1 Message Date
Dominic Gannaway 1942f87ed9
fix: improve prop binding warning validation for stores (#12745)
1 year ago
Dominic Gannaway d06174e461
chore: add error for derived self referencing (#12746)
1 year ago
Dominic Gannaway bd9a2d2077
fix: ensure unowned deriveds correctly update (#12747)
1 year ago
Rich Harris 59ea0b9e13
fix: better event handling (#12722)
1 year ago
Dominic Gannaway 76cb89c750
fix: allow deletion of $$restProps properties (#12736)
1 year ago
Rich Harris e66416bec7
feat: more efficient code generation when referencing globals (#12712)
1 year ago
Paolo Ricciuti 93cfa6cd69
fix: add css hash to custom element rendered with `svelte:element` (#12715)
1 year ago
Paolo Ricciuti 3286617e3c
feat: function called as tagged template literal is reactively called (#12692)
1 year ago
Paolo Ricciuti e4e66e237f
feat: allow for `svelte:options` css injected (#12660)
1 year ago
Paolo Ricciuti 70197fe4ca
fix: maintain imports in modules (#12704)
1 year ago
Simon H 9eca3d0736
fix: allow nested `<dt>`/`<dd>` elements if they are within a `<dl>` element (#12681)
1 year ago
Simon H 01e7845180
fix: always synchronously call `bind:this` (#12679)
1 year ago
Paolo Ricciuti 64d2a2e20c
feat: allow ignoring runtime warnings (#12608)
1 year ago
Rich Harris 71c373d0a5
chore: refactor analysis (#12651)
1 year ago
Simon H 8be7dd558b
feat: make `<svelte:component>` unnecessary in runes mode (#12646)
1 year ago
Simon H 00e8ebde1d
fix: widen `ComponentProps` constraint to accept more component shapes (#12666)
1 year ago
Simon Holthausen d20e064674 chore: enhance comment on skipped test
1 year ago
Simon Holthausen 7f558290d8 chore: enhance comment on skipped test
1 year ago
Rich Harris 65234b80c0
chore: unified expression metadata (#12644)
1 year ago
Simon H 363535c849
feat: warn on obvious legacy component instantiation (#12648)
1 year ago
Simon H 85f2f161ed
chore: use queue_microtask on `#await` again (#12647)
1 year ago
Paolo Ricciuti 32c4e47060
fix: always set draggable through `setAttribute` to avoid weird behavior (#12649)
1 year ago
Rich Harris 219ba6a71b
fix: error on `bind:this` to each block parameter (#12638)
1 year ago
Simon H 3bff87ac66
chore: tweak html tree validation (#12618)
1 year ago
Simon H c9e9e90659
fix: always close tags when namespace is foreign (#12623)
1 year ago
Simon H 32af9434bc
fix: never set custom element props as attributes (#12622)
1 year ago
Simon H 0f41689916
chore: unskip more tests (#12621)
1 year ago
Rich Harris 97d5cf178f
chore: simplify assignments in server code (#12614)
1 year ago
Rich Harris c66d2cfcc1
feat: better code generation for `let:` directives in SSR mode (#12611)
1 year ago
Simon H 13d86e9019
feat: allow `:global` in more places (alternative) (#12560)
1 year ago
Dominic Gannaway afa3128d2f
breaking: avoid flushing queued updates on mount/hydrate (#12602)
1 year ago
Dominic Gannaway 7a8cf3a9a1
fix: ensure directives run in sequential order (#12591)
1 year ago
Rich Harris 8d139210b7
Revert "breaking: avoid flushing queued updates on mount/hydrate" (#12593)
1 year ago
Dominic Gannaway 20b879717a
breaking: avoid flushing queued updates on mount/hydrate (#12587)
1 year ago
Dominic Gannaway abaa4413df
fix: tweak element_invalid_self_closing_tag to exclude namespace (#12585)
1 year ago
Dominic Gannaway 37f58cf318
fix: apply dynamic event fixes to OnDirective (#12582)
1 year ago
Simon H c0832fd85d
fix: exclude `bind:this` from reactive state validation (#12566)
1 year ago
Dominic Gannaway 64e9f0e5f6
fix: improve dynamic event handling (#12570)
1 year ago
Dominic Gannaway d17755a8b5
fix: ensure dynamic event handlers are wrapped in a derived (#12563)
1 year ago
Dominic Gannaway d73c5b8434
fix: ensure $state.snapshot correctly clones Date objects (#12564)
1 year ago
Simon H e2b75d1a6e
fix: properly update store values (#12562)
1 year ago
Rich Harris 72f5539f51
fix: remove runtime validation of components/snippets, rely on types instead (#12507)
1 year ago
Dominic Gannaway 90d6f573e3
fix: dynamic event delegation for stateful call expressions (#12549)
1 year ago
Rich Harris 6fdfc537e4
fix: update original source in HMR update (#12547)
1 year ago
Rich Harris 73ac4fe456
fix: only emit binding_property_non_reactive warning in runes mode (#12544)
1 year ago
Rich Harris fd5cfd77d8
fix: correctly set filename on HMR wrappers (#12543)
1 year ago
Dominic Gannaway 346cf96599
fix: bail-out of hydrating head if no anchor is found (#12541)
1 year ago
Dominic Gannaway 518d9854f5
chore: add warning for invalid render function of createRawSnippet (#12535)
1 year ago
Rich Harris ff080cbbdc
fix: improve validation error that occurs when using `{@render ...}` to render default slotted content (#12521)
1 year ago
Rich Harris f402d01454
fix: reset hydrate_node after `hydrate(...)` (#12512)
1 year ago
Simon H e02c90209b
fix: make animations more robust to quick shuffling (#12496)
1 year ago
Dominic Gannaway 20e6508c47
fix: ensure $state proxy invokes set accessor if present (#12503)
1 year ago
Rich Harris 2ce2b7d98b
feat: warn if binding to a non-reactive property (#12500)
1 year ago
Simon H dd9ade7736
fix: ensure `bind:this` happens before transitions and animations (#12497)
1 year ago
Simon H 5d82573dcd
fix: properly assign trailing comments (#12471)
1 year ago
Simon H 35ab21df93
fix: don't add imports to hoisted event parameters (#12493)
1 year ago
Simon H 4b8674fe02
fix: ensure async initial store value is noticed (#12486)
1 year ago
Dominic Gannaway ea22840e8c
breaking: remove deep reactivity from non-bindable props (#12484)
1 year ago
Simon H 32b55eaa93
breaking: warn on quotes single-expression attributes in runes mode (#12479)
1 year ago
Simon H 04da87b599
fix: prevent invalid `:global` usage (#12474)
1 year ago
Simon H bc9907aa1c
fix: hydrate multiple `<svelte:head>` elements correctly (#12475)
1 year ago
Simon H 4fd6d29227
fix: assign correct scope to attributes of named slot (#12476)
1 year ago
Simon H 3c3a542c05
fix: error on snippet rest parameters (#12472)
1 year ago
Rich Harris c287bd503d
Raw snippet alternative (#12425)
1 year ago
Rich Harris 07b0db83c5
feat: move dev-time component properties to private symbols (#12461)
1 year ago
Simon H 3d354f0d5c
fix: ensure previous transitions are properly aborted (#12460)
1 year ago
Simon H 436cc99740
fix: always pass original component to HMR wrapper (#12454)
1 year ago
Simon H d9569d052e
feat: add ability to ignore warnings through compiler option (#12296)
1 year ago
Rich Harris c92620dcbe
feat: skip pending block for already-resolved promises (#12274)
1 year ago
Rich Harris b1cf2ece63
fix: defer animations (#12453)
1 year ago
Simon H 141e3e9f92
fix: prevent whitespaces merging across component boundaries (#12449)
1 year ago
Dominic Gannaway 1179b3212c
chore: add signal test (#12450)
1 year ago
BlueGreenMagick 81ed425b5a
fix: allow leading and trailing comments in mustache tag (#11866)
1 year ago
Rich Harris a8dc96eb43
fix: detect mutations within assignments expressions (alternative approach) (#12429)
1 year ago
Ahmad S 879d88f612
fix: show correct errors for invalid runes in `.svelte.js` files (#12432)
1 year ago
Dominic Gannaway e8453e75c6
chore: tweak test config for hmr test run (#12423)
1 year ago
Simon H 51f12d243d
fix: properly validate snippet/slot interop (#12421)
1 year ago
Simon H 70cec4e40e
fix: cache call expressions in render tag arguments (#12418)
1 year ago
Dominic Gannaway d967780c4f
chore: add support for HMR env flag (#12420)
1 year ago
Simon H 277370a79d
fix: properly delay intro transitions (#12389)
1 year ago
Simon H f846cb4833
fix: disallow using `let:` directives with component render tags (#12400)
1 year ago
Leon Scherer fd7b950e7d
fix: Abort outro when intro starts (#12321)
1 year ago
Lyu, Wei-Da 95422e22b6
fix: handle empty else if block in legacy AST (#12397)
1 year ago
Simon H 42a7a0ecd8
chore: document `@html` and `<img src>` hydration change (#12373)
1 year ago
Paolo Ricciuti 4e8d1c8c52
feat: runtime dev warn for mismatched `@html` (#12396)
1 year ago
Paolo Ricciuti 1d76ccf288
fix: style shorthand not referencing variables (#12392)
1 year ago
Rich Harris f3f4ce5741
feat: simplify HMR logic (#12391)
1 year ago
Dominic Gannaway 125156d7d5
fix: ensure hmr block effects are transparent for transitions (#12384)
1 year ago
Rich Harris a4f6407144
feat: universal injected css (#12374)
1 year ago
Rich Harris 47a073e0db
fix: destroy effect on error (#12376)
1 year ago
Rich Harris bdc45fdf7f
breaking: rename `legacy.componentApi` to `compatibility.componentApi` (#12370)
1 year ago
Simon H 529db97928
fix: handle nested `:global(...)` selectors (#12365)
1 year ago
Rich Harris 2789a3c0ef
feat: single-pass hydration (#12335)
1 year ago
Simon H 3dbb220169
fix: ensure `$$slots` returns a record of booleans (#12359)
1 year ago
Dominic Gannaway 202f1dd819
fix: reconnected deep derived signals to graph (#12350)
1 year ago
Rich Harris 66a184689b
chore: simplify legacy props (#12353)
1 year ago
Dominic Gannaway ee47696986
fix: resolve legacy component props equality for mutations (#12348)
1 year ago
Simon H 63f3ee4ffd
fix: make `<select>` `<option value>` behavior consistent (#12316)
1 year ago
Simon H ba93e5fce3
breaking: play transitions on `mount` by default (#12351)
1 year ago
Simon H e8c3729fc9
fix: make `$state` component exports settable (#12345)
1 year ago
Simon H 14cbb65d85
chore: stricter control flow syntax validation in runes mode (#12342)
1 year ago
Simon H dba4aa3567
chore: align warning and error objects, add frame property (#12326)
1 year ago
Simon H 243c4b78b1
fix: ensure `$effect.root` is ignored on the server (#12332)
1 year ago
Simon H cf16acda32
fix: enable local transitions on `svelte:element` (#12346)
1 year ago
Yuichiro Yamashita 67bf7a8067
fix: correct start of `{:else if}` and `{:else}` (#12043)
1 year ago
Simon H 2ffb55ce7d
fix: reorder reactive statements during migration (#12329)
1 year ago
Rich Harris bbf489504d
feat: better `<svelte:element>` SSR output (#12339)
1 year ago
Rich Harris a59bc99782
chore: tidy up (#12336)
1 year ago
Dominic Gannaway b3c002a703
fix: correctly compile $effect.root in svelte modules (#12315)
1 year ago
Rich Harris b2448dcc5c
fix: ensure `bind:this` works with component with no return value (#12308)
1 year ago
Paolo Ricciuti e42bb61296
fix: ensure components always return an object (#12290)
1 year ago
Rich Harris 445f890cd5
fix: create wrapper template for components in HMR mode (#12304)
1 year ago
Dominic Gannaway 15a8518b91
fix: ensure each blocks properly handle $state.frozen objects in prod (#12305)
1 year ago
Simon H bc32b7c828
fix: ensure rest props access on hoisted event handlers works (#12298)
1 year ago
Dominic Gannaway 80263770f1
fix: bail out of event hoisting when referencing store subscriptions (#12301)
1 year ago
Dominic Gannaway d57491f2ce
chore: add unowned signals test (#12275)
1 year ago
Rich Harris 5ce7599f3d
chore: beef up memory leak test for unowned deriveds (#12265)
1 year ago
Dominic Gannaway d2530ed4a1
fix: handle duplicate signal dependencies gracefully (#12261)
1 year ago
Rich Harris fbb7da7e35
feat: simpler effect DOM boundaries (#12258)
1 year ago
Damian Stasik 84325bf89b
chore: use JSDoc type imports in more files (#12239)
1 year ago
Dominic Gannaway cae5f1ed26
breaking: rename svelte/reactivity helpers to include Svelte prefix (#12248)
1 year ago
Rich Harris 9a293ea8c4
fix: add dummy anchor for dynamic component HMR wrappers (#12252)
1 year ago
Dominic Gannaway 9f51760dc6
fix: avoid duplicate signal dependencies (#12245)
1 year ago
Simon H 0d8330703d
fix: ensure HMR doesn't mess with anchor nodes (#12242)
1 year ago
Dominic Gannaway 434e1adda6
fix: deconflict multiple snippets of the same name (#12221)
1 year ago
Rich Harris 2c807ad88c
fix: store DOM boundaries on effects (#12215)
1 year ago
Dominic Gannaway 7c95c7b662
fix: support contenteditable binding undefined fallback (#12210)
1 year ago
Simon H c42bb04276
fix: disallow accessing internal Svelte props (#12207)
1 year ago
Simon H 33e44ea697
feat: allow `let props = $props()`, optimize prop read access (#12201)
1 year ago
Simon H d959d4afbe
fix: make media bindings more robust (#12206)
1 year ago
Dominic Gannaway 23484d6875
breaking: prevent usage of arguments keyword in certain places (#12191)
1 year ago
Simon H a4e994bdf4
fix: allow slot attribute inside snippets (#12188)
1 year ago
Dominic Gannaway 5811236ba5
fix: improve select handling of dynamic value with placeholders (#12181)
1 year ago
Dominic Gannaway 59f7bd6f9f
fix: improve await block behaviour in non-runes mode (#12179)
1 year ago
Simon H ef50e45aca
fix: migration fixes (#12176)
1 year ago
Simon H ff946812b7
fix: correctly serialize object assignment expressions (#12175)
1 year ago
Simon H 67422c4334
fix: allow whitespace before an after snippet parameters (#12159)
1 year ago
Paolo Ricciuti 8e696b0817
fix: throw compilation error for malformed snippets (#12144)
1 year ago
wackbyte 5b60a0e6ba
fix: prevent `a11y_label_has_associated_control` false positive for component in `<label>` (#12119)
1 year ago
Paolo Ricciuti 965c12f633
fix: allow multiple optional parameters with defaults (#12070)
1 year ago
Simon H afe84450c6
fix: better binding interop between runes/non-runes components (#12123)
1 year ago
Rich Harris 3da2646b10
feat: more accurate `render`/`mount`/`hydrate` options (#12111)
1 year ago
Paolo Ricciuti be9b0a275a
fix: repair each block length even without an else (#12098)
1 year ago
Dominic Gannaway 6a3e293207
fix: wait a microtask for await blocks to reduce UI churn (#11989)
1 year ago
Dominic Gannaway eca1b7fd06
fix: ensure state update expressions are serialised correctly (#12109)
1 year ago
Simon H fcf81b1e1d
fix: preserve component function context (#12089)
1 year ago
Dominic Gannaway 399e464b44
fix: ensure input value is correctly set during hydration (#12083)
1 year ago
Dominic Gannaway 696a4b3dae
fix: improve compiler attribute validation logic (#12081)
1 year ago
Rich Harris 98d90745ad
chore: fix typos (#12078)
1 year ago
Rich Harris 90ce1d5f0b
chore: add unowned derived memory leak test (#12075)
1 year ago
Simon H a94b83b7d4
fix: support function invocation from imported `*.svelte` components (#12061)
1 year ago
Simon H a1b6cc68d9
fix: handle `is` attribute on elements with spread (#12056)
1 year ago
Simon H f1d8ed64fd
fix: better types for `on` (#12053)
1 year ago
Rich Harris f5f38796ba
fix: increment derived versions when updating (#12047)
1 year ago
Dominic Gannaway ccb3c90cd5
breaking: rename $effect.active to $effect.tracking (#12022)
1 year ago
Simon H 9dc2d71a12
fix: relax constraint for ComponentProps (#12026)
1 year ago
Simon H 0119f25125
fix: better event delegation behavior around multiple listeners (#12024)
1 year ago
Simon H bf23f692fe
fix: robustify migration script (#12019)
1 year ago
Dominic Gannaway 50fd94fe61
fix: address event delegation duplication behaviour (#12014)
1 year ago
Paolo Ricciuti e27b8c5cb5
fix: better `render` type (#11997)
1 year ago
gtmnayan 2a8632385c
fix: SSR template escaping (#12007)
1 year ago
Dominic Gannaway 0d51dbae32
fix: ensure bound input content is resumed on hydration (#11986)
1 year ago
Rich Harris c39805d027
feat: detach inert effects (#11955)
1 year ago
Dominic Gannaway 3e1abc0b87
fix: ensure dev validation in dynamic component works as intended (#11985)
1 year ago
Rich Harris f752b1e255
chore: simplify SSR (#11977)
1 year ago
Azat S 088632b06d
fix: fix merge style func (#11971)
1 year ago
wackbyte c9202a8896
feat: sort possible bindings in invalid binding error (#11950)
1 year ago
Rich Harris bd950a0be2
fix: more efficient and correct reactive set (#11967)
1 year ago
Rich Harris 4f12846fdf
feat: more efficient output for attributes in SSR (#11949)
1 year ago
Rich Harris 968bba5e54
feat: simpler string normalization (#11954)
1 year ago
Rich Harris 64ee32c5fe
Revert "fix: lazily create sources for Set (#11946)" (#11966)
1 year ago
Paolo Ricciuti 57ca37d6a1
fix: validate form inside a form (#11947)
1 year ago
Paolo Ricciuti 48fa6587c9
fix: lazily create sources for Set (#11946)
1 year ago
Rich Harris 76388d042c
fix: always assign text.nodeValue (#11944)
1 year ago
Rich Harris 123b5cbecb
chore: simpler `<svelte:element>` hydration (#11773)
1 year ago
Paolo Ricciuti 6655f2c5d2
feat: better dynamic component css props (#11792)
1 year ago
Dominic Gannaway aadf629580
feat: add svelte/events package and export on function (#11912)
1 year ago
Simon H 5b0a843b31
fix: relax `Component` type (#11929)
1 year ago
Simon H 8aa8e699ff
fix: handle TypeScript parameter properties (#11928)
1 year ago
Dominic Gannaway 7714c934fe
chore: deprecate html in favour of body for render() (#11927)
1 year ago
Dominic Gannaway 9f823b95e3
fix: improve consttag ordering in non-runes mode (#11908)
1 year ago
Simon H 380d4454a3
fix: relax slot prop validation on components (#11923)
1 year ago
Simon H 6efd9d6f44
fix: correctly backport `svelte:element` to old AST (#11917)
1 year ago
Paolo Ricciuti 862949d22a
fix: increment version when creating new source in Map.get or Map.has (#11913)
1 year ago
wackbyte c0c1a56675
feat: bind `activeElement` and `pointerLockElement` in `<svelte:document>` (#11879)
1 year ago
Paolo Ricciuti f3c291d8dd
fix: silence `state_referenced_locally` when state is exported (#11905)
1 year ago
Dominic Gannaway 832f8deeec
fix: ensure frozen objects in state are correctly skipped (#11889)
1 year ago
Paolo Ricciuti 5eb8641ac7
fix: keep default values of props a proxy after reassignment (#11860)
1 year ago
Dominic Gannaway 3c87a69999
breaking: removed deferred event updates (#11855)
1 year ago
Paolo Ricciuti c9c4b9d50b
fix: allow for more svelte-ignore to work (#11833)
1 year ago
Paolo Ricciuti 7e762cf481
fix: reevaluate namespace in slots (#11849)
1 year ago
Paolo Ricciuti 82a645f8d0
fix: `$state.is` missing second argument on the server (#11835)
1 year ago
Simon H bcb319310f
fix: prevent false positive ownership warning when reassigning state (#11812)
1 year ago
Dominic Gannaway 5f7bfac59a
chore: cleanup event changes (#11821)
1 year ago
Dominic Gannaway 36b270ef3b
fix: address derived memory leak on disconnection from reactive graph (#11819)
1 year ago
Simon H 538060ebda
fix: ensure visit is called with correct state (#11798)
1 year ago
Simon H 68263c8615
fix: make prop fallback values deeply reactive if needed (#11804)
1 year ago
Simon H 8c66b64e6b
feat: provide new `Component` type that represents the shape of components (#11775)
1 year ago
Simon H 7a1326be06
fix: handle `this` parameter in TypeScript-annotated functions (#11795)
1 year ago
FoHoOV 4fef0eb08f
fix: capture the correct event names when spreading attributes (#11783)
1 year ago
Paolo Ricciuti ee9d5ef850
fix: allow global next to `&` for nesting (#11784)
1 year ago
FoHoOV b963e53fc9
fix: parse ongotpointercapture and onlostpointercapture events correctly (#11790)
1 year ago
Rich Harris d1f5d5d33d
fix: only inject push/pop/$$props in SSR components when necessary (#11771)
1 year ago
Paolo Ricciuti 9084f1796b
fix: allow runelike writable as prop (#11768)
1 year ago
Paolo Ricciuti d856c50092
fix: `array.lastIndexOf` without second argument (#11766)
1 year ago
Paolo Ricciuti 7dacf2c4d4
fix: use svg methods for updating svg attributes too (#11755)
1 year ago
Rich Harris d15fd9556f
chore: better invalid attribute message (#11754)
1 year ago
Paolo Ricciuti 5765752d78
fix: throw on invalid attribute expressions (#11736)
1 year ago
Paolo Ricciuti e73b133b66
fix: don't warn on link without href if aria-disabled (#11737)
1 year ago
Rich Harris 329c10eb6c
chore: update noscript test (#11749)
1 year ago
Dominic Gannaway fe51cde1fa
breaking: event handlers + bindings now yield effect updates (#11706)
1 year ago
Dominic Gannaway 44115840bd
chore: cleanup more tests (#11738)
1 year ago
Simon H 4f9096a5a8
chore: delegate input event (#11732)
1 year ago
Paolo Ricciuti 77f91459b6
fix: update value like attributes in a separate template_effect (#11720)
1 year ago
Simon H d590cd8bea
fix: ignore value attribute on select during SSR (#11724)
1 year ago
Paolo Ricciuti 6d2f1a48b4
fix: allow comments after last selector in css (#11723)
1 year ago
Rich Harris 0128df33da
fix: don't add scoping modifier to nesting selectors (#11713)
1 year ago
Dominic Gannaway 09addad9ae
fix: improve handling of unowned derived signal (#11712)
1 year ago
Paolo Ricciuti f48001ac63
fix: check for invalid bindings on window and document (#11676)
1 year ago
Paolo Ricciuti b788b72862
fix: migrate derivations without semicolons (#11704)
1 year ago
Rich Harris 02520aea48
better tooltips in playground (#11705)
1 year ago
Dominic Gannaway e6f8e95199
chore: tidy up tests to use flushSync (#11703)
1 year ago
Simon H 1784026843
fix: don't require commas between warnings in legacy mode (#11669)
1 year ago
Rich Harris c29b74669d
feat: migrate `<svelte:element this="div">` (#11659)
1 year ago
Rich Harris d288735fa8
breaking: disallow string literal values in `<svelte:element this="...">` (#11454)
1 year ago
Simon H ade6b6e480
chore: add css regression test (#11658)
1 year ago
Simon H c2f75dc7ba
fix: use coarse-grained updates for derived expressions in legacy mode (#11652)
1 year ago
Dominic Gannaway 54083fb9cc
fix: replay load and error events on load during hydration (#11642)
1 year ago
Dominik G dc9b0d08c1
feat: add rootDir option and set __svelte_meta.file like in svelte4 (#11627)
1 year ago
Rich Harris 3bf68b4765
fix: make messages more consistent (#11643)
1 year ago
Dominic Gannaway 053159bf0b
fix: avoid state_referenced_locally warning within type annotations (#11638)
1 year ago
Simon H 4365562228
fix: deduplicate children prop from default slot (#10800)
1 year ago
Simon H 4bedd0e4fb
feat: error on imports to `svelte/internal/*` (#11632)
1 year ago
Dominic Gannaway e5e7ec2404
fix: better handle img loading attribute (#11635)
1 year ago
Paolo Ricciuti 87a420f64d
feat: error when snippet shadows a prop (#11631)
1 year ago
Simon H 573b9f1d74
fix: adjust unknown code warning offset (#11621)
1 year ago
Dominic Gannaway f488a6e84a
feat: add $state.is rune (#11613)
1 year ago
Dominic Gannaway 1087e6fb54
chore: improve SSR invalid element error message (#11585)
1 year ago
Simon H faced066bd
feat: migrate warnings (#11607)
1 year ago
Simon H 2bc39b1de2
chore: better ignore code handling (#11606)
1 year ago
Rich Harris 5cb432b7bd
feat: warn on unknown warning codes in runes mode (#11549)
1 year ago
Simon H d408d20cdd
fix: replicate Svelte 4 props update detection in legacy mode (#11577)
1 year ago
Simon H a0bdac8cd7
fix: correctly handle falsy values of style directives in SSR mode (#11583)
1 year ago
Paolo Ricciuti 81517a506c
fix: allow for non optional chain call expression in render (#11578)
1 year ago
Dominic Gannaway 5497b3d0bc
fix: ensure all effect cleanup functions are untracked (#11567)
1 year ago
Dominic Gannaway fcc72ae2f3
feat: provide better error messages in DEV (#11526)
1 year ago
Simon H 641e411cf1
fix: ensure spread events are always added (#11535)
1 year ago
Simon H 31f8fea22d
fix: don't warn on writes to `$state` (#11540)
1 year ago
Simon H 65223363e9
fix: handle falsy prop aliases correctly (#11539)
1 year ago
Dominic Gannaway 4ea8a5e36b
chore: add derived effect ownership tests (#11538)
1 year ago
Fabio Rotondo f219c795f4
fix: check for falsy values in spread (#11388)
1 year ago
Rich Harris 8742823e39
fix: make `$effect.active()` true when updating deriveds (#11500)
1 year ago
Dominic Gannaway 30caaef2e5
fix: improve behaviour of unowned derived signals (#11521)
1 year ago
Paolo Ricciuti 70419daf5f
fix: use snippet as parent element of snippets childrens in validator (#11463)
1 year ago
Rich Harris b1b2dddc3b
feat: add support for svelte inspector (alternative approach) (#11514)
1 year ago
Dominik G 28f3755e40
fix: use acceptExports to support partial hmr (#11453)
1 year ago
Paolo Ricciuti 0cf6d56ffe
fix: increment and decrement edge case (#11506)
1 year ago
Vladislav Logvin 85d680582b
Fix: bind:scroll resets scroll state (#11469)
1 year ago
Simon H 6bd6f0971b
fix: ensure derived is detected as dirty correctly (#11496)
1 year ago
Simon H d86b05279f
fix: prevent false positive ownership warning (#11490)
1 year ago
Paolo Ricciuti fa3e98e8c6
fix: allow to access private fields after `this` reassignment (#11487)
1 year ago
Paolo Ricciuti 34079a0ec5
fix: restore value after attribute removal during hydration (#11465)
1 year ago
Simon H 9c1a5063b9
fix: adjust order of `derived` function definition overloads (#11426)
1 year ago
Simon H 6e5ab2e678
fix: prevent ownership validation from infering with component context (#11438)
1 year ago
Dominic Gannaway 1f9ad03287
fix: ensure $inspect untracks inspected object (#11432)
1 year ago
Dominic Gannaway b4968584df
fix: improve html escaping of element attributes (#11411)
1 year ago
Simon H a038d49f78
fix: rework bindable types strategy (#11420)
1 year ago
Hunter Johnston 17b2f6215d
fix: `event.currentTarget` always being equal to `event.target` (#11419)
1 year ago
Rich Harris edefc846c3
fix: set correct component context when rendering snippets (#11401)
1 year ago
Paolo Ricciuti f64d16931d
fix: detect style shorthands as stateful variables in legacy mode (#11421)
1 year ago
Dominic Gannaway 0f4f3d7df0
fix: improve unowned derived signal behaviour (#11408)
1 year ago
Luke Warlow 8be6fdde54
feat: MathML support (#11387)
1 year ago
Simon H 2754e4eb39
fix: handle reassignment of `$$props` and `$$restProps` (#11348)
1 year ago
Simon H 5e0845fe3e
fix: disallow sequence expressions in `@const` tags (#11357)
1 year ago
Jeremiasz Major 0397fcb614
fix: require whitespace after `@const` tag (#11379)
1 year ago
Simon H eb7e32c168
fix: collect all necessary setters of html elements (#11371)
1 year ago
Simon H cd2506535f
feat: leave view transition pseudo selectors untouched (#11375)
1 year ago
Simon H de315d84eb
fix: ensure reactions are kept dirty when marking them again (#11364)
1 year ago
Simon H 4479b8c6f3
fix: allow `bind:this` on `<select>` with dynamic `multiple` attribute (#11378)
1 year ago
Simon H 500b2065e0
fix: apply modifiers to bubbled events (#11369)
1 year ago
Simon H 8b1a26904a
chore: add css regression test (#11373)
1 year ago
Paolo Ricciuti 2d2508a2cd
feat: allow for literal property definition with state on classes (#11326)
1 year ago
Paolo Ricciuti c7bdef595b
fix: store from props hoist wrong param (#11367)
1 year ago
Caique Torres 68071f7c06
fix: disallow mixing event-handling syntaxes (#11295)
1 year ago
Simon H 7d19e5b1a4
fix: disallow mounting a snippet (#11347)
1 year ago
Paolo Ricciuti d3949a6e71
fix: hr, script and template as valid select children (#11344)
1 year ago
Simon H cd798077b4
feat: provide migration function (#11334)
1 year ago
Rich Harris f1986da755
feat: only inject push/init/pop when necessary (#11319)
1 year ago
Rich Harris 8e43e9aae0
fix: correctly interpret empty aria- attribute (#11325)
1 year ago
Rich Harris 9a887f8dab
chore: directly export function in non-HMR mode (#11333)
1 year ago
Rich Harris 8e17428316
chore: tidy up messages (#11327)
1 year ago
Rich Harris 6ad5cd4461
feat: implement message overloads (#11318)
1 year ago
Rich Harris 476f2172b6
fix: mark `accessors` and `immutable` as deprecated (#11277)
1 year ago
Rich Harris 94b4268ce3
chore: markdown runtime errors/warnings (#11304)
1 year ago
Rich Harris eea5c8ff95
chore: handle option warnings the same as others (#11303)
1 year ago
Simon H f6dfac985c
feat: `Bindable` types (#11225)
1 year ago
Rich Harris 7b55bd4d89
chore: markdown warnings (#11302)
1 year ago
Rich Harris 5405ec6c91
chore: refactor logic for ignoring warnings (#11300)
1 year ago
Rich Harris 73490bbb8e
chore: markdown errors (#11294)
1 year ago
Simon H 2d378bb762
breaking: disallow binding to component exports in runes mode (#11238)
1 year ago
Craig Jennings fe6e4e2b05
fix: avoid hoisting error by using 'let' instead of 'var' (#11291)
1 year ago
Rich Harris fd5f5bb85d
monkey-patch console.log and console.warn for all tests (#11265)
1 year ago
Rich Harris 5ef1fdf7cc
fix: run render functions for dynamic void elements (#11258)
1 year ago
Rich Harris 521d124267
fix: allow events to continue propagating following an error (#11263)
1 year ago
Rich Harris 9721d5641b
feat: implement `:global {...}` CSS blocks (#11276)
1 year ago
Vaibhav Rai 11c7cd5495
Feat: Add read-only binding focused (#11271)
1 year ago
Jeremiasz Major b91a67ba68
feat: include `script` and `svelte:options` attributes in ast (#11241)
1 year ago
Simon H 7edba25581
fix: run event attributes after binding event listeners (#11230)
1 year ago
Rich Harris 6bff8c0e93
fix: ensure that CSS is generated for the final frame of a transition (#11251)
1 year ago
Rich Harris 0ad0f04b0b
fix: more robust moving of each item nodes (#11254)
1 year ago
Jeremiasz Major a764f4e88e
don't allow children in svelte:options (#11250)
1 year ago
Paolo Ricciuti eac4218402
fix: possible name clash in hoisted functions (#11237)
1 year ago
Simon H cca67bba51
fix: support `$state.snapshot` as part of variable declarations (#11235)
1 year ago
Rich Harris de2d8a0bee
Revert "feat: allow $inspect reactivity map, set, date (#11164)" (#11223)
1 year ago
Rich Harris 42ce8d74e1
breaking: warn on self-closing non-void HTML tags (#11114)
1 year ago
Simon H 27eb91bbce
fix: dynamic namespace fixes and enhancements (#11219)
1 year ago
Tan Li Hau 43d13e92a0
feat: allow $inspect reactivity map, set, date (#11164)
1 year ago
Simon H 4b59ef3c41
fix: widen ownership when sub state is assigned to new state (#11217)
1 year ago
Tan Li Hau 27d48c601f
fix: catch clause scope (#11209)
1 year ago
Simon H d51075c154
breaking: warn/error on old syntax in runes mode (#11203)
1 year ago
Tan Li Hau 3d49731b1b
fix: refine css `:global()` selector checks in a compound selector (#11142)
1 year ago
Tan Li Hau 1510c13113
feat: add warning when using $bindable runes without calling it (#11181)
1 year ago
Dominic Gannaway 777527b5a3
fix: remove memory leak from retaining old DOM elements (#11197)
1 year ago
Rich Harris 1c33ff0107
fix: make snippet effects transparent for transitions (#11195)
1 year ago
Rich Harris 8fef412dbb
feat: use state proxy ancestry for ownership validation (#11184)
1 year ago
Dominic Gannaway 77ed790fb3
fix: ensure bind:this unmount behavior for members is conditional (#11193)
1 year ago
Dominic Gannaway 18097478fc
breaking: remove unstate(), replace with $state.snapshot rune (#11180)
1 year ago
Simon H cd7c3fea16
fix: more accurate default value handling (#11183)
1 year ago
Dominic Gannaway 2fa095b61e
fix: improve spreading of attributes (#11177)
1 year ago
Daniel d061f2f137
fix: ssr comments in head elements that require raw content (#10936)
1 year ago
Tan Li Hau 8caaa375cf
feat: add reactive URL object to svelte/reactivity (#11157)
1 year ago
Tan Li Hau a092899843
feat: update error message for snippet binding and assignments (#11168)
1 year ago
Tan Li Hau d1976c07ff
fix: fix string name of reactive map and set iterator (#11169)
1 year ago
Tan Li Hau 9b67ee18eb
fix: throw error when auto-subscribed store variable shadow by local variable (#11170)
1 year ago
Rich Harris dc6a8398d1
Revert "fix: ensure deep mutation ownership widening" (#11155)
1 year ago
Dominic Gannaway 19144b000f
fix: add validation around disallowed sequence expressions to element attributes (#11149)
1 year ago
Tan Li Hau 15eb5b5864
fix: missing classes after dynamic expressions in class attributes (#11134)
1 year ago
Rich Harris d5776c3ec3
feat: simplify HMR implementation (#11132)
1 year ago
Dominic Gannaway afe1d11a5b
feat: hot module reloading support for Svelte 5 (#11106)
1 year ago
Dominic Gannaway 3bb231197e
fix: loosen proxy signal creation heuristics (#11109)
1 year ago
Simon H 27891cb2dd
fix: ensure top level snippets are defined when binding to component prop (#11104)
1 year ago
Rich Harris 4d0b743918
feat: use linked lists for each blocks (#11107)
1 year ago
Dominic Gannaway ce348f0d69
chore: add test to show usage of context in component template (#11061)
1 year ago
Simon H 5a1c756a4e
fix: execute sole static script tag (#11095)
1 year ago
Dominic Gannaway 3c2f4d2d55
fix: improve hydration of svelte head blocks (#11099)
1 year ago
Dominic Gannaway 48549f7d00
fix: improve internal proxied state signal heuristic (#11102)
1 year ago
Simon H d2b6159d2e
chore: css unused selector warnings (#11098)
1 year ago
Simon H ed9bab9200
fix: better sibling selector handling (#11096)
1 year ago
Dominic Gannaway 3462c54fd2
fix: improve compiled output of multiple call expression in single text node (#11097)
1 year ago
Simon H 22494be9ec
feat: introduce `$host` rune, deprecate `createEventDispatcher` (#11059)
1 year ago
Simon H 8578857332
fix: ensure deep mutation ownership widening (#11094)
1 year ago
Simon H b1a8038f8b
fix: make static `element` property available (#11079)
1 year ago
Simon H a9e15bdf2d
breaking: robustify interop of exports and props (#11064)
1 year ago
Dominic Gannaway 452749494e
Fix unowned bug 2 (#11077)
1 year ago
Dominic Gannaway c50883e496
fix: ensure transition errors are not swallowed (#11039)
1 year ago
Rich Harris 92909834f0
breaking: prevent unparenthesized sequence expressions in attributes (#11032)
1 year ago
Dominic Gannaway 1d52c1323b
fix: improve unowned derived signal heuristics (#11029)
1 year ago
Dominic Gannaway 2a784fce16
fix: correctly handle closure passed to $derived.by when destructuring (#11028)
1 year ago
Rich Harris 3c155e3f3e
fix: ensure effect cleanup functions are called with null `this` (#11024)
1 year ago
Rich Harris ad11c5087f
fix: ensure correct context for action update/destroy functions (#11023)
1 year ago
Rich Harris 34748ba015
chore: verify that `$effect.root(...)` does not re-run (#11020)
1 year ago
Rich Harris 0a162924fb
feat: more efficient hydration markers (#11019)
1 year ago
Rich Harris 7bd853b1a8
fix: hydrate HTML with surrounding whitespace (#10996)
1 year ago
Dominic Gannaway 696b6922e8
fix: revert shorthand ssr comments (#10980)
1 year ago
Dominic Gannaway 8971910940
fix: further improvements to effect scheduling and flushing (#10971)
1 year ago
Rich Harris d49e2aeb15
chore: explicit reexports (#10970)
1 year ago
Rich Harris cebbccbcba
chore: move svelte/internal to svelte/internal/client (#10968)
1 year ago
Rich Harris eaa243d2da
chore: reshuffle some code (#10967)
1 year ago
Dominic Gannaway f118f8ea27
fix: improve action support for nested $effect (#10962)
1 year ago
Dominic Gannaway d50b7661e5
fix: improve effect sequencing and execution order (#10949)
1 year ago
Rich Harris 2079e675ea
replace skip_if_ssr and skip_if_hydrate with modes (#10956)
1 year ago
Rich Harris 326e2b4840
chore: simplify templates (#10954)
1 year ago
Rich Harris 9a4cd7e8d8
chore: refactor effects a bit (#10948)
1 year ago
Rich Harris 66e0378155
chore: remove `$.space` (#10945)
1 year ago
Rich Harris 4fcedb2fb1
chore: simplify hydration (#10943)
1 year ago
Rich Harris 3ce74e47a9
chore: update sequencing inside blocks (#10939)
2 years ago
Rich Harris f2cca537a3
feat: use implicit return for each block keys (#10938)
2 years ago
Rich Harris 808cc6fca6
feat: shorter each blocks (#10937)
2 years ago
Rich Harris 8cfea9f36c
breaking: always run pre effects synchronously (#10928)
2 years ago
Rich Harris ed2981d7b8
chore: simplify updates (#10922)
2 years ago
Rich Harris b7a0d80bfc
simplify render_effect signature (#10925)
2 years ago
Rich Harris 59ff650ccb
remove if blocks around attribute updates (#10917)
2 years ago
Rich Harris 4f24eae9c3
simplify updates (#10912)
2 years ago
Rich Harris 8685d497e5
feat: use bracket matching instead of `ssr:n` comments (#10904)
2 years ago
Rich Harris 7e5e462194
feat: use short comments (#10899)
2 years ago
Rich Harris 32b1824198
chore: more hydration stuff (#10896)
2 years ago
Rich Harris 9b7331c04c
chore: only specify use_clone_node when necessary (#10895)
2 years ago
Rich Harris 8214075285
fix: update type of `options.target` (#10892)
2 years ago
Rich Harris 7f10642add
chore: improve hydration tests (#10887)
2 years ago
Dominic Gannaway fe7c45ba13
Add more tests (#10882)
2 years ago
Dominic Gannaway d6f10c5421
add more legacy tests (#10881)
2 years ago
Rich Harris b6c7956b26
chore: remove blocks (#10880)
2 years ago
Dominic Gannaway 83f30bf0e8
fix: allow runes for variable declarations in the template (#10879)
2 years ago
Simon H b468978e4d
fix: handle multiple snippet parameters with one or more being optional (#10833)
2 years ago
Simon H 3eef1cb8cf
feat: take form resets into account for two way bindings (#10617)
2 years ago
Simon H 416bc85d9c
breaking: add $bindable() rune to denote bindable props (#10851)
2 years ago
Dominic Gannaway 2cabc884ca
add some missing legacy tests (#10875)
2 years ago
Rich Harris 04879c53e9
chore: simplify blocks (#10873)
2 years ago
Simon H a339c28bb7
breaking: apply fallback value every time in runes mode (#10797)
2 years ago
Rich Harris e8ce41815a
chore: simplify transitions (#10798)
2 years ago
Simon H 86b3ea8c23
chore: failing test for out-of-order `$:` execution (#10864)
2 years ago
Dominic Gannaway 8c2f6039c6
fix: improve element class attribute behaviour (#10856)
2 years ago
Simon H 86c57f96de
fix: better await block scope analysis (#10849)
2 years ago
Dominic Gannaway efe85fcce0
fix: more robust select element logic (#10848)
2 years ago
Dominic Gannaway c564c77199
fix: ensure select value is updated upon select element removal (#10846)
2 years ago
Simon H 682f4a6513
fix: adjust scope parent for named slots (#10843)
2 years ago
Dominic Gannaway 117082b039
fix: improve handling of unowned derived signals (#10842)
2 years ago
Simon H f8c85d525d
fix: ensure capture events don't call delegated events (#10831)
2 years ago
Dominic Gannaway fe3b3b463c
feat: adds reactive Map class to svelte/reactivity (#10803)
2 years ago
Simon H c35f0c16af
fix: deduplicate module declaration, adjust type (#10801)
2 years ago
Simon H fbbd89a917
fix: invalidate store when mutated inside each block (#10785)
2 years ago
Simon H 339782f3e0
fix: handle component binding mutation (#10786)
2 years ago
Dominic Gannaway 2cb78ac253
fix: adjust render effect ordering (#10783)
2 years ago
Dominic Gannaway 3f7fcf9aec
feat: add reactive Set class to svelte/reactivity (#10781)
2 years ago
Dominic Gannaway 468ecda6ea
fix: improve internal render effect sequencing (#10769)
2 years ago
Rich Harris 278155968e
chore: refactor reactivity code (#10760)
2 years ago
Dominic Gannaway ef206fe1b5
fix: improve derived output for ssr (#10757)
2 years ago
Rich Harris 7cc5ce4e65
tidy up (#10744)
2 years ago
Simon H 74474fe085
fix: prevent reactive statement reruns (#10736)
2 years ago
Dominic Gannaway 7c00f1dacb
fix: improve bind:this support around proxyied state (#10732)
2 years ago
Simon H 304db0d5b2
fix: bump specificity on all members of a selector list (#10730)
2 years ago
Simon H b1267b03b6
fix: error when exporting reassigned state from module context (#10728)
2 years ago
Simon H ae4af6841a
fix: eagerly unsubscribe when store is changed (#10727)
2 years ago
Simon H 3fd02f1c49
breaking: preserve slots inside templates with a shadowrootmode attribute (#10721)
2 years ago
Papaya cc22492e7a
fix: use toDateString occur error when use pnpm run test in China (#10719)
2 years ago
Simon H fff3320517
chore: custom elements validation (#10720)
2 years ago
Simon H 881e84f988
chore: get more validator tests passing (#10714)
2 years ago
Rich Harris a5a566dfa7
chore: tidy up (#10705)
2 years ago
Dominic Gannaway f8eb0d16d6
fix: improve each keyed block handling of item used as key (#10703)
2 years ago
Dominic Gannaway d9d1022895
fix: improve indexed each equality (#10702)
2 years ago
Simon H 4285e6d814
fix: prevent snippet children conflict (#10700)
2 years ago
Dominic Gannaway eedb59355f
fix: adjust keyed each block equality handling (#10699)
2 years ago
Rich Harris 86f326531c
chore: refactor signal types (#10698)
2 years ago
Rich Harris aa29a853dd
chore: move reactivity code around (#10696)
2 years ago
Ahmad 6fb64c9914
fix: improve namespace inference when having `{@render}` and `{@html}` tags (#10631)
2 years ago
Simon H 767b5a8824
chore: remove obsolete test (#10679)
2 years ago
Simon H 5d3385c56f
fix: don't collapse whitespace within text nodes (#10691)
2 years ago
Simon H 5768ac3027
fix: better ownership mutation validation (#10673)
2 years ago
Simon H 74f8e261c6
fix: prevent false positive non-state warnings for `bind:this` (#10674)
2 years ago
Simon H 1ac313594c
fix: handle TypeScript's optional parameter syntax in snippets (#10671)
2 years ago
Simon H b1b51a404b
fix: deduplicate generated props and action arg names (#10669)
2 years ago
Dominic Gannaway 710f73f9cf
fix: improve derived rune destructuring support (#10665)
2 years ago
Simon H 56315df679
feat: allow arbitrary call expressions for render tags (#10656)
2 years ago
Dominic Gannaway b2e9be2148
fix: improve ssr code generation for class property $derived (#10661)
2 years ago
Dominic Gannaway 99e1665ce1
feat: improve ssr html mismatch validation (#10658)
2 years ago
Simon H 6625c1e080
fix: warn when `$props` rune not called (#10655)
2 years ago
Simon H 749d3aa413
fix: add `$set` and `$on` methods in legacy compat mode (#10642)
2 years ago
Dominic Gannaway a4a789db4d
fix: improve ssr output of dynamic textarea elements (#10638)
2 years ago
Ahmad ee4b1f2c75
fix test (#10634)
2 years ago
Dominic Gannaway f658ca0d54
feat: add reactive Date object to svelte/reactivity (#10622)
2 years ago
Dominic Gannaway b4a70ea38a
fix: improve event delegation with shadowed bindings (#10620)
2 years ago
Dominic Gannaway 2de741219f
fix: correctly handle proxied signal writes before reads (#10612)
2 years ago
Simon H 506196b72b
feat: allow dynamic `type` attribute with `bind:value` (#10608)
2 years ago
Simon H db0b802fc2
fix: use safe-equals comparison for `@const` tags in legacy mode (#10606)
2 years ago
Dominic Gannaway c10337cfb2
fix: improve proxy effect dependency tracking (#10605)
2 years ago
Rich Harris 6afaf75a37
fix: synchronise element bindings (#10512)
2 years ago
Simon H a2164ff9f4
fix: make `bind_this` implementation more robust (#10598)
2 years ago
Dominic Gannaway ec52c75cc4
fix: permit whitespace within template scripts (#10591)
2 years ago
Dominic Gannaway a2fbef2050
fix: improve import event handler support (#10592)
2 years ago
Simon H 66b624491e
fix: allow boolean `contenteditable` attribute (#10590)
2 years ago
Dominic Gannaway 58008479fc
fix: improve $inspect handling of derived objects (#10584)
2 years ago
Rich Harris 29890bb616
chore: move signal logic into subdirectory (#10582)
2 years ago
Rich Harris ddb968cc35
fix: ensure proxy owner set always has 1 or more members (#10577)
2 years ago
Ahmad d6e0fbd8ba
fix: handle member expressions in directives (#10576)
2 years ago
Dominic Gannaway 802bfcabec
fix: improve props spreading logic (#10574)
2 years ago
Rich Harris 96eae28ed2
fix: remove memory leak, make `beforeUpdate` etc work correctly (#10570)
2 years ago
Rich Harris 8613a6f28a
fix: stack-trace-based readonly validation (#10464)
2 years ago
Rich Harris 02c6176622
feat: allow state/derived/props to be explicitly exported from components (#10523)
2 years ago
Dominic Gannaway bcb1b8eb98
fix: improve handling of unowned derived signals (#10565)
2 years ago
Dominic Gannaway 0afb8d489e
fix: improve state store mutation compiler output (#10561)
2 years ago
Dominic Gannaway 5698fb789c
fix: better handling of derived signals that have no dependencies (#10558)
2 years ago
Simon H aef245364c
fix: only escape characters in SSR template (#10555)
2 years ago
Simon H 08978bfae8
fix: don't execute scripts inside `@html` when instantiated on the client (#10556)
2 years ago
Simon H b80d9bd654
fix: wire up `events` in `mount` correctly and fix its types (#10553)
2 years ago
Simon H f5102013af
fix: better interop of `$state` with actions/`$:` statements (#10543)
2 years ago
Dominic Gannaway 7032837ef0
fix: better handling of empty text node hydration (#10545)
2 years ago
Dominic Gannaway 71db9edcdc
fix: improve each block item equality for immutable mode (#10537)
2 years ago
Rich Harris 151cdeacaf
simplify test (#10538)
2 years ago
Dominic Gannaway 41cdbafc40
fix: improve effect over-fire on store subscription init (#10535)
2 years ago
Rich Harris 8feb86583a
fix: use init properties when exporting non-state values (#10521)
2 years ago
Ahmad 06e1d86091
fix: visit expression node in directives (#10527)
2 years ago
Rich Harris 4d8d2928d8
chore: ignore test directories left over from other branches (#10525)
2 years ago
Rich Harris 3da6cef29b
chore: improve code generation for `bind:this` in SSR mode (#10524)
2 years ago
Simon H 2755401034
breaking: remove `createRoot`, adjust `mount`/`hydrate` APIs, introduce `unmount` (#10516)
2 years ago
Rich Harris 5605e8cf49
feat: implement support for `:is(...)` and `:where(...)` (#10490)
2 years ago
Dominic Gannaway df10204fcc
fix: improve bind:this support for each blocks (#10510)
2 years ago
Simon H 71601ba2e5
fix: warn against accidental global event referenced (#10442)
2 years ago
Rich Harris a2014809ec
chore: tidy up post-#10481 (#10503)
2 years ago
Simon H ba0bdc7aa1
chore: document and test signals edge case (#10228)
2 years ago
Ahmad 3f75ea64ca
fix: allow stores in `transition`,`animation`,`use` directives (#10481)
2 years ago
Rich Harris cec3540ac2
chore: use zimmerframe for CSS analysis/transformation (#10482)
2 years ago
Simon H f8ff2b6ea3
chore: source maps for preprocessors + tests (#10459)
2 years ago
Dominic Gannaway 4b274dd00d
feat: derive destructured derived objects values (#10488)
2 years ago
Dominic Gannaway cc273f7d53
fix: prevent infinite loop when writing to store using shorthand (#10477)
2 years ago
Rich Harris 87d4b12620
chore: tidy up CSS stuff (#10478)
2 years ago
Dominic Gannaway 74742d9233
fix: improve global transition outro handling (#10474)
2 years ago
Rich Harris d41d0c26ad
chore: rename `$derived.call` to `$derived.by` (#10445)
2 years ago
Dominic Gannaway 667ffb7a39
fix: improve global transition handling of effect cleardown (#10469)
2 years ago
Simon H 1a721e5916
fix: only throw bind error when not passing a value (#10090)
2 years ago
Dominic Gannaway 9161448ee5
fix: improve handling of object property deletions (#10456)
2 years ago
Dominic Gannaway 1366932dc0
cleanup a bunch of internal runtime logic (#10446)
2 years ago
Rich Harris 999fca97cf
fix: use hybrid scoping strategy for consistent specificity increase (#10443)
2 years ago
Simon H 5dd9951cb6
fix: handle sole empty expression tags (#10433)
2 years ago
Simon H 456cf843d2
fix: throw validation error when binding to each argument in runes mode (#10441)
2 years ago
Ahmad 49bfb6b1d6
fix: improve animation name transformation (#10432)
2 years ago
Dominic Gannaway 4fcd1cb1ed
fix: add compiler error for each block mutations in runes mode (#10428)
2 years ago
Simon H dab0a43693
fix: stricter validation for component exports (#10430)
2 years ago
Dominic Gannaway 0e011add4e
fix: improve indexed each array reconcilation (#10422)
2 years ago
Rich Harris 623340a1de
fix: make beforeUpdate/afterUpdate behave more like Svelte 4 (#10408)
2 years ago
Ahmad 89c4cf393f
fix: set `open` binding value in `<details>` (#10413)
2 years ago
Dominic Gannaway f9f5d3a1be
fix: only update lazy properties that have actually changed (#10415)
2 years ago
Simon H 9aa0ed3eb6
fix: handle nested script tags (#10416)
2 years ago
Rich Harris 90f8b63bee
fix: run `onDestroy` cleanup during SSR (#10297)
2 years ago
Simon H 268ac95fde
fix: properly analyze group expressions (#10410)
2 years ago
Daniel Imfeld 255693e78f
fix: correctly determine binding scope of `let:` directives (#10395)
2 years ago
Daniel Imfeld 97d3ec2f89
fix: allow `let:` directives on slot elements (#10391)
2 years ago
Simon H b6fcc149b8
fix: repair each block length mismatches during hydration (#10398)
2 years ago
Simon H bd0ebf3b81
fix: correctly determine `bind:group` members (#10368)
2 years ago
Simon H e75c9acd18
fix: don't reuse proxies when state symbol refers to stale value (#10343)
2 years ago
gtmnayan bce4f3f01c
fix: strip typescript assertions before analysis (#10329)
2 years ago
Rich Harris 36fc203eec
fix: correctly update tweened store initialized with nullish value (#10356)
2 years ago
Rich Harris a53b44338e
add missing motion tests (#10355)
2 years ago
Rich Harris 0aedab8d5e
fix: insert empty text nodes during hydration, where necessary (#9729)
2 years ago
Simon Holthausen 396bab3628 chore: fix version replacement regex in test
2 years ago
S. Elliott Johnson d309a9d47a
feat: Variadic snippets (#9988)
2 years ago
Dominic Gannaway 23b38a3471
fix: improve handling of unowned derived signals (#10342)
2 years ago
Dominic Gannaway 4d0d0a3a9d
fix: correctly reference destructured derived binding in event handler (#10333)
2 years ago
Karol 77b4c4be6c
fix: create `<svelte:element>` instances with the correct namespace (#10006)
2 years ago
Dominic Gannaway d9a6b8b17a
chore: add $derived.call rune (#10240)
2 years ago
Simon H 76a4bbd5ec
fix: handle event delegation correctly when having sibling event listeners (#10307)
2 years ago
Rogério Luiz Aques de Amorim a58d93f8bf
fix: parser error when using semicolon inside quotes in style (#10221)
2 years ago
Simon H 005ff894ff
fix: prevent false positive store error in module script (#10291)
2 years ago
Simon H 107ec1c848
fix: handle deep assignments to `$state()` class properties correctly (#10289)
2 years ago
Simon H c8da99646a
fix: `:global()` compound selector validation tweak (#10287)
2 years ago
Dominic Gannaway fb61f4eb70
fix: correctly cleanup unowned derived dependency memory (#10280)
2 years ago
Simon Holthausen 1538264bd5 fix: don't hoist function when already referenced in module scope
2 years ago
Dominic Gannaway a476e81e63
chore: improve $state static reference warning heuristics (#10275)
2 years ago
Simon H 14bf4b4b2c
fix: ensure proxy is updated before notifying listeners (#10267)
2 years ago
Simon H 036e88f1f7
fix: allow `:global(..)` in compound selectors (#10266)
2 years ago
Simon H 6b0bd8b23a
fix: hydrate controlled each blocks correctly (#10259)
2 years ago
Simon H 434a58711f
fix: sanitize component event names (#10235)
2 years ago
Dominic Gannaway 83628c901d
fix main (#10237)
2 years ago
Simon Holthausen 776ac3c176 fix: add back `derived` type overload
2 years ago
Simon Holthausen a6797614ef fix: clarify error message
2 years ago
gtmnayan 0071e0252a
fix: allow ts casts in bindings (#10181)
2 years ago
Simon Holthausen 2861ad66e0 fix: correct increment/decrement code generation
2 years ago
Simon H 61118835db
chore: bit of code cleanup (#10218)
2 years ago
Simon H 9f87f059d2
fix: skip certain slot validations for custom elements (#10207)
2 years ago
Dominic Gannaway 2b2bd06d6f
fix: ensure derived signals properly capture consumers (#10213)
2 years ago
Simon Holthausen 1798e58300 chore: fix signals test suite
2 years ago
Dominic Gannaway c7a7725abd
fix: add compiler error for invalid <p> contents (#10201)
2 years ago
Dominic Gannaway b04c5bb398
fix: improve invalid nested interactive element error (#10199)
2 years ago
Simon H db8cba3216
fix: react to mutated slot props in legacy mode (#10197)
2 years ago
Dominic Gannaway b94d72bbfb
fix: improve transition outro easing (#10190)
2 years ago
Simon H 1b675c0264
fix: transform textarea and contenteditable binding expressions (#10187)
2 years ago
Simon H b3ba25da94
fix: simplify event delegation logic (#10169)
2 years ago
Dominic Gannaway c628904861
fix: ensure topological order for render effects (#10175)
2 years ago
Dominic Gannaway 05bd922f7f
fix: improve nested effect heuristics (#10171)
2 years ago
Dominic Gannaway 0eca0ace94
fix: improve event handling compatibility with delegation (#10168)
2 years ago
Dominic Gannaway a26012fc62
fix: prevent transition action overfiring (#10163)
2 years ago
Ben McCann aecd47e8df
chore: upgrade prettier to 3.1 (#10134)
2 years ago
Dominic Gannaway ef3e0721fc
fix: improve intro transitions on dynamic mount (#10162)
2 years ago
Dominic Gannaway ab13356008
fix: improve code generation (#10156)
2 years ago
Dominic Gannaway ff8dff993d
fix: improve ssr template code generation (#10151)
2 years ago
Dominic Gannaway e2fc04d0d5
fix: improve template literal expression output generation (#10147)
2 years ago
Dominic Gannaway 08579461b1
fix: improve animation heuristics (#10119)
2 years ago
Simon Holthausen f3265c580c chore: better test case
2 years ago
Simon Holthausen dda4ad510f fix: silence false positive state warning
2 years ago
Simon H aa5a62396a
fix: legacy reactive dependencies tweak (#10128)
2 years ago
Dominic Gannaway 901cfc9f15
fix: improve ssr template literal generation (#10127)
2 years ago
navorite cd2263fdab
fix: infer `svg` namespace correctly (#10027)
2 years ago
Dominic Gannaway f5dc562ee7
fix: ensure nested blocks are inert during outro transitions (#10126)
2 years ago
Simon H 3624a4c2a0
feat: allow modifiying derived props (#10080)
2 years ago
Nguyen Tran 1ff9c0f2b9
fix: support destructurings containing await (#9962)
2 years ago
Dominic Gannaway d16f17c306
fix: improve signal consumer tracking behavior (#10121)
2 years ago
Simon H 527d099a09
fix: transform `{@render ...}` expression (#10116)
2 years ago
Dominic Gannaway 05789daff9
fix: allow transition undefined payload + microtask queue handling (#10117)
2 years ago
Simon H b3d185da29
fix: correctly call exported state (#10114)
2 years ago
Simon H 92408e1506
fix: get spread + bind working (#10091)
2 years ago
Dominic Gannaway ebbb5dd655
fix: improve internal signal dependency checking logic (#10111)
2 years ago
Dominic Gannaway ddd7926240
fix: improve key block reactivity detection (#10092)
2 years ago
Dominic Gannaway 94aab90bd1
fix: improve text node output (#10081)
2 years ago
navorite 3c6977add3
fix: improve style parser whitespace handling (#10077)
2 years ago
Simon H 570884eabd
fix: spread attributes reactivity improvements (#10071)
2 years ago
Simon H 2133d7d67a
fix: support TS satisfies operator (#10068)
2 years ago
Simon H 15d6308d60
fix: catch delegated events from elements moved outside the container (#10060)
2 years ago
Simon H 8a8505928e
fix: deeply unstate objects passed to inspect (#10056)
2 years ago
Simon H e46a71e8a3
fix: handle pseudo class elements with content (#10055)
2 years ago
navorite 6d65b2f8ad
fix: improve parsing of `:nth-of-type(xn+b)` (#9970)
2 years ago
Dominic Gannaway 1e33ed5bb9
fix: ensure if block is executed in correct order (#10053)
2 years ago
navorite d56223b162
fix: improve script `lang` attribute detection (#10046)
2 years ago
Jeremy Deutsch 346041f454
chore: skip generating $.proxy() calls for more expressions (#9979)
2 years ago
Rich Harris 2ad5e53d53
remove unnecessary test (#10008)
2 years ago
Holger Dal Mogensen 8a013c4cc6
fix: transition parameters are not reactive (#9836)
2 years ago
Tom c0a357c262
fix: support hydrating around `<noscript>` (#9953)
2 years ago
Nguyen Tran bd34367660
fix: Add some tests to avoid regression on #8559 (#9956)
2 years ago
Nguyen Tran b31946eb08
fix: Backtick now displays with templates (#9973)
2 years ago
Nguyen Tran 5dffe715d3
fix: issue with assiging prop values as defaults of other props (#9985)
2 years ago
Dominic Gannaway 75cd1e825c
feat: add $state.frozen rune (#9851)
2 years ago
Dominic Gannaway b8f3c49e5f
fix: improve event delegation handler hoisting (#9929)
2 years ago
Dominic Gannaway 59c7487f36
fix: better handle array property deletion reactivity (#9921)
2 years ago
Dominic Gannaway 2608e621d6
add test (#9917)
2 years ago
Dominic Gannaway b1efd8c4cd
fix: improve each block fallback handling (#9914)
2 years ago
Dominic Gannaway 3a4a09102c
fix: improve whitespace handling (#9912)
2 years ago
navorite 55656f520d
feat: add support for {@const} inside snippet block (#9904)
2 years ago
Dominic Gannaway b0511a5966
fix: improve attribute directive reactivity detection (#9907)
2 years ago
Dominic Gannaway 4e61db7201
chore: improve readonly prop messaging (#9901)
2 years ago
Dominic Gannaway a9a5b11c78
fix: improve props aliasing (#9900)
2 years ago
Dominic Gannaway 0236cf87e7
fix: better support for top-level snippet declarations (#9898)
2 years ago
Dominic Gannaway daa19173b1
fix: improve html tag svg behaviour (#9894)
2 years ago
Dominic Gannaway 2ca3c87d18
fix: correctly reflect readonly proxy marker (#9893)
2 years ago
Dominic Gannaway 7238e1d3ce
fix: improve each block index handling (#9889)
2 years ago
Dominic Gannaway bdd63c8187
fix: ensure class constructor values are proxied (#9888)
2 years ago
Dominic Gannaway 4717d2ad23
fix: handle event hoisting props referencing (#9846)
2 years ago
Dominic Gannaway fd78acfec9
fix: support dynamic transition functions (#9844)
2 years ago
Simon H df5105ef2e
breaking: change `$inspect` API (#9838)
2 years ago
Rich Harris 26c6d6f95d
chore: avoid creating unnecessary thunks (#9841)
2 years ago
Dominic Gannaway 08d93a2f5f
fix: improve each block with animate (#9839)
2 years ago
Dominic Gannaway 388e3e68fc
fix: improve signal consumer removal logic (#9837)
2 years ago
Dominic Gannaway e2dcdc2887
fix: ensure computed props are wrapped in derived (#9835)
2 years ago
Dominic Gannaway d9c250a4bf
fix: better handle unowned derived signals (#9832)
2 years ago
Rich Harris b20b4617c0
chore: rethink props (#9826)
2 years ago
Rich Harris 481df0e64a
fix: correctly apply scope on component children (#9824)
2 years ago
Rich Harris 5797bb34ce
fix: reuse proxy between objects (#9821)
2 years ago
Rich Harris c0150b0bd3
chore: tweak readonly error message (#9816)
2 years ago
Simon H 074615d7fd
fix: prevent infinite loops stemming from invalidation method (#9811)
2 years ago
Simon H 5667785903
fix: better readonly checks for proxies (#9808)
2 years ago
Dominic Gannaway d5167e75b9
fix: improve non state referenced warning (#9809)
2 years ago
Dominic Gannaway d793d570e2
fix: improve consistency issues around binding invalidation (#9810)
2 years ago
Rich Harris 01a2117330
chore: use proxy instead of signal in createRoot (#9799)
2 years ago
Simon H 3c2e656187
fix: tweak css nth regex (#9806)
2 years ago
Rich Harris 62c9292947
feat: make fallback prop values readonly (#9789)
2 years ago
Rich Harris bd8f7db754
check runtime errors (#9791)
2 years ago
Rich Harris 24777c335a
feat: disallow fallback values with bindings in runes mode (#9784)
2 years ago
Dominic Gannaway c7e626ebbb
feat: add unstate utility function (#9776)
2 years ago
Dominic Gannaway f1954d034b
fix: ensure proxied array length is updated (#9782)
2 years ago
Rich Harris 10aacfa603
chore: remove `exposable` (#9783)
2 years ago
Dominic Gannaway 25abca78b2
fix: ensure transitions properly cancel on completion (#9778)
2 years ago
Simon H ef158ff729
fix: apply event attribute validation to elements only (#9772)
2 years ago
Rich Harris ede5dab230
chore: fix compiler-errors test suite (#9754)
2 years ago
Rich Harris 75fc09a79e
Proxied state (#9739)
2 years ago
Dominic Gannaway f0c47c31bc
fix: allow duplicate snippet declaration names (#9759)
2 years ago
Dominic Gannaway ef5bcfe542
fix: ensure event handlers containing arguments are not hoisted (#9758)
2 years ago
Dominic Gannaway 2017af407d
fix: ensure computed props are cached with derived (#9757)
2 years ago
Simon H 402a322317
chore: more validation errors (#9723)
2 years ago
Rich Harris 765d01d76c
correctly inspect derived values (#9731)
2 years ago
Dominic Gannaway 2fa06447cf
fix: improve template text node serialization (#9722)
2 years ago
Dominic Gannaway 7eba35b9d1
fix: improve infinite loop capturing (#9721)
2 years ago
Simon H cb1ea1f2db
fix: ensure `$$slots` exists in runes mode (#9718)
2 years ago
Simon H 4a8f0bc7e7
fix: keep fallback value after spread update not setting that prop (#9717)
2 years ago