0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-22 03:47:27 +01:00
Commit Graph

72 Commits

Author SHA1 Message Date
Simon Holthausen
b8ea454372 chore: enter changeset prerelease mode 2023-11-10 15:56:52 +01:00
Simon Holthausen
fe8a9ce31d breaking: init Svelte 5
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Dominic Gannaway <dg@domgan.com>
2023-11-10 15:48:23 +01:00
github-actions[bot]
1369aa5cec
Version Packages (#9380)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-10 13:41:20 +01:00
Simon H
2a2a773174
chore: rewire some master occurences (#9379)
(main for a few in contributing; doesn't exist yet but will, soon)
2023-11-10 13:38:07 +01:00
Kelvin Soh
00700621bb
fix: html tag hydration: regard empty claimed_nodes array as content mismatch (#9184)
fixes #6832
2023-11-10 12:44:57 +01:00
Ben McCann
895612514c
fix: improve a11y-click-events-have-key-events message (#9358) 2023-10-30 09:43:24 -07:00
github-actions[bot]
590503044f
Version Packages (#9293)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-19 10:41:11 +02:00
Sina Salahshour
6b9b8af050
fix: ignore comments while comparing nodes in node_match (#9197)
related to issue #9088
it doesn't solve the main problem of dependencies getting invalidated whenever value of a variable gets changed.
but it fixes the behavior difference between the code with and without comments
2023-10-19 10:28:33 +02:00
vhladko
ab80d9d214
fix: add missing plaintext-only value to contenteditable type (#9242)
fixes #9181
2023-10-19 10:03:00 +02:00
Simon H
9900c85acf
fix: support camelCase properties on custom elements (#9328)
while attributes are case insensitive, properties are not. to not introduce a breaking change, the lowercased variant is checked first.
fixes #9325
2023-10-18 15:46:22 +02:00
Ben McCann
052d38158f
chore: upgrade magic-string (#9292) 2023-10-04 09:39:32 +02:00
github-actions[bot]
bd5e5eef9b
Version Packages (#9121)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-20 10:25:09 +02:00
gtmnayan
26eb2a2f89
fix: false reactive component warning (#9094)
fixes #9082
2023-09-20 10:04:16 +02:00
Teo
93b17c85f7
fix: spreading attributes on option value attribute get's replaced by option's inner text (#9125)
fixes #9107
Apart from the problem with the option the same happens with the textarea.
2023-09-20 10:02:38 +02:00
Teo
228dd4d9d7
fix: svelte:element with dynamic this and spread attributes throws error (#9112)
fixes #9092

---------

Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2023-09-20 10:02:18 +02:00
paulreece
6fe17eabf2
fix: This makes the indeterminate HTML attribute available for use. Fixes #9176. (#9180)
Fixes #9176. This adds indeterminate to the list of HTMLAttributes so that one can use it without receiving an error.
2023-09-20 09:50:10 +02:00
Kelvin Soh
d5a1822428
fix: style directive not updating when style attribute is present and style directive is updated via an object prop. fixes #9185 (#9187)
fixes #9185.

I narrowed down the issue to the bug surfacing when we use object properties to update style attributes and directives. This fix removes the size check (because a single object will be of size 1 but can affect n attributes/directives via its properties).

In addition, the order of the OR is switched as the earlier condition has some reactive assignments which are not run in the current order when style_changed_var is truthy.
2023-09-20 09:49:50 +02:00
gtmnayan
115ea1ff4a
fix: do not add module declared variables as dependencies (#9122)
closes #5943
2023-09-20 09:48:47 +02:00
gtmnayan
d5839ef194
fix: head duplication when binding is present (#9124)
fixes #7879
fixes #4982
2023-08-28 18:53:27 +02:00
Teo
bd64f07e98
fix: take custom attribute name into account when reflecting property (#9140)
fixes #9134
2023-08-24 16:17:39 +02:00
gtmnayan
ba1e67844e
fix: css sourcemap generation with unicode filenames (#9120)
* fix: css sourcemap generation with unicode filenames

* format
2023-08-20 12:34:32 +02:00
github-actions[bot]
50c270a54d
Version Packages (#9096)
---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2023-08-11 16:32:25 +02:00
Lyu, Wei-Da
05f99d20f9
feat: move svelteHTML to load the correct svelte/element (#9070)
Make IntrinsicElements extends SvelteHTMLElements
so it can be extend with declare module
converting to module so it can extend without needing another type alias

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2023-08-11 15:54:20 +02:00
github-actions[bot]
a08ae0f555
Version Packages (#9037)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-31 13:02:22 +02:00
hackape
99a3cc93b6
fix: allow child element with slot attribute within svelte:element (#9038)
fix #9018
2023-07-28 12:14:34 +02:00
Paolo Ricciuti
a71f3595a3
fix: Add data-* to svg attributes (#9036)
* Add data-* to svg attributes

* Create twelve-suits-drive.md
2023-07-24 14:26:06 +02:00
github-actions[bot]
6827709373
Version Packages (#9008)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-20 18:29:21 +02:00
hackape
a2b6401c43
fix: svelte:component spread props change not picked up (#9006)
fix #9003, amend #8946 (comment)
2023-07-20 15:55:22 +02:00
github-actions[bot]
5d66f96d01
Version Packages (#8928)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-19 15:55:43 +02:00
Nguyen Tran
f8283fbc77
fix: remove let variable from select binding dependencies (#8969)
Fixes #2943

The issue linked above invalidates a variable that is not defined in <script> but instead is defined as a let: variable, which does not make sense to invalidate, therefore, this PR exists.
2023-07-19 13:55:27 +02:00
Simon H
cb1358cc41
fix: don't add accessor twice (#8996)
In dev mode, Svelte creates a setter to throw an error noting that you can't set that readonly prop, which resulted in the accessor getting applied twice to the custom element wrapper, causing an error
fixes #8971
2023-07-19 09:39:45 +02:00
Simon H
657f11376c
feat: add ability to extend custom element class (#8991)
This should help everyone who has special needs and use cases around custom elements. Since Svelte components are wrapped and only run on connectedCallback, it makes sense to expose the custom element class for modification before that.
- fixes #8954 / closes #8955 - use extend to attach the function manually and save possible values to a prop
- closes #8473 / closes #4168 - use extend to set the proper static attribute and then call attachInternals in the constructor
- closes #8472 - use extend to attach anything custom you need
- closes #3091 - pass `this` to a prop of your choice and use it inside your component
- add some doc for #8987
2023-07-18 18:21:19 +02:00
Ben McCann
4bbb5454e2
perf: optimize imports that are not mutated or reassigned (#8948)
this means such imports are seen as static and subsequently Svelte needs to generate way less code
2023-07-18 17:36:36 +02:00
gtmnayan
20dac2ae12
fix: handle patterns in destructured literals (#8871)
fixes #8863

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2023-07-11 18:02:46 +02:00
Nguyen Tran
66593c62f4
fix: svelte:component evaluates props once (#8946)
Fixes #6634
2023-07-10 17:55:58 +02:00
github-actions[bot]
3ff0084dc3
Version Packages (#8925)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-06 18:14:27 +02:00
Lyu, Wei-Da
0a2732a2b0
fix: generate type definition with nullable types (#8924)
This results in `undefined` and `null` being added explicitly in places which is crucial in some situations
2023-07-06 11:38:24 +02:00
github-actions[bot]
a12643cbb8
Version Packages (#8911)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-04 22:43:20 +02:00
Simon H
136aebd8eb
fix: repair invalid raw html content during hydration (#8912)
When the HTML that is coming from raw html is invalid, the browser reshuffles things. Bail in that case to try to repair more often. Should help with https://github.com/withastro/astro/issues/7557
2023-07-04 22:41:51 +02:00
Simon H
35221c8811
fix: claim svg tags in raw mustache tags correctly (#8910)
fixes #8904
2023-07-04 21:46:53 +02:00
github-actions[bot]
800f6c076b
Version Packages (#8902)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-03 22:52:08 +02:00
Simon H
8de9dc6144
fix: handle falsy srcset values (#8901)
fixes #8899
2023-07-03 22:50:23 +02:00
github-actions[bot]
ae752c9693
Version Packages (#8877)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-03 15:17:44 +02:00
Simon H
0aa03df086
fix: reflect all custom element prop updates back to attribute (#8898)
fixes #8879
2023-07-03 15:16:13 +02:00
Simon H
4b3eb72346
fix: shrink custom element baseline a bit (#8858)
- use shorter class property names as they are not minified
- reuse some dom helper methods

#8826
2023-07-03 14:45:13 +02:00
Simon H
d2ff04f9fe
fix: use non-destructive hydration for all @html tags (#8880)
html tags that could be optimized to use innerHTML in mount ignored any hydration code, which leads to everything getting unmounted and mounted again. This takes the non-optimized path for hydration, too.

fixes https://github.com/sveltejs/kit/issues/10245
2023-07-03 14:22:00 +02:00
Simon H
1a3e50b6b7
fix: check srcset when hydrating to prevent needless requests (#8868)
---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2023-06-30 10:57:40 +02:00
L
270cfce065
chore: adding default for disclose version (#8874) 2023-06-29 11:42:00 +02:00
github-actions[bot]
90860550ae
Version Packages (#8855)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-29 09:35:31 +02:00
Simon H
b0a3fa1766
fix: ensure createEventDispatcher and ActionReturn work with generic function types (#8872)
fixes #8860

This contains a small but unfortunately unavoidable breaking change: If you used `never` to type that the second parameter of `createEventDispatcher` shouldn't be set or that the action accepts no parameters (which the docs recommended for a short time), then you need to change that to `null` and `undefined` respectively
2023-06-28 23:56:40 +02:00