New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Update 06-component-directives.md on:event clarification #10087
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* enable dev mode for preview repl * format * also add dev mode toggle for compiler options * whoops
…veltejs#9413) I came to the conclusion that when we're making up arbitrary types, we might as well keep the old class. That way: - one less thing to worry about (language tools and other tooling basically can continue to spit out SvelteComponent ) - we can more clearly mark $set , the constructor etc as being deprecated and no longer functioning unless you use that legacy compatibility mode - much more ergonomic to type for the user: - const someInstance: SvelteComponent<..> instead of const someInstance: ReturnType<typeof Component<..>> - If you're using generics, you can do export class MyComponent<T> extends SvelteComponent<{ prop: T }> {} instead of having to type out the whole function in a way that I'm not even sure how to do with generics
* chore: add missing svelte/transition functions * lint
* fix: correctly handle index within each block updates * changeset
* Split $.each into $.each_keyed/$.each_indexed * Add changeset * Update .changeset/quiet-camels-mate.md * Fix typo --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Fix runtime effect issues * Prettier * Add changeset * Fix operations * Update .changeset/khaki-mails-draw.md * more tweaks * more tweaks --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* chore: remove selector api
* fix tsconfig.json * prettier * another apparently-necessary fix --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
* skip svelte.dev deploy. this may or may not work * try this --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Version Packages (next) * Update packages/svelte/CHANGELOG.md --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
no two-way binding because setting it involves a `DataTransfer` workaround, so it's not really officially supported that way - if you need that, you shouldn't use that binding probably. This matches the behavior in Svelte 4. Co-authored-by: Rich Harris <rich.harris@vercel.com>
* chore: use internal get_descriptors helper * tweak changeset * fix bad merge --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
The modern one
…#9443) Fixes sveltejs#9403. We weren't taking into account the containment of call expressions logic before.
Fixes sveltejs#9408. Ensures that if we have a key that matches the index, that we fallback to using an indexed each block.
- add event delegation to spread_attributes - add event attributes to spread - don't delegate when bindings/actions on the same element in order to preserve backwards compatibility of ordering - don't hoist identifiers when one of them is used in an event that is not delegateable --------- Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
* fix: allow svelte:self in snippets * Create funny-wombats-argue.md
* rename file * add snippet docs * add note on deprecation * they're not attributes * event docs * prettier * remove unnecessary div * Apply suggestions from code review Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> * make example less confusing * note breaking props.children change --------- Co-authored-by: Rich Harris <rich.harris@vercel.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* update docs * Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md * Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> Co-authored-by: Rich Harris <hello@rich-harris.dev>
…ejs#9456) * only escape attribute values for elements, not components - closes sveltejs#9454 * changeset --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
…#9457) Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix: address bug in before/after update fix: address bug in before/after update * Add changeset * use every instead of filter - more explicit and enables early-exit from the loop * Update logic and comment --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
* chore: make DOM operations lazyily init * cleanup types * cleanup types * cleanup types * Update packages/svelte/src/internal/client/operations.js Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> * single line annotations * remove unnecessary coercion * group statements by type --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Rich Harris <rich.harris@vercel.com>
* move snapshot test to a runtime test * handle dynamic cases * huh --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
* test: add tests of transitions in new runtime * fix: move evaluation of props * format * add changeset
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* sveltejs#9985, but simpler * oops --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Version Packages (next) * Apply suggestions from code review --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
"Declare" should be "Declared" (past tense)
…#9979) * chore: skip emitting $.proxy() calls for more expressions * Update pretty-ties-help.md --------- Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>
closes sveltejs#10036, this also moves the HTMLDetailsElement toggle event to its interface as it was conflicting with HTMLElement popover toggle event. --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
To ensure that changes to code/types doesn't result in unwanted changes in type generation, or that bumps to dts-buddy don't cause unwanted regressions, we're checking in the generated types. Types should be committed as-is (don't format it with prettier!). CI is enhanced to check that git sees no changed files after generating the types, which would mean types have changed.
* fix: ensure if block is executed in correct order * alternative approach * improve algo * optimize * lint
closes sveltejs#9969 this also fixes the following along the way: the + in nth-of-type(+xn-b) would be parsed as a combinator. invalid cases like these are not allowed anymore: b(+/-)b -ax -ax-b -b
closes sveltejs#9398 (the other things in that issue are already addressed) closes sveltejs#10019
When doing `$inspect({ x, y })`, both `x` and `y` are now unstated if they are signals, compared to before where `unstate` was only called on the top level object, leaving the proxies in place which results in a worse debugging experience. Also improved typings which makes it easier to find related code paths.
* fix: bail-out event handler referencing each index * lint * ts * types
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- the objects could contain getters with reactive values, so we play it safe and assume they're always reactive - fixes sveltejs#10065 - isolate spreads with call expression similar to how we do it with other effects -fixes sveltejs#10013
allow whitespace, allow comments fixes sveltejs#10073
* fix: improve text node output * revert
later examples changed to handle the `hello` and `click` events dispatched/forwarded by earlier examples added note about only events forwarded by direct children can be listened to
🦋 Changeset detectedLatest commit: 03f17d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@cloudymeatball is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please close / discard this in favour of #10088
Svelte 5 rewrite
Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint