0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-29 16:36:44 +01:00
Commit Graph

7107 Commits

Author SHA1 Message Date
Puru Vijay
71d173a4c0 feat: Add home slot 2023-04-11 23:25:20 +05:30
Puru Vijay
ec733593e6 fix: Old site redirects 2023-04-11 23:18:26 +05:30
Ben McCann
009ce45e63
site: tweak content layout (#8483) 2023-04-11 10:14:14 -07:00
Puru Vijay
99979959c0
Update readme (#8453) 2023-04-05 18:06:59 +02:00
Puru Vijay
1e982c1e6d chore: Run prettier 2023-04-05 15:51:47 +05:30
Puru Vijay
04d4592299 chore: Update deps 2023-04-05 15:29:50 +05:30
Puru Vijay
beb3f653ee
docs(site-2): CJS to ESM for code snippets (#8449) 2023-04-03 15:29:39 -07:00
Puru Vijay
050c1031b7
feat(site-2): Make blog logic consistent with other content (#8447) 2023-04-03 11:46:46 -07:00
Puru Vijay
b569018fef
feat(site-2): Split docs (#8435)
* Update links

* Move blog to site/content

* Update site/content/docs/02-component-format.md

* Fix docs links

* Add global prettierrc

* Auto format

* Fix git merge artifact

* Fix errors

* Update html to svelte(remaining ones)

* Add 2 blog posts

* Modify prettierrc

* Minor design fix

* Switch package lock to spaces, prettier ignore

* Regenerate package lock

* prettier format

* Push

* Remove console.logs

* Minor fixes

* Fix search

* Fix heading <code> style

* Fix search some more

* Code cleanup

* Update deps

* Move content around

* Allow drafts

* Redirect logic

* Don't render anything on docs if /docs

* Shorten the regex patterns

* Fix some more

* Hack the build into working

* Modernize docs links

* Add content to introduction

* Modify the content

* fix content links

* Reduce duplication in redirect regex

* Differences from Kit page

* Fix link

* Make OnThisPage visible on all docs

* Misc changes

* Move differences page to introduction

* Run prettier

* Prerender examples api routes

* Modify introdution page

* replace positions of readonly and get

* Minor blog style enhancement

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
2023-04-03 14:18:50 -04:00
Puru Vijay
95abaec32a chore(site-2): Update deps 2023-04-03 00:44:20 +05:30
Puru Vijay
db2d07f236
feat(site-2): Update links, move blog out of SK folder to content (#8289)
* Update links

* Move blog to site/content

* Update site/content/docs/02-component-format.md

* Fix docs links

* Add global prettierrc

* Auto format

* Fix git merge artifact

* Fix errors

* Update html to svelte(remaining ones)

* Add 2 blog posts

* Modify prettierrc

* Minor design fix

* Switch package lock to spaces, prettier ignore

* Regenerate package lock

* prettier format

* Update deps

* Hack the build into working

* add missing blog post

---------

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Rich Harris <git@rich-harris.dev>
2023-04-02 11:24:33 -04:00
Rich Harris
f4edb381bf Merge branch 'master' into sites 2023-04-02 11:11:29 -04:00
Puru Vijay
5976de8f82
feat(site-2): Fully remove api.svelte.dev (#8432)
* Localize the examples dependents

* Localize FAQ

* Try to fix examples API

* Remove examples api

* Prerender, use vercel adapter, disable PUT action for now

* Don't call get_examples_data on top

* Move repl PUT to its own routew

* Don't prerender REPL page

* Change console warn

* Prerender tutorial the smart way

* Use getContext in root

* work around some weird content encoding glitch

* Try the pre-generate route

* Apply the suggestions

* Fix embed examples

* Remove comment

* remove commented-out code

* Update sites/svelte.dev/src/routes/_components/Demo.svelte

Co-authored-by: Rich Harris <richard.a.harris@gmail.com>

* remove unused code

* add note to self, remove ts-ignore

* move adapter-vercel to devDependencies

* remove some unused deps

* huh we need flexsearch after all? weird

* we need sourcemap-codec as well — what the hell. are these deps missing from a dep?

---------

Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
2023-04-02 10:35:10 -04:00
Michael Leahy
d42ca041dd
Closes #5876. Adds single value function support to media queries and media query range syntax / MQ level 4 support. (#8430) 2023-03-30 23:48:10 +02:00
Conduitry
cfe26d8d6c -> v3.58.0 2023-03-30 13:04:33 -04:00
Conduitry
5d0e049a94 update changelog 2023-03-30 13:04:01 -04:00
Yuichiro Yamashita
5a934e9f43
fix: escape <textarea value={...}> attribute properly (#8434) 2023-03-30 13:03:00 -04:00
Conduitry
3806977678 update changelog 2023-03-30 13:02:43 -04:00
Puru Vijay
9793b41817
feat(site-2): Local examples (#8431)
* feat(docs): Local tutorial

* Refactor some stuff

* Better error handling

* Fix search imports

* Prerender tutorial

* try prerendering hack

* fix super stupid display hidden bug

* Shorten the rendered URL

* Shorten URL code even more

* Prerender in svelte.config.js

* Refactor

* Fix ScreenToggle dark mode styles

* Initial POC

* Rvert to old hack

* Fix svelte-document.jpg
2023-03-29 14:10:31 +02:00
Puru Vijay
35e7a852fc
feat(site-2): Local tutorial (#8427)
* feat(docs): Local tutorial

* Refactor some stuff

* Better error handling

* Fix search imports

* Prerender tutorial

* try prerendering hack

* fix super stupid display hidden bug

* Shorten the rendered URL

* Shorten URL code even more
2023-03-29 14:07:21 +02:00
Puru Vijay
99611ad82e Fix search 2023-03-29 03:16:46 +05:30
Simon Holthausen
bad1780d48 chore: bump site-kit, use new components
- use search components
- use shell component
2023-03-28 12:47:06 +02:00
Filip Ambrosius
1333be0c6a
fix: Regression itemscope as boolean_attribute (#8414)
Microdata are a strange set of attributes which are ONLY defined in markup, and have no relationship to the underlying Document Object Model node. As such programmatically defining an element and setting a property on it with a given Microdata attribute will not work:
https://codepen.io/iambrosius/full/jOvXBBG

One can read more about microdata here: https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata

The fix is to remove itemscope being a boolean attribute, because that opts into a transformation as a DOM property, which is wrong.
2023-03-27 11:02:12 +02:00
Simon H
b8959ac09e
chore: update changelog 2023-03-27 10:32:41 +02:00
Nguyen Tran
dadd6fe945
fix: resolve computed_prop_# collision (#8418)
Fixes #8417

The issue is that unpack_destructuring in each blocks, await blocks, and @const tags were making computed_props independently. This causes computed_props_# to conflict when each blocks were used with @const tags, or await blocks and @const tags, or consecutive @const tags together. Therefore, one solution is to use component.get_unique_name to, well, make unique names and never get conflicts.
2023-03-27 10:15:39 +02:00
esthe
95c46552fe
feat: make preserveComments effective in DOM renderer (#7182) 2023-03-27 10:12:44 +02:00
Michael Leahy
91e8dfcd6d
feat: container query support via css-tree extension (#8275)
Closes #6969

As discussed there, container query support is quite useful to add to Svelte as it is now broadly available with Firefox releasing support imminently w/ FF v110 this upcoming week (~Feb 14th). Chrome has had support since ~Aug '22. The central issue is that css-tree which is a dependency for CSS AST parsing is significantly lagging behind on adding more recent features such as container query support. Ample time has been given to the maintainer to update css-tree and I do have every confidence that in time css-tree will receive a new major version with all sorts of modern CSS syntax supported including container queries. This PR provides an interim solution for what Svelte needs to support container queries now.
2023-03-27 10:07:39 +02:00
Snaipe
d49b568019
fix: allow use of document root as target in typescript (#7554)
It is not possible to use typescript when using `target: document`
during component initialization, because target can only be of type
Element or ShadowRoot. This means that it is not possible to hydrate
the entire document when managing the <html> element as a Svelte
component.

This commit fixes this by allowing documents to be targets.
2023-03-27 10:05:04 +02:00
Puru Vijay
339ea85d55
fix(site-2): styles (#8288) 2023-03-24 12:58:15 +01:00
Puru Vijay
95c346ca41 Merge remote-tracking branch 'origin/master' into sites 2023-03-23 16:38:07 +05:30
Simon H
aa4d0fc264
chore: update changelog 2023-03-21 18:13:03 +01:00
Yuichiro Yamashita
a2170f5bd5
fix: use wholeText for only contenteditable for set_data (#8394)
- split logic up into "is this a contenteditable element" and depending on the outcome use either .wholeText or .data to check if an update is necessary
- add to puppeteer because jsdom does not support contenteditable
- one test is skipped it because it fails right now but helps test #5018

---------

Co-authored-by: suxin2017 <1107178482@qq.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2023-03-21 14:30:25 +01:00
Simon H
6ce6f14755
fix: relax a11y-no-noninteractive-element-to-interactive-role warning (#8402)
#8167 introduced the strict version of it - until this is configurable, we should use the relaxed version instead, since many a11y docs actually advise using ul/ol etc
2023-03-21 10:51:05 +01:00
Simon H
0700abe41d
fix: typings for svelte:document 2023-03-20 14:12:19 +01:00
Nguyen Tran
fed93ab9e1
feat: add a11y interactive-supports-focus (#8392)
#820
2023-03-20 13:18:54 +01:00
Cavit Ertuğrul Sırt
7e9e78b37c
docs: Tutorial body had <svelte:body /> even though <svelte:document /> was the subject (#8396) 2023-03-19 15:20:20 +09:00
Puru Vijay
b45fe8020b Merge remote-tracking branch 'origin/master' into sites 2023-03-18 19:10:26 +05:30
Simon H
33065aa1e6
chore: update changelog 2023-03-17 17:55:50 +01:00
Geoff Rich
0f64e54ebb
chore: update changelog (#8390) 2023-03-17 16:58:51 +01:00
Dave Lunny
f56fe33931
feat: bind:innerText for contenteditable (#4291)
closes #3311

---------

Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2023-03-16 10:58:49 +01:00
Kazuma Oe
a45afd5393
docs: add <svelte:document> example (#8387) 2023-03-16 09:04:26 +01:00
Conduitry
952f8c566f -> v3.57.0 2023-03-15 13:38:01 -04:00
Simon H
10399d29e2
chore: update changelog 2023-03-15 18:07:57 +01:00
Simon H
68e492eaff
fix: revert buggy reactive vars optimization (#8382)
Reverts #7942
Fixes #8374
2023-03-15 18:05:50 +01:00
Nguyen Tran
a1e8421368
fix: object destructuring picks up computed properties (#8386)
fixes #6609. Prior related PR: #8357
2023-03-15 17:10:40 +01:00
Henrik Giesel
4b0b471ee1
feat: add back <svelte:document> (#7149)
Closes #3310

---------

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2023-03-15 16:38:03 +01:00
Ben McCann
c19d0889c5
chore: rename variable to follow coding style (#8385) 2023-03-15 16:31:25 +01:00
Bob Fanger
6aee49bad3
feat: css units in fly & blur transitions (#7623)
Closes #6050

---------

Co-authored-by: Bob Fanger <b.fanger@wearetriple.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2023-03-15 12:40:49 +01:00
Simon H
8015a36770
chore: update changelog 2023-03-14 18:06:31 +01:00
Bob Fanger
fb5f281e9a
fix: Prevent intro from cancelling outro (#7300)
The issue

1. When the block.i (intro) is called it registers a callback (via add_render_callback)
2. Then the block.o (outro) is called and start the outro and adds a callback to detach on outroend
3. The render callback from the intro is executed, starts the intro and cancels the outro animation

This causes components that should've been destroyed to stay on the page.

The fix in this PR: Inside the intro render callback it checks if it is still current and if it isn't (because an outro was triggered) it won't start the intro animation.

fixes #6152
fixes #6812
2023-03-14 15:33:52 +01:00