Rich Harris
2e8a205161
chore: remove outdated comment ( #12632 )
4 months ago
Rich Harris
04a211e1e1
chore: VSCode -> VS Code ( #12631 )
4 months 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>
4 months ago
Rich Harris
ba5f5f38b1
chore: tweak event delegation docs ( #12607 )
4 months 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>
4 months ago
Rich Harris
e2f17c8a7b
chore: tweak xmlns docs ( #12606 )
4 months 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>
4 months ago
Simon H
6223a7e87e
docs: event delegation tweaks ( #12597 )
...
closes #11317
4 months ago
Simon H
bc78391bdc
docs: mention xmlns attribute for `<svelte:element>` ( #12598 )
...
closes #11993
4 months 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
4 months ago
Simon H
73d97f7af9
docs: fix `$effect.pre` code example ( #12444 )
...
closes #12439
4 months ago
Rich Harris
efe3b39d09
docs: tweak snapshot example ( #12426 )
4 months 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
4 months ago
Ben McCann
145d67a489
docs: copy Svelte 5 docs from omnisite ( #12317 )
4 months 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>
5 months 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
8 months ago
Dathan
282d62baae
Fix typo and grammar in 01-svelte-components.md ( #10737 )
8 months 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>
9 months 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
1 year ago
Ben McCann
895612514c
fix: improve a11y-click-events-have-key-events message ( #9358 )
1 year ago
Ravi van Rooijen
1ed9182025
docs: mention `{#await}` on non-Promise values short-circuiting to the fullfilled branch ( #9324 )
...
Fixes #9323
1 year ago
Ben McCann
8e85b3fa9e
docs: remove typescript faq ( #9108 )
1 year 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
1 year ago
Conduitry
16504d1f52
docs: add FAQ about why you can't keep unused styles ( #9193 )
1 year ago
Jack Farley
9073241daa
docs: mention escaping of curly braces ( #8560 )
1 year ago
Brittney Postma
2691e19b6b
docs: use latest tag when creating vite template ( #9151 )
1 year ago
Simon H
d2ed2ca329
docs: note ambient module info ( #9106 )
1 year ago
Romain l'Ourson
da3cc6c0a0
fix: typo ( #9102 )
1 year 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>
1 year 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>
1 year 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>
1 year ago
Alpay
ea2b5700ca
docs: fix link ( #9071 )
1 year ago
Ben McCann
ce047651e5
docs: update component directives page ( #9040 )
1 year 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
1 year 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>
1 year ago
Jo Burgard
3dccf711f8
Fix error in example in 03-typescript.md ( #9001 )
1 year ago
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
1 year ago
Romain l'Ourson
c1d3d58088
docs: remove compiler duplicate paragraph ( #8980 )
...
Co-authored-by: Romain Crestey <romain.crestey@radiofrance.com>
1 year ago
Fanny
f41ff96c3a
docs: fix typo ( #8966 )
1 year ago
gtmnayan
afcf853b65
docs: update migration guide bundler conditions section ( #8965 )
...
#8953 / #8961
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
1 year ago
Dana Woodman
398904894e
docs: Make "unquoted" example actually unquoted ( #8937 )
1 year ago
Enrico Sacchetti
02099d9d75
docs: update Typescript elements link ( #8938 )
1 year ago
Simon H
132dd7906a
docs: preprocessor migration details ( #8927 )
...
closes #8916
1 year ago
Puru Vijay
70426be84a
feat(site): Deploy to edge ( #8873 )
...
* Try edge
* Fix errors
* Improvements
* Minor fixes
* Simplify docs layout logic
* Persist session true
* try regions all
* Push new promise-based infra
* pnpm install
* Remote debugging
* Refine
* try to disable prerender for examples
* text
* Weird hack
* url
* log params
* Try param matcher
* try some restructuring
* Leftover
* remove console log
* More async, remove node-fetch
* Fix
* New fixes
* Undo changes
* back to site-kit next 18
1 year ago
Simon Holthausen
d516bb06e1
docs: add eslint migration
1 year ago
Simon H
b9328a5077
docs: more details on transition migration
1 year ago
Brad Dougherty
cfa5447ea5
docs: fix typo in v4 migration guide ( #8890 )
1 year ago
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
1 year ago
Simon Holthausen
1c7ed55385
docs: add a11y-no-static-element-interactions
...
closes #8862
1 year ago
Not-Jayden
e3422e182b
docs: Don't recommend TypeScript type assertions for reactive declarations ( #8824 )
...
strictly speaking that's not the same and could hide some type errors
1 year ago