Rich Harris
bfa0b34663
add self-closing-tags info ( #14758 )
...
* add self-closing-tags info
* regenerate
7 days ago
joakim
d7e4bd2c66
Link to migration guide from <svelte:component> documentation ( #14737 )
1 week ago
Dominic Gannaway
5483495c8d
feat: add $inspect.trace rune ( #14290 )
...
* feat: add $trace rune
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
WIP
* lint
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* more tweaks
* lint
* improve label for derived cached
* improve label for derived cached
* lint
* better stacks
* complete redesign
* fixes
* dead code
* dead code
* improve change detection
* rename rune
* lint
* lint
* fix bug
* tweaks
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dev/tracing.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* todos
* add test + some docs
* changeset
* update messages
* address feedback
* address feedback
* limit to first statement of function
* remove unreachable trace_rune_duplicate error
* tweak message
* remove the expression statement, not the expression
* revert
* make label optional
* relax restriction on label - no longer necessary with new design
* update errors
* newline
* tweak
* add some docs
* fix playground
* fix playground
* tweak message when function runs outside an effect
* unused
* tweak
* handle async functions
* fail on generators
* regenerate, update docs
* better labelling
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 week ago
Rich Harris
b0e3c5b438
feat: add outro option to unmount ( #14540 )
...
* feat: add outro option to unmount
* unused
* regenerate
* revert
* changeset
* create separate component_root effect
* docs
* return a promise
* remove from map immediately
2 weeks ago
waedi
65db409860
docs: typo in ## script_context_deprecated ( #14694 )
...
* Fix typo in ## script_context_deprecated
Changed +++context+++ to +++module+++
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 weeks ago
James Glenn
432db95358
docs: Update the linked playgrounds in the snippet docs ( #14676 )
...
* Update the linked playgrounds in the snippet docs
* Apply suggestions from code review
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
2 weeks ago
Simon H
68d266e0f8
fix: remove overzealous `reactive_declaration_non_reactive_property` warning ( #14663 )
...
fixes #14532
This removes the `reactive_declaration_non_reactive_property` warning altogether. The first version caused many false positives at compile time. The refined runtime version (introduced in #14192 ) was hoped to fix this, but it turns out we now get loads of false positives at runtime.
2 weeks ago
Rich Harris
d43a10ba7a
feat: add `svelte/reactivity/window` module ( #14660 )
...
* feat: add `svelte/reactivity/window` module
* lint
* fix
* hide private types
* online binding
* tweak docs
* tweak
* add @since tags
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2 weeks ago
Rich Harris
3dcd5a4a3e
fix docs ( #14635 )
2 weeks ago
Simon H
c6fca02009
docs: more details for errors/warnings on the site ( #14632 )
...
* docs: more details for errors/warnings on the site
Related to #11305
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix in correct place
* tab not spaces
* tweaks
* fix
* Apply suggestions from code review
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 weeks ago
Rich Harris
c1c59e77a5
docs: where the hell did this come from? ( #14613 )
2 weeks ago
Dominic Gannaway
5771b455c0
feat: add support for bind getter/setters ( #14307 )
...
* feat: add support for bind getters/setters
* different direction
* oops
* oops
* build
* add changeset and tests
* move validation
* add comment
* build
* bind:group error
* simpler to just keep it as a SequenceExpression
* fix
* lint
* fix
* move validation to visitor
* fix
* no longer needed
* fix
* parser changes are no longer needed
* simplify
* simplify
* update messages
* docs
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2 weeks ago
brunnerh
ad87572adc
docs: Import .svelte.js files with explicit extension. ( #14584 )
3 weeks ago
Simon H
1ffce92d90
docs: note before/afterUpdate breaking change ( #14567 )
...
...about slotted content behavior
Related to #14564
3 weeks ago
Ben McCann
4b802dbed3
docs: add a mobile app FAQ ( #14559 )
...
* docs: add a mobile app FAQ
* Update 99-faq.md
3 weeks ago
Rich Harris
350811ed8c
docs: note when defaultValue support was added ( #14553 )
3 weeks ago
Simon H
a57e747cbb
feat: default values for form elements ( #14289 )
...
* tests
* typings
* implement for defaultValue/defaultChecked on inputs
* docs (draft)
* selected
* fix test
* remove
* tweak
* changeset
* untrack reads, they could be inside an effect
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* handle select reset case
* handle reset case specifically: use different props/queries in that case
* enhance test
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
Simon H
86ae349bcc
fix: better error messages for invalid HTML trees ( #14445 )
...
* fix: better error messages for invalid HTML trees
closes #13331
* fix test
* more concise
* tweak
* tweak messages
* adjust tests
* tweak message slightly, so it doesn't sound like the bad element is the one we're currently encountering
* put locations in generated message
* tidy up
* consistency
* fix
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
Rich Harris
348185794d
docs: tweak slot docs ( #14543 )
3 weeks ago
Rich Harris
4c4f18b24c
chore: fix docs ( #14538 )
3 weeks ago
Rich Harris
fe0bd299a5
fix: proxify values when assigning using `||=`, `&&=` and `??=` operators ( #14273 )
...
* add failing test for #14268
* simplify
* proxify values when using ||=, &&= and ??= assignment operators
* proxify values assigned to private state fields
* changeset
* fix
* fix
* add warning
* update test
3 weeks ago
Paolo Ricciuti
d5a28a01a1
docs: fix typo in `$state` ( #14535 )
3 weeks ago
Rich Harris
a5de086f95
feat: turn `reactive_declaration_non_reactive_property` into a runtime warning ( #14192 )
...
* turn `reactive_declaration_non_reactive_property` into a runtime warning
* ignore warning
* Update packages/svelte/src/internal/client/reactivity/effects.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix
* test
* changeset
* Update .changeset/witty-turtles-bake.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* add some details
* check
* regenerate
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 weeks ago
Rich Harris
87863da6ff
docs: how to javascript ( #14528 )
3 weeks ago
Rich Harris
8ad9295535
docs: hints on preserving reactivity ( #14514 )
3 weeks ago
Simon H
3d36e15ddd
docs: add tsconfig.json info to TS docs ( #14519 )
...
Also fix adjacent code examples
closes #14187
3 weeks ago
Rich Harris
7142fa0b5c
docs: note requirement on 5.5.0 to export snippets ( #14523 )
3 weeks ago
Dominic Gannaway
4d2f2fb8e6
feat: allow snippets to be exported from module scripts ( #14315 )
...
* feat: allow snippets to be exported from module scripts
* tweak type
* fix issue + add test
* refactor
* refactor
* fix exports error
* fix lint
* fix lint
* error on undefined export
* hoisted snippets belong in transform state, not analysis
* put the code where it's used
* drop the local_. just binding. it's cleaner
* simplify
* simplify
* simplify
* simplify
* tidy up
* oops
* update message, add some details
* lint
* Apply suggestions from code review
* add some docs
* Update packages/svelte/src/compiler/phases/3-transform/utils.js
* Update .changeset/famous-parents-turn.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 weeks ago
SukeshP1995
abb90d8737
docs: fix grammatical error ( #14500 )
...
a instead of an before failed
3 weeks ago
Simon H
a283083751
feat: each without as ( #14396 )
...
* feat: each without as
WIP
closes #8348
* properly
* docs
* changeset
* real world demo
* simplify
* typo
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
Rich Harris
9fcfd7f0d1
docs: note when boundaries were added ( #14487 )
3 weeks ago
Dominic Gannaway
ed7ebcde1e
feat: add error boundaries ( #14211 )
...
* feat: add error boundary support
tweak
tweak again
retry -> reset
tweaks
add tests
tweaks
tweaks
tweaks
more tests
more tests and tweaks
comments
tweak
tweak
tweak
tweak
tweak
* tweak
tweak
tweak
tweak
more fixes
tweak
tweak
more fixes
changeset
* Update packages/svelte/elements.d.ts
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update .changeset/polite-peaches-do.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix issue with rethrowing
* handle fallback error
* handle fallback error
* add more test coverage
* more tests
* more bug fixes
* guard against non-errors
* add component_stack to error
* alternative approach
* remove spread support
* lint
* add to legacy ast
* add to svelte-html
* disallow anything but attributes on the boundary element
* fix error
* more validation
* only create block when necessary
* swap argument order - results in nicer-looking code in many cases
* Update .changeset/polite-peaches-do.md
* simplify a bit
* simplify
* move declaration closer to usage
* push once
* unused
* tweaks
* consistent naming
* simplify
* add a couple newlines
* tweak comments
* simplify
* newlines
* placeholder documentation
* add some docs
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix type
* fix link
* explain what happens if onerror throws
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
Rob B
97185eb3d5
docs Update 03-typescript.md ( #14382 )
...
* Update 03-typescript.md
Fix TS error: Cannot invoke an object which is possibly 'undefined'.
* Update 03-typescript.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 month ago
Gwen Le Bihan
24ebbcbbc1
docs: use e.detail instead of e.details in migration examples ( #14340 )
1 month ago
Simon H
6373641045
docs: add example to "state instead of stores" ( #14310 )
...
closes #13879
1 month ago
Dominic Gannaway
7fd3774015
fix: disallow invalid attributes for `<svelte:window>` and `<svelte:document>` ( #14228 )
1 month ago
Hosam Sultan
1e5a385c96
docs: fix typo ( #14232 )
2 months ago
CJSnyman
6534742ae1
docs: fix grammar ( #14244 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2 months ago
Rich Harris
5ce1159ec3
Update 03-typescript.md ( #14197 )
2 months ago
Scott
26d109cb11
docs: `SvelteHTMLElements` can be used for creating component wrapper ( #14162 )
2 months ago
Pig Fang
3d67cd53db
docs: fix migration guide typo ( #14155 )
2 months ago
Christoph Sanz
87d83ffa39
Add same note as in tutorial to doc. ( #14136 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 months ago
Simon H
8731f4f780
docs: note what the value of `this` can be on `svelte:element` ( #14117 )
...
closes #7575
2 months ago
Simon H
a952860232
docs: more docs on TS types ( #14065 )
...
* docs: more docs on TS types
and a few related changes/enhancements
closes #13940
* Apply suggestions from code review
* adjust
* Apply suggestions from code review
* Update documentation/docs/07-misc/03-typescript.md
* Update documentation/docs/07-misc/03-typescript.md
* Update documentation/docs/07-misc/03-typescript.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 months ago
Tim Deschryver
8d0937a534
docs: fix compilation error ( #14121 )
2 months ago
Ahmad S.
304d88edd0
docs: fix `$effect` section examples ( #13911 )
...
closes #13912
2 months ago
Rich Harris
96c299afc6
differentiate between 'effect' and `$effect` ( #14105 )
2 months ago
Rich Harris
82b87b361e
docs: fix syntax error ( #14106 )
2 months ago
Simon H
aac4cbd1f1
docs: note browser condition earlier ( #14096 )
...
* docs: note browser condition earlier
The browser condition is also necessary to test runes, so it makes sense to add it to the first occurence to the vite config. Also add a note about more fine-grained alias conditions.
Closes #13961
* Update documentation/docs/07-misc/02-testing.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 months ago
Conduitry
535ea44b9d
chore: replace non-breaking spaces ( #14098 )
...
* replace nbsp in docs
* replace nbsp in test
* replace nbsp in types
* regenerate types
2 months ago