Simon H
7ecc6c076c
docs: fix code example ( #13810 )
...
backporting from https://github.com/sveltejs/svelte.dev/pull/546
11 months ago
Jayden W
d16a9da153
docs: fix TODO to add link to tutorial in migration guide ( #13796 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
11 months ago
brunnerh
708fd9c4be
docs: fix various typos ( #13801 )
11 months ago
brunnerh
779b730a80
docs: fix typos in createEventDispatcher migration rationale ( #13800 )
11 months ago
wackbyte
0fd1a45131
docs: fix generic props type ( #13792 )
11 months ago
Conduitry
dbba2b0d27
docs: fix demo links to playground ( #13788 )
11 months ago
Dmytro Cheglakov
be131575d8
docs: fix typo in the snippet closing tag ( #13782 )
11 months ago
Rich Harris
e7d181ddb3
make links internal ( #13789 )
11 months ago
Rich Harris
4f6bb41030
More docs stuff ( #13769 )
...
* fix
* link
* more docs stuff
* more
* more
* fix
* more
* more
* fix
* fix
* more
* ffs
* FML
11 months ago
Simon H
4c7cfff434
docs: legacy docs ( #13756 )
...
* docs: legacy docs
add docs on old syntax
* rename section
* tweaks
* tweak
* tweaks
* tweaks
* tweaks
* fix link
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
Paolo Ricciuti
8ff2af52d3
fix: show filename information in `legacy_recursive_reactive_block` ( #13764 )
11 months ago
brunnerh
ef205d960e
docs: fix typos ( #13752 )
...
- remove copy pasted argument from $set
- fix typo
11 months ago
Rich Harris
fd78385447
chore: restructure docs for new site ( #13699 )
11 months ago
Ahmad S.
618d89c368
docs: replace `<div>` with `<svelte-css-wrapper>` for style props ( #13706 )
11 months ago
Dominic Gannaway
ae10f4d37c
breaking: state mutations inside the template are no longer allowed ( #13660 )
...
* breaking: state mutations inside the template are no longer allowed
* fix test
* fix test
* lint
* update error message
* fix test
11 months ago
Dominic Gannaway
139114bdcb
fix: ensure legacy run utility does not cause cycles ( #13643 )
...
* fix: ensure legacy run utility does not cause cycles
* add warning
* add warning
* lint
* feedback
* lint
* lint
11 months ago
Dominic Gannaway
2070c8a166
breaking: disallow state mutations in logic block expression ( #13625 )
11 months ago
Rich Harris
94aea0f624
gah missed a spot
11 months ago
Rich Harris
caaf74b854
docs: more fixes ( #13608 )
11 months ago
Rich Harris
6534f507ce
docs: add/fix some more stuff ( #13585 )
11 months ago
Rich Harris
941db36b01
fix ( #13581 )
11 months ago
Rich Harris
5ee3ae4369
update diffs ( #13575 )
...
* update diffs
* gah
* fix
11 months ago
Rich Harris
3f0b41b252
docs: annotate notes as such ( #13564 )
11 months ago
Simon H
4578d4f25a
docs: generate pages for compiler/runtime warnings/errors ( #13557 )
...
* docs: generate pages for compiler/runtime warnings/errors
Ideally each warning has accompanying details so that it doesn't look so empty on the final site, but that can happen separately
* fix
* sort alphabetically, code ticks for headings
* only uppercase first word
* regenerate
* generate codes using [!NOTE], remove any backticks and escape `<` characters
* some prose preceeding the list of compiler warnings
* bring over prose from Svelte 4 a11y warnings
* fix
* lint
* remove backticks from headers, now that they are getting rendered
* Revert "remove backticks from headers, now that they are getting rendered"
This reverts commit c295281848
.
* back to normal headers/code blocks
* fix
* separate authored from generated stuff
* newlines
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
Rich Harris
1c8d1ca124
docs: various fixes ( #13560 )
...
* docs: various fixes
* fixes
* fix
* fix
11 months ago
Rich Harris
2b0741fa11
docs: add error annotation ( #13533 )
11 months ago
Rich Harris
233bbecf55
chore: rename placeholder file ( #13520 )
11 months ago
Simon Holthausen
dfb8eee1cc
docs: some module intro comments
11 months ago
Rich Harris
56621a2b36
docs: add legacy callouts ( #13428 )
11 months ago
sacrosanctic
c5028a27c5
docs: Update 7guis-timer example to support SSR context ( #13356 )
...
* Update 7guis-timer
* remove window reference on variable init
* better still
* prettier
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
Simon H
5dbe763792
fix: don't make wheel events passive by default ( #13322 )
...
This was done previously to align with browser behavior, but the browser behavior actually only makes them passive on window/document/body. Since wheel events are not delegated, we can revert their passive-by-default setting. Closes #13318
For touchstart/touchmove we're not changing it because these events are delegated, which means they happen a lot more often on a target higher up the tree, which may cause jank.
12 months ago
brunnerh
9204d699d5
docs: fixes relating to `bind:files` & note on `FileList` API ( #13235 )
12 months ago
Simon H
e5c840c87b
docs: adjust `bind:files` section ( #13230 )
...
closes #13156
12 months ago
Simon Holthausen
36137e0e93
docs: tweaks
1 year ago
Simon Holthausen
25f67df911
docs: adjust placeholder syntax
...
switch over to using the existing `> ...` syntax, using the new `> MODULE: ..` placeholder. Related to https://github.com/sveltejs/svelte.dev/pull/78
1 year ago
Simon H
29f29878c3
docs: note effects lifecycle ( #12993 )
...
* docs: note effects lifecycle
closes #9265
* tweak
1 year ago
Rich Harris
213258b024
docs: add note on when effects re-run ( #12961 )
...
closes #11806
---------
Co-authored-by: Conduitry <git@chor.date>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Rich Harris
803ebd5676
typo
1 year ago
Rich Harris
9f962d6f81
breaking: remove `$state.link` ( #12943 )
...
* Revert "breaking: remove `$state.link` callback (#12942 )"
This reverts commit 0b51ff04b0
.
* Revert "feat: adds $state.link rune (#12545 )"
This reverts commit 63ec2e2e88
.
* put changesets back
* changeset
* merge main
1 year ago
Simon H
732dbf7fa9
breaking: deprecate `context="module"` in favor of `module` ( #12948 )
...
* breaking: deprecate `context="module"` in favor of `module`
Also reserve a few attributes, which we may or may not use in the future
closes #12637
* fix tests
* one more
* add svelte package to the root so eslint and prettier can use it
* tweak messages
* warn on unknown attributes
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Rich Harris
0b51ff04b0
breaking: remove `$state.link` callback ( #12942 )
...
* breaking: remove `$state.link` callback
* simplify
* regenerate
1 year ago
Rich Harris
78677e40ef
fix: align list of passive events with browser defaults, and add documentation ( #12933 )
...
closes #12639
1 year ago
Dominic Gannaway
63ec2e2e88
feat: adds $state.link rune ( #12545 )
...
* feat: adds $state.link rune
* add tests
* types
* docs
* debugger
* lint
* Update .changeset/friendly-rice-confess.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update packages/svelte/src/compiler/phases/2-analyze/index.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* feedback
* feedback
* feedback
* feedback
* rename link_state to linked_state for grammatical consistency
* oops, victim of find-replace
* no need to store linked_value if setting
* simplify tests
* test behaviour of objects
* update docs
* copy
* more direct example that shows unlinking and relinking
* add callback argument support
* fix
* tidy up
* document callback
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Rich Harris
0812b10100
breaking: overhaul proxies, remove `$state.is` ( #12916 )
...
* chore: use closures for state proxies
* use variables
* early return
* tidy up
* move ownership stuff into separate object
* put original value directly on STATE_SYMBOL
* rename
* tidy up
* tidy
* tweak
* fix
* remove is_frozen check
* remove `$state.is`
* avoid mutations
* tweak
* changesets
* changeset
* changeset
* regenerate
* add comment
* add note
* add test
1 year ago
Rich Harris
9ba370f305
docs: replace `$state.frozen` docs with `$state.raw` ( #12812 )
1 year ago
Theodor Steiner
7ae21ea97d
feat: make <svelte:option> customElement configuration's tag property optional ( #12751 ) ( #12754 )
...
* feat: make svelte:option customElement tag property optional (#12751 )
* tweak comment
* tweak docs
* tweak some more wording
* Update .changeset/four-kids-flow.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 year ago
Rich Harris
2e8a205161
chore: remove outdated comment ( #12632 )
1 year ago
Rich Harris
04a211e1e1
chore: VSCode -> VS Code ( #12631 )
1 year ago
Simon H
dba4dfaff8
docs: add testing section ( #12600 )
...
* docs: add testing section
- explain component and rune testing using Vitest
- explain e2e testing using Playwright
closes #10244
closes #10650
* better examples
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix
* Update documentation/docs/05-misc/02-testing.md
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* Update documentation/docs/05-misc/02-testing.md
* we normally use single quotes
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* more details on component testing
* extract component testing into its own sub section, reorder a bit
* fix code example
* Update documentation/docs/05-misc/02-testing.md
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
1 year ago
Rich Harris
ba5f5f38b1
chore: tweak event delegation docs ( #12607 )
1 year ago
Simon H
13d86e9019
feat: allow `:global` in more places (alternative) ( #12560 )
...
* `div { :global { &.x { ... } } }` is equivalent to `div:global.x { ... }`, so the latter should be allowed, too
* finalize
* replace obsolete breaking change (which turned out to be a wrong change and was since reverted), add new breaking change note
* changeset
* regenerate types
* Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* always remove descendant selector before global
* error on lone `:global` with nested `&`, revert "remove spaces" rule
* regenerate types
* documentation
* oops
* switch to removing descendant combinator
* fix
* revert combinator validation relaxation
* error on first global being modified
* tweak docs
* tweak error messages
* Update documentation/docs/02-template-syntax/05-styles-and-classes.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* clarify
* tweak messages
* update tests
* tweak docs
* tweak `:global(...)` docs
* tweak docs
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Rich Harris
e2f17c8a7b
chore: tweak xmlns docs ( #12606 )
1 year ago
Dominic Gannaway
afa3128d2f
breaking: avoid flushing queued updates on mount/hydrate ( #12602 )
...
* Revert "Revert "breaking: avoid flushing queued updates on mount/hydrate" (#1…"
This reverts commit 8d139210b7
.
* fix legacy wrapper
* lint
* docs
* duplicate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Simon H
6223a7e87e
docs: event delegation tweaks ( #12597 )
...
closes #11317
1 year ago
Simon H
bc78391bdc
docs: mention xmlns attribute for `<svelte:element>` ( #12598 )
...
closes #11993
1 year ago
Simon H
2698716bdf
docs: fine-tune $props types info ( #12534 )
...
Show how to do optional props, add jsdoc example to non-preview-docs
closes #12528
1 year ago
Simon H
73d97f7af9
docs: fix `$effect.pre` code example ( #12444 )
...
closes #12439
1 year ago
Rich Harris
efe3b39d09
docs: tweak snapshot example ( #12426 )
1 year ago
Rich Harris
8d3c0266ce
breaking: use `structuredClone` inside `$state.snapshot` ( #12413 )
...
* move cloning logic into new file, use structuredClone, add tests
* changeset
* breaking
* tweak
* use same cloning approach between server and client
* get types mostly working
* fix type error that popped up
* cheeky hack
* we no longer need deep_snapshot
* shallow copy state when freezing
* throw if argument is a state proxy
* docs
* regenerate
1 year ago
Ben McCann
145d67a489
docs: copy Svelte 5 docs from omnisite ( #12317 )
1 year ago
wackbyte
c0c1a56675
feat: bind `activeElement` and `pointerLockElement` in `<svelte:document>` ( #11879 )
...
* feat: bind `activeElement` and `pointerLockElement` in `<svelte:document>`
* add test, use focusin/focusout rather than focus/blur
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 year ago
Mostafa Kheibary
e16591abe8
docs: Change all the word "initialization" to "initialisation" ( #10708 )
...
* Docs: Change all initizlisation to initialisation
* Reverted to "initialization" when asserting errors with specific message
* Reverted to "initialization" where related to specific error message
2 years ago
Dathan
282d62baae
Fix typo and grammar in 01-svelte-components.md ( #10737 )
2 years ago
Ben McCann
4942d6b9cc
docs: update routing FAQ with some more recent options ( #10452 )
...
* docs: update routing FAQ with some more recent options
* Update documentation/docs/05-misc/01-faq.md
Co-authored-by: Conduitry <git@chor.date>
* Update documentation/docs/05-misc/01-faq.md
---------
Co-authored-by: Conduitry <git@chor.date>
2 years ago
Chien Tran
976e807a3f
docs: rename svelte 5 discord channel ( #10431 )
...
* rename svelte 5 discord channel
* changeset
* Delete .changeset/stupid-insects-help.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
2 years ago
Ben McCann
aecd47e8df
chore: upgrade prettier to 3.1 ( #10134 )
2 years ago
Fritz Lin
e9b0908ed8
docs: add missing on:click to immutable example ( #10079 )
2 years ago
Arpit Jalan
3f56baf760
blog: fix typo in 'svelte.dev: A complete overhaul' blog entry ( #9438 )
2 years ago
Simon H
c6c934afb2
chore: cleanup ( #9381 )
...
* lets see if this works
* fix versions
* sigh
* debugging ci is sooo fun
* oh wow
* fix stuff, changelog, add back readme
* appease prettier
* format stuff
2 years ago
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>
2 years ago
Pedro Coelho
ac7505d81b
docs: update text color in animate example ( #9374 )
2 years ago
Vardhaman Bhandari
2a6f9e3bb7
docs: fix typo in blog ( #9373 )
2 years ago
Dani Sandoval
3a842e3da4
docs: "What's new in Svelte" November newsletter ( #9360 )
...
* november draft
* Apply suggestions from code review
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Stanislav Khromov <stanislav.khromov+github@gmail.com>
* add version number to kit suggestion
* add svelte summit blurb
* update title, move summit to intro, add deno note
* Update documentation/blog/2023-11-01-whats-new-in-svelte-november-2023.md
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Stanislav Khromov <stanislav.khromov+github@gmail.com>
2 years ago
Ben McCann
54233adb63
docs: clarify "obsolete" in runes blog post ( #9364 )
2 years ago
Ben McCann
895612514c
fix: improve a11y-click-events-have-key-events message ( #9358 )
2 years ago
Min Kim
4b911045b0
docs: fix else if blocks on tutorial ( #9336 )
2 years ago
Ravi van Rooijen
1ed9182025
docs: mention `{#await}` on non-Promise values short-circuiting to the fullfilled branch ( #9324 )
...
Fixes #9323
2 years ago
Willow (GHOST)
e42b961bd2
Add Hacktoberfest blog post ( #9280 )
2 years ago
Dani Sandoval
050592d2e1
docs: "What's new in Svelte" October newsletter ( #9271 )
2 years ago
Simon H
68b40effb2
site: runes banner ( #9228 )
...
* site: runes banner
* well I should get the title right, shouldnt I?
* padding
* fix typo
* tweak
2 years ago
Rich Harris
c50ad34b06
introducing runes ( #9227 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 years ago
Ben McCann
8e85b3fa9e
docs: remove typescript faq ( #9108 )
2 years ago
Puru Vijay
1a28d58b5d
feat: Copy code button ( #8995 )
...
* Push
* Bump site-kit
* Add headers to primary snippets
* Update deps
* Bump deos
* redploy
* Back to normal
* Push
* Bump deps
* site: fix rendering of promise in deprecation warning (#9191 )
* copy: true
* Bump site-kit
* Use cache
2 years ago
Conduitry
16504d1f52
docs: add FAQ about why you can't keep unused styles ( #9193 )
2 years ago
Jack Farley
9073241daa
docs: mention escaping of curly braces ( #8560 )
2 years ago
Dani Sandoval
effeb7abba
docs: "What's new in Svelte" September newsletter ( #9158 )
...
* first draft. sept
* address pr feedback
* forgot a Joy of Code video!
2 years ago
Geoff Rich
0041f11732
site: add view transitions blog post ( #9162 )
...
* site: add view transitions blog post
* Link live demo
* Apply suggestions from code review
Co-authored-by: Geoff Rich <4992896+geoffrich@users.noreply.github.com>
---------
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
2 years ago
Brittney Postma
2691e19b6b
docs: use latest tag when creating vite template ( #9151 )
2 years ago
gtmnayan
213db5d20a
docs: fix easings example glitch ( #9114 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2 years ago
Simon H
d2ed2ca329
docs: note ambient module info ( #9106 )
2 years ago
Romain l'Ourson
da3cc6c0a0
fix: typo ( #9102 )
2 years ago
Andy Pan
037b6ce312
docs: Fix a regression for a quoted-attribute example ( #9103 )
...
* Fix a doc regression for a quoted-attribute example
* Prettier ignore
---------
Co-authored-by: Puru Vijay <47742487+PuruVJ@users.noreply.github.com>
2 years ago
Eric Liu
3597cedbd8
docs: fix typo in August newsletter ( #9100 )
2 years ago
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>
2 years ago
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>
2 years ago
Alpay
ea2b5700ca
docs: fix link ( #9071 )
2 years ago
Dani Sandoval
abf257306b
docs: "What's new in Svelte" August newsletter ( #9034 )
2 years ago
Ben McCann
ce047651e5
docs: update component directives page ( #9040 )
2 years ago
Ben McCann
d6abd0a604
docs: clarify performance concerns around props and restProps ( #9047 )
...
* docs: clarify performance concerns around props and restProps
* Update documentation/docs/02-template-syntax/02-basic-markup.md
2 years ago
Kai Erik Niermann
5cd4f7750e
docs: add parenthesis back to regex literal example ( #9027 )
...
* fix: added parenthesis to literal notation example
* add prettier-ignore
---------
Co-authored-by: gtmnayan <50981692+gtm-nayan@users.noreply.github.com>
2 years ago