From 10b0691f493cfc6225db87d57eb271d1fbd73ede Mon Sep 17 00:00:00 2001 From: Zach Taliaferro <40471358+orrefailaT@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:28:59 -0500 Subject: [PATCH 001/326] Replace XSS abbreviation with Cross-Site Scripting and link to OWASP (#216) * Replace XSS abbreviation with Cross-Site Scripting and link to OWASP * Update README.md --------- Co-authored-by: Rich Harris --- .../tutorial/01-svelte/01-introduction/06-html-tags/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorial/01-svelte/01-introduction/06-html-tags/README.md b/content/tutorial/01-svelte/01-introduction/06-html-tags/README.md index f4fa766ca..f39935bba 100644 --- a/content/tutorial/01-svelte/01-introduction/06-html-tags/README.md +++ b/content/tutorial/01-svelte/01-introduction/06-html-tags/README.md @@ -12,4 +12,4 @@ In Svelte, you do this with the special `{@html ...}` tag:

{+++@html+++ string}

``` -> Svelte doesn't perform any sanitization of the expression inside `{@html ...}` before it gets inserted into the DOM. In other words, if you use this feature it's critical that you manually escape HTML that comes from sources you don't trust, otherwise you risk exposing your users to XSS attacks. +> Svelte doesn't perform any sanitization of the expression inside `{@html ...}` before it gets inserted into the DOM. In other words, if you use this feature it's critical that you manually escape HTML that comes from sources you don't trust, otherwise you risk exposing your users to Cross-Site Scripting (XSS) attacks. From ba78cbbd6375cbd50f556406707423eed9c6a684 Mon Sep 17 00:00:00 2001 From: Greg Schafer Date: Mon, 20 Feb 2023 09:29:41 -0700 Subject: [PATCH 002/326] fix: Correct paths in layout-data tutorial (#218) Paths are like `src/blog/...` and they should be like `src/routes/blog/...` --- .../02-sveltekit/03-loading-data/02-layout-data/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/tutorial/02-sveltekit/03-loading-data/02-layout-data/README.md b/content/tutorial/02-sveltekit/03-loading-data/02-layout-data/README.md index 15335b82c..21447bf32 100644 --- a/content/tutorial/02-sveltekit/03-loading-data/02-layout-data/README.md +++ b/content/tutorial/02-sveltekit/03-loading-data/02-layout-data/README.md @@ -5,9 +5,9 @@ path: /blog Just as `+layout.svelte` files create UI for every child route, `+layout.server.js` files load data for every child route. -Suppose we'd like to add a 'more posts' sidebar to our blog post page. We _could_ return `summaries` from the `load` function in `src/blog/[slug]/+page.server.js`, like we do in `src/blog/+page.server.js`, but that would be repetitive. +Suppose we'd like to add a 'more posts' sidebar to our blog post page. We _could_ return `summaries` from the `load` function in `src/routes/blog/[slug]/+page.server.js`, like we do in `src/routes/blog/+page.server.js`, but that would be repetitive. -Instead, let's rename `src/blog/+page.server.js` to `src/blog/+layout.server.js`. Notice that the `/blog` route continues to work — `data.summaries` is still available to the page. +Instead, let's rename `src/routes/blog/+page.server.js` to `src/routes/blog/+layout.server.js`. Notice that the `/blog` route continues to work — `data.summaries` is still available to the page. Now, create a layout for the post page: From 5cfafc6d8c7401471c064e14642868f106be6cbc Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 20 Feb 2023 14:59:20 -0500 Subject: [PATCH 003/326] bump deps (#219) * bump deps * fixes --- content/tutorial/common/package-lock.json | 553 ++++++++------- content/tutorial/common/package.json | 8 +- package.json | 30 +- pnpm-lock.yaml | 818 +++++++++++----------- svelte.config.js | 2 +- 5 files changed, 726 insertions(+), 685 deletions(-) diff --git a/content/tutorial/common/package-lock.json b/content/tutorial/common/package-lock.json index b5bcfb4da..b55ad4a13 100644 --- a/content/tutorial/common/package-lock.json +++ b/content/tutorial/common/package-lock.json @@ -8,16 +8,16 @@ "name": "~TODO~", "version": "0.0.1", "devDependencies": { - "@sveltejs/kit": "next", - "esbuild-wasm": "^0.16.4", - "svelte": "^3.54.0", - "vite": "^4.0.0" + "@sveltejs/kit": "^1.7.2", + "esbuild-wasm": "^0.17.9", + "svelte": "^3.55.1", + "vite": "^4.1.3" } }, "node_modules/@esbuild/android-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.4.tgz", - "integrity": "sha512-rZzb7r22m20S1S7ufIc6DC6W659yxoOrl7sKP1nCYhuvUlnCFHVSbATG4keGUtV8rDz11sRRDbWkvQZpzPaHiw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", + "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", "cpu": [ "arm" ], @@ -31,9 +31,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.4.tgz", - "integrity": "sha512-VPuTzXFm/m2fcGfN6CiwZTlLzxrKsWbPkG7ArRFpuxyaHUm/XFHQPD4xNwZT6uUmpIHhnSjcaCmcla8COzmZ5Q==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", + "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", "cpu": [ "arm64" ], @@ -47,9 +47,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.4.tgz", - "integrity": "sha512-MW+B2O++BkcOfMWmuHXB15/l1i7wXhJFqbJhp82IBOais8RBEQv2vQz/jHrDEHaY2X0QY7Wfw86SBL2PbVOr0g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", + "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", "cpu": [ "x64" ], @@ -63,9 +63,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.4.tgz", - "integrity": "sha512-a28X1O//aOfxwJVZVs7ZfM8Tyih2Za4nKJrBwW5Wm4yKsnwBy9aiS/xwpxiiTRttw3EaTg4Srerhcm6z0bu9Wg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", + "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", "cpu": [ "arm64" ], @@ -79,9 +79,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.4.tgz", - "integrity": "sha512-e3doCr6Ecfwd7VzlaQqEPrnbvvPjE9uoTpxG5pyLzr2rI2NMjDHmvY1E5EO81O/e9TUOLLkXA5m6T8lfjK9yAA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", + "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", "cpu": [ "x64" ], @@ -95,9 +95,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.4.tgz", - "integrity": "sha512-Oup3G/QxBgvvqnXWrBed7xxkFNwAwJVHZcklWyQt7YCAL5bfUkaa6FVWnR78rNQiM8MqqLiT6ZTZSdUFuVIg1w==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", + "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", "cpu": [ "arm64" ], @@ -111,9 +111,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.4.tgz", - "integrity": "sha512-vAP+eYOxlN/Bpo/TZmzEQapNS8W1njECrqkTpNgvXskkkJC2AwOXwZWai/Kc2vEFZUXQttx6UJbj9grqjD/+9Q==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", + "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", "cpu": [ "x64" ], @@ -127,9 +127,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.4.tgz", - "integrity": "sha512-A47ZmtpIPyERxkSvIv+zLd6kNIOtJH03XA0Hy7jaceRDdQaQVGSDt4mZqpWqJYgDk9rg96aglbF6kCRvPGDSUA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", + "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", "cpu": [ "arm" ], @@ -143,9 +143,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.4.tgz", - "integrity": "sha512-2zXoBhv4r5pZiyjBKrOdFP4CXOChxXiYD50LRUU+65DkdS5niPFHbboKZd/c81l0ezpw7AQnHeoCy5hFrzzs4g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", + "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", "cpu": [ "arm64" ], @@ -159,9 +159,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.4.tgz", - "integrity": "sha512-uxdSrpe9wFhz4yBwt2kl2TxS/NWEINYBUFIxQtaEVtglm1eECvsj1vEKI0KX2k2wCe17zDdQ3v+jVxfwVfvvjw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", + "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", "cpu": [ "ia32" ], @@ -175,9 +175,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.4.tgz", - "integrity": "sha512-peDrrUuxbZ9Jw+DwLCh/9xmZAk0p0K1iY5d2IcwmnN+B87xw7kujOkig6ZRcZqgrXgeRGurRHn0ENMAjjD5DEg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", + "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", "cpu": [ "loong64" ], @@ -191,9 +191,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.4.tgz", - "integrity": "sha512-sD9EEUoGtVhFjjsauWjflZklTNr57KdQ6xfloO4yH1u7vNQlOfAlhEzbyBKfgbJlW7rwXYBdl5/NcZ+Mg2XhQA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", + "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", "cpu": [ "mips64el" ], @@ -207,9 +207,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.4.tgz", - "integrity": "sha512-X1HSqHUX9D+d0l6/nIh4ZZJ94eQky8d8z6yxAptpZE3FxCWYWvTDd9X9ST84MGZEJx04VYUD/AGgciddwO0b8g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", + "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", "cpu": [ "ppc64" ], @@ -223,9 +223,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.4.tgz", - "integrity": "sha512-97ANpzyNp0GTXCt6SRdIx1ngwncpkV/z453ZuxbnBROCJ5p/55UjhbaG23UdHj88fGWLKPFtMoU4CBacz4j9FA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", + "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", "cpu": [ "riscv64" ], @@ -239,9 +239,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.4.tgz", - "integrity": "sha512-pUvPQLPmbEeJRPjP0DYTC1vjHyhrnCklQmCGYbipkep+oyfTn7GTBJXoPodR7ZS5upmEyc8lzAkn2o29wD786A==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", + "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", "cpu": [ "s390x" ], @@ -255,9 +255,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.4.tgz", - "integrity": "sha512-N55Q0mJs3Sl8+utPRPBrL6NLYZKBCLLx0bme/+RbjvMforTGGzFvsRl4xLTZMUBFC1poDzBEPTEu5nxizQ9Nlw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", + "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", "cpu": [ "x64" ], @@ -271,9 +271,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.4.tgz", - "integrity": "sha512-LHSJLit8jCObEQNYkgsDYBh2JrJT53oJO2HVdkSYLa6+zuLJh0lAr06brXIkljrlI+N7NNW1IAXGn/6IZPi3YQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", + "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", "cpu": [ "x64" ], @@ -287,9 +287,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.4.tgz", - "integrity": "sha512-nLgdc6tWEhcCFg/WVFaUxHcPK3AP/bh+KEwKtl69Ay5IBqUwKDaq/6Xk0E+fh/FGjnLwqFSsarsbPHeKM8t8Sw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", + "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", "cpu": [ "x64" ], @@ -303,9 +303,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.4.tgz", - "integrity": "sha512-08SluG24GjPO3tXKk95/85n9kpyZtXCVwURR2i4myhrOfi3jspClV0xQQ0W0PYWHioJj+LejFMt41q+PG3mlAQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", + "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", "cpu": [ "x64" ], @@ -319,9 +319,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.4.tgz", - "integrity": "sha512-yYiRDQcqLYQSvNQcBKN7XogbrSvBE45FEQdH8fuXPl7cngzkCvpsG2H9Uey39IjQ6gqqc+Q4VXYHsQcKW0OMjQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", + "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", "cpu": [ "arm64" ], @@ -335,9 +335,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.4.tgz", - "integrity": "sha512-5rabnGIqexekYkh9zXG5waotq8mrdlRoBqAktjx2W3kb0zsI83mdCwrcAeKYirnUaTGztR5TxXcXmQrEzny83w==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", + "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", "cpu": [ "ia32" ], @@ -351,9 +351,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.4.tgz", - "integrity": "sha512-sN/I8FMPtmtT2Yw+Dly8Ur5vQ5a/RmC8hW7jO9PtPSQUPkowxWpcUZnqOggU7VwyT3Xkj6vcXWd3V/qTXwultQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", + "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", "cpu": [ "x64" ], @@ -379,31 +379,31 @@ "dev": true }, "node_modules/@sveltejs/kit": { - "version": "1.0.0-next.584", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.584.tgz", - "integrity": "sha512-iBfrrwkza1szR1GVMorTjj1Yw3SXhDVB5MMdDzCMKqKcCwxCehQ3K6QnlmyXHtHg2qX5rfvz0cpkp0uGGmcxQw==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.7.2.tgz", + "integrity": "sha512-qU/kbupIhsA1JA0GIN4cGa6XrhzPc99Z4agsEDeGPMy7qQqYCuFcIL2MLEH+tfqPUCu4m3FQ6ULVSUIVCnHj+A==", "dev": true, "hasInstallScript": true, "dependencies": { "@sveltejs/vite-plugin-svelte": "^2.0.0", "@types/cookie": "^0.5.1", "cookie": "^0.5.0", - "devalue": "^4.2.0", + "devalue": "^4.2.3", "esm-env": "^1.0.0", "kleur": "^4.1.5", - "magic-string": "^0.27.0", + "magic-string": "^0.29.0", "mime": "^3.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.5.1", "sirv": "^2.0.2", "tiny-glob": "^0.2.9", - "undici": "5.14.0" + "undici": "5.19.1" }, "bin": { "svelte-kit": "svelte-kit.js" }, "engines": { - "node": ">=16.14" + "node": "^16.14 || >=18" }, "peerDependencies": { "svelte": "^3.54.0", @@ -431,6 +431,18 @@ "vite": "^4.0.0" } }, + "node_modules/@sveltejs/vite-plugin-svelte/node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@types/cookie": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.1.tgz", @@ -476,24 +488,24 @@ } }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/devalue": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.2.0.tgz", - "integrity": "sha512-mbjoAaCL2qogBKgeFxFPOXAUsZchircF+B/79LD4sHH0+NHfYm8gZpQrskKDn5gENGt35+5OI1GUF7hLVnkPDw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.0.tgz", + "integrity": "sha512-n94yQo4LI3w7erwf84mhRUkUJfhLoCZiLyoOZ/QFsDbcWNZePrLwbQpvZBUG2TNxwV3VjCKPxkiiQA6pe3TrTA==", "dev": true }, "node_modules/esbuild": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.4.tgz", - "integrity": "sha512-qQrPMQpPTWf8jHugLWHoGqZjApyx3OEm76dlTXobHwh/EBbavbRdjXdYi/GWr43GyN0sfpap14GPkb05NH3ROA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", + "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", "dev": true, "hasInstallScript": true, "bin": { @@ -503,34 +515,34 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.16.4", - "@esbuild/android-arm64": "0.16.4", - "@esbuild/android-x64": "0.16.4", - "@esbuild/darwin-arm64": "0.16.4", - "@esbuild/darwin-x64": "0.16.4", - "@esbuild/freebsd-arm64": "0.16.4", - "@esbuild/freebsd-x64": "0.16.4", - "@esbuild/linux-arm": "0.16.4", - "@esbuild/linux-arm64": "0.16.4", - "@esbuild/linux-ia32": "0.16.4", - "@esbuild/linux-loong64": "0.16.4", - "@esbuild/linux-mips64el": "0.16.4", - "@esbuild/linux-ppc64": "0.16.4", - "@esbuild/linux-riscv64": "0.16.4", - "@esbuild/linux-s390x": "0.16.4", - "@esbuild/linux-x64": "0.16.4", - "@esbuild/netbsd-x64": "0.16.4", - "@esbuild/openbsd-x64": "0.16.4", - "@esbuild/sunos-x64": "0.16.4", - "@esbuild/win32-arm64": "0.16.4", - "@esbuild/win32-ia32": "0.16.4", - "@esbuild/win32-x64": "0.16.4" + "@esbuild/android-arm": "0.16.17", + "@esbuild/android-arm64": "0.16.17", + "@esbuild/android-x64": "0.16.17", + "@esbuild/darwin-arm64": "0.16.17", + "@esbuild/darwin-x64": "0.16.17", + "@esbuild/freebsd-arm64": "0.16.17", + "@esbuild/freebsd-x64": "0.16.17", + "@esbuild/linux-arm": "0.16.17", + "@esbuild/linux-arm64": "0.16.17", + "@esbuild/linux-ia32": "0.16.17", + "@esbuild/linux-loong64": "0.16.17", + "@esbuild/linux-mips64el": "0.16.17", + "@esbuild/linux-ppc64": "0.16.17", + "@esbuild/linux-riscv64": "0.16.17", + "@esbuild/linux-s390x": "0.16.17", + "@esbuild/linux-x64": "0.16.17", + "@esbuild/netbsd-x64": "0.16.17", + "@esbuild/openbsd-x64": "0.16.17", + "@esbuild/sunos-x64": "0.16.17", + "@esbuild/win32-arm64": "0.16.17", + "@esbuild/win32-ia32": "0.16.17", + "@esbuild/win32-x64": "0.16.17" } }, "node_modules/esbuild-wasm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.16.4.tgz", - "integrity": "sha512-Nh7aa9uazooaEIGubc8s0nQZFhnf035pJMTpMPBonzDchN6RPsQES5bojQo3zT2xSAuC9nEMg8Nxzc1iwigETw==", + "version": "0.17.9", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.17.9.tgz", + "integrity": "sha512-bCCseuU9ZflAqfItl1beWy9kjpbMsCBKzyGQbgk7B6M3m3FGuZNPCF368CWe9bHAAtUMfbILRxyWsNgjIRXFJg==", "dev": true, "bin": { "esbuild": "bin/esbuild" @@ -611,9 +623,9 @@ } }, "node_modules/magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.29.0.tgz", + "integrity": "sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==", "dev": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.13" @@ -683,9 +695,9 @@ "dev": true }, "node_modules/postcss": { - "version": "8.4.20", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", - "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "dev": true, "funding": [ { @@ -724,9 +736,9 @@ } }, "node_modules/rollup": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.7.3.tgz", - "integrity": "sha512-7e68MQbAWCX6mI4/0lG1WHd+NdNAlVamg0Zkd+8LZ/oXojligdGnCNyHlzXqXCZObyjs5FRc3AH0b17iJESGIQ==", + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.17.2.tgz", + "integrity": "sha512-qMNZdlQPCkWodrAZ3qnJtvCAl4vpQ8q77uEujVCCbC/6CLB7Lcmvjq7HyiOSnf4fxTT9XgsE36oLHJBH49xjqA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -802,9 +814,9 @@ } }, "node_modules/svelte": { - "version": "3.54.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.54.0.tgz", - "integrity": "sha512-tdrgeJU0hob0ZWAMoKXkhcxXA7dpTg6lZGxUeko5YqvPdJBiyRspGsCwV27kIrbrqPP2WUoSV9ca0gnLlw8YzQ==", + "version": "3.55.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.55.1.tgz", + "integrity": "sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==", "dev": true, "engines": { "node": ">= 8" @@ -842,9 +854,9 @@ } }, "node_modules/undici": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.14.0.tgz", - "integrity": "sha512-yJlHYw6yXPPsuOH0x2Ib1Km61vu4hLiRRQoafs+WUgX1vO64vgnxiCEN9dpIrhZyHFsai3F0AEj4P9zy19enEQ==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.19.1.tgz", + "integrity": "sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A==", "dev": true, "dependencies": { "busboy": "^1.6.0" @@ -854,15 +866,15 @@ } }, "node_modules/vite": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.0.0.tgz", - "integrity": "sha512-ynad+4kYs8Jcnn8J7SacS9vAbk7eMy0xWg6E7bAhS1s79TK+D7tVFGXVZ55S7RNLRROU1rxoKlvZ/qjaB41DGA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.3.tgz", + "integrity": "sha512-0Zqo4/Fr/swSOBmbl+HAAhOjrqNwju+yTtoe4hQX9UsARdcuc9njyOdr6xU0DDnV7YP0RT6mgTTOiRtZgxfCxA==", "dev": true, "dependencies": { - "esbuild": "^0.16.3", - "postcss": "^8.4.19", + "esbuild": "^0.16.14", + "postcss": "^8.4.21", "resolve": "^1.22.1", - "rollup": "^3.7.0" + "rollup": "^3.10.0" }, "bin": { "vite": "bin/vite.js" @@ -903,9 +915,9 @@ } }, "node_modules/vitefu": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.3.tgz", - "integrity": "sha512-75l7TTuU8isAhz1QFtNKjDkqjxvndfMC1AfIMjJ0ZQ59ZD0Ow9QOIsJJX16Wv9PS8f+zMzp6fHy5cCbKG/yVUQ==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", + "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", "dev": true, "peerDependencies": { "vite": "^3.0.0 || ^4.0.0" @@ -919,156 +931,156 @@ }, "dependencies": { "@esbuild/android-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.4.tgz", - "integrity": "sha512-rZzb7r22m20S1S7ufIc6DC6W659yxoOrl7sKP1nCYhuvUlnCFHVSbATG4keGUtV8rDz11sRRDbWkvQZpzPaHiw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", + "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.4.tgz", - "integrity": "sha512-VPuTzXFm/m2fcGfN6CiwZTlLzxrKsWbPkG7ArRFpuxyaHUm/XFHQPD4xNwZT6uUmpIHhnSjcaCmcla8COzmZ5Q==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", + "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.4.tgz", - "integrity": "sha512-MW+B2O++BkcOfMWmuHXB15/l1i7wXhJFqbJhp82IBOais8RBEQv2vQz/jHrDEHaY2X0QY7Wfw86SBL2PbVOr0g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", + "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.4.tgz", - "integrity": "sha512-a28X1O//aOfxwJVZVs7ZfM8Tyih2Za4nKJrBwW5Wm4yKsnwBy9aiS/xwpxiiTRttw3EaTg4Srerhcm6z0bu9Wg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", + "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.4.tgz", - "integrity": "sha512-e3doCr6Ecfwd7VzlaQqEPrnbvvPjE9uoTpxG5pyLzr2rI2NMjDHmvY1E5EO81O/e9TUOLLkXA5m6T8lfjK9yAA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", + "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.4.tgz", - "integrity": "sha512-Oup3G/QxBgvvqnXWrBed7xxkFNwAwJVHZcklWyQt7YCAL5bfUkaa6FVWnR78rNQiM8MqqLiT6ZTZSdUFuVIg1w==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", + "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.4.tgz", - "integrity": "sha512-vAP+eYOxlN/Bpo/TZmzEQapNS8W1njECrqkTpNgvXskkkJC2AwOXwZWai/Kc2vEFZUXQttx6UJbj9grqjD/+9Q==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", + "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.4.tgz", - "integrity": "sha512-A47ZmtpIPyERxkSvIv+zLd6kNIOtJH03XA0Hy7jaceRDdQaQVGSDt4mZqpWqJYgDk9rg96aglbF6kCRvPGDSUA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", + "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.4.tgz", - "integrity": "sha512-2zXoBhv4r5pZiyjBKrOdFP4CXOChxXiYD50LRUU+65DkdS5niPFHbboKZd/c81l0ezpw7AQnHeoCy5hFrzzs4g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", + "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.4.tgz", - "integrity": "sha512-uxdSrpe9wFhz4yBwt2kl2TxS/NWEINYBUFIxQtaEVtglm1eECvsj1vEKI0KX2k2wCe17zDdQ3v+jVxfwVfvvjw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", + "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.4.tgz", - "integrity": "sha512-peDrrUuxbZ9Jw+DwLCh/9xmZAk0p0K1iY5d2IcwmnN+B87xw7kujOkig6ZRcZqgrXgeRGurRHn0ENMAjjD5DEg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", + "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.4.tgz", - "integrity": "sha512-sD9EEUoGtVhFjjsauWjflZklTNr57KdQ6xfloO4yH1u7vNQlOfAlhEzbyBKfgbJlW7rwXYBdl5/NcZ+Mg2XhQA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", + "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.4.tgz", - "integrity": "sha512-X1HSqHUX9D+d0l6/nIh4ZZJ94eQky8d8z6yxAptpZE3FxCWYWvTDd9X9ST84MGZEJx04VYUD/AGgciddwO0b8g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", + "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.4.tgz", - "integrity": "sha512-97ANpzyNp0GTXCt6SRdIx1ngwncpkV/z453ZuxbnBROCJ5p/55UjhbaG23UdHj88fGWLKPFtMoU4CBacz4j9FA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", + "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.4.tgz", - "integrity": "sha512-pUvPQLPmbEeJRPjP0DYTC1vjHyhrnCklQmCGYbipkep+oyfTn7GTBJXoPodR7ZS5upmEyc8lzAkn2o29wD786A==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", + "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.4.tgz", - "integrity": "sha512-N55Q0mJs3Sl8+utPRPBrL6NLYZKBCLLx0bme/+RbjvMforTGGzFvsRl4xLTZMUBFC1poDzBEPTEu5nxizQ9Nlw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", + "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.4.tgz", - "integrity": "sha512-LHSJLit8jCObEQNYkgsDYBh2JrJT53oJO2HVdkSYLa6+zuLJh0lAr06brXIkljrlI+N7NNW1IAXGn/6IZPi3YQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", + "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.4.tgz", - "integrity": "sha512-nLgdc6tWEhcCFg/WVFaUxHcPK3AP/bh+KEwKtl69Ay5IBqUwKDaq/6Xk0E+fh/FGjnLwqFSsarsbPHeKM8t8Sw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", + "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.4.tgz", - "integrity": "sha512-08SluG24GjPO3tXKk95/85n9kpyZtXCVwURR2i4myhrOfi3jspClV0xQQ0W0PYWHioJj+LejFMt41q+PG3mlAQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", + "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.4.tgz", - "integrity": "sha512-yYiRDQcqLYQSvNQcBKN7XogbrSvBE45FEQdH8fuXPl7cngzkCvpsG2H9Uey39IjQ6gqqc+Q4VXYHsQcKW0OMjQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", + "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.4.tgz", - "integrity": "sha512-5rabnGIqexekYkh9zXG5waotq8mrdlRoBqAktjx2W3kb0zsI83mdCwrcAeKYirnUaTGztR5TxXcXmQrEzny83w==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", + "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.4.tgz", - "integrity": "sha512-sN/I8FMPtmtT2Yw+Dly8Ur5vQ5a/RmC8hW7jO9PtPSQUPkowxWpcUZnqOggU7VwyT3Xkj6vcXWd3V/qTXwultQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", + "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", "dev": true, "optional": true }, @@ -1085,24 +1097,24 @@ "dev": true }, "@sveltejs/kit": { - "version": "1.0.0-next.584", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.0.0-next.584.tgz", - "integrity": "sha512-iBfrrwkza1szR1GVMorTjj1Yw3SXhDVB5MMdDzCMKqKcCwxCehQ3K6QnlmyXHtHg2qX5rfvz0cpkp0uGGmcxQw==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.7.2.tgz", + "integrity": "sha512-qU/kbupIhsA1JA0GIN4cGa6XrhzPc99Z4agsEDeGPMy7qQqYCuFcIL2MLEH+tfqPUCu4m3FQ6ULVSUIVCnHj+A==", "dev": true, "requires": { "@sveltejs/vite-plugin-svelte": "^2.0.0", "@types/cookie": "^0.5.1", "cookie": "^0.5.0", - "devalue": "^4.2.0", + "devalue": "^4.2.3", "esm-env": "^1.0.0", "kleur": "^4.1.5", - "magic-string": "^0.27.0", + "magic-string": "^0.29.0", "mime": "^3.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.5.1", "sirv": "^2.0.2", "tiny-glob": "^0.2.9", - "undici": "5.14.0" + "undici": "5.19.1" } }, "@sveltejs/vite-plugin-svelte": { @@ -1117,6 +1129,17 @@ "magic-string": "^0.27.0", "svelte-hmr": "^0.15.1", "vitefu": "^0.2.3" + }, + "dependencies": { + "magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.13" + } + } } }, "@types/cookie": { @@ -1150,51 +1173,51 @@ } }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz", + "integrity": "sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==", "dev": true }, "devalue": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.2.0.tgz", - "integrity": "sha512-mbjoAaCL2qogBKgeFxFPOXAUsZchircF+B/79LD4sHH0+NHfYm8gZpQrskKDn5gENGt35+5OI1GUF7hLVnkPDw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.0.tgz", + "integrity": "sha512-n94yQo4LI3w7erwf84mhRUkUJfhLoCZiLyoOZ/QFsDbcWNZePrLwbQpvZBUG2TNxwV3VjCKPxkiiQA6pe3TrTA==", "dev": true }, "esbuild": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.4.tgz", - "integrity": "sha512-qQrPMQpPTWf8jHugLWHoGqZjApyx3OEm76dlTXobHwh/EBbavbRdjXdYi/GWr43GyN0sfpap14GPkb05NH3ROA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", + "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", "dev": true, "requires": { - "@esbuild/android-arm": "0.16.4", - "@esbuild/android-arm64": "0.16.4", - "@esbuild/android-x64": "0.16.4", - "@esbuild/darwin-arm64": "0.16.4", - "@esbuild/darwin-x64": "0.16.4", - "@esbuild/freebsd-arm64": "0.16.4", - "@esbuild/freebsd-x64": "0.16.4", - "@esbuild/linux-arm": "0.16.4", - "@esbuild/linux-arm64": "0.16.4", - "@esbuild/linux-ia32": "0.16.4", - "@esbuild/linux-loong64": "0.16.4", - "@esbuild/linux-mips64el": "0.16.4", - "@esbuild/linux-ppc64": "0.16.4", - "@esbuild/linux-riscv64": "0.16.4", - "@esbuild/linux-s390x": "0.16.4", - "@esbuild/linux-x64": "0.16.4", - "@esbuild/netbsd-x64": "0.16.4", - "@esbuild/openbsd-x64": "0.16.4", - "@esbuild/sunos-x64": "0.16.4", - "@esbuild/win32-arm64": "0.16.4", - "@esbuild/win32-ia32": "0.16.4", - "@esbuild/win32-x64": "0.16.4" + "@esbuild/android-arm": "0.16.17", + "@esbuild/android-arm64": "0.16.17", + "@esbuild/android-x64": "0.16.17", + "@esbuild/darwin-arm64": "0.16.17", + "@esbuild/darwin-x64": "0.16.17", + "@esbuild/freebsd-arm64": "0.16.17", + "@esbuild/freebsd-x64": "0.16.17", + "@esbuild/linux-arm": "0.16.17", + "@esbuild/linux-arm64": "0.16.17", + "@esbuild/linux-ia32": "0.16.17", + "@esbuild/linux-loong64": "0.16.17", + "@esbuild/linux-mips64el": "0.16.17", + "@esbuild/linux-ppc64": "0.16.17", + "@esbuild/linux-riscv64": "0.16.17", + "@esbuild/linux-s390x": "0.16.17", + "@esbuild/linux-x64": "0.16.17", + "@esbuild/netbsd-x64": "0.16.17", + "@esbuild/openbsd-x64": "0.16.17", + "@esbuild/sunos-x64": "0.16.17", + "@esbuild/win32-arm64": "0.16.17", + "@esbuild/win32-ia32": "0.16.17", + "@esbuild/win32-x64": "0.16.17" } }, "esbuild-wasm": { - "version": "0.16.4", - "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.16.4.tgz", - "integrity": "sha512-Nh7aa9uazooaEIGubc8s0nQZFhnf035pJMTpMPBonzDchN6RPsQES5bojQo3zT2xSAuC9nEMg8Nxzc1iwigETw==", + "version": "0.17.9", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.17.9.tgz", + "integrity": "sha512-bCCseuU9ZflAqfItl1beWy9kjpbMsCBKzyGQbgk7B6M3m3FGuZNPCF368CWe9bHAAtUMfbILRxyWsNgjIRXFJg==", "dev": true }, "esm-env": { @@ -1253,9 +1276,9 @@ "dev": true }, "magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.29.0.tgz", + "integrity": "sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==", "dev": true, "requires": { "@jridgewell/sourcemap-codec": "^1.4.13" @@ -1304,9 +1327,9 @@ "dev": true }, "postcss": { - "version": "8.4.20", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", - "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "dev": true, "requires": { "nanoid": "^3.3.4", @@ -1326,9 +1349,9 @@ } }, "rollup": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.7.3.tgz", - "integrity": "sha512-7e68MQbAWCX6mI4/0lG1WHd+NdNAlVamg0Zkd+8LZ/oXojligdGnCNyHlzXqXCZObyjs5FRc3AH0b17iJESGIQ==", + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.17.2.tgz", + "integrity": "sha512-qMNZdlQPCkWodrAZ3qnJtvCAl4vpQ8q77uEujVCCbC/6CLB7Lcmvjq7HyiOSnf4fxTT9XgsE36oLHJBH49xjqA==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -1379,9 +1402,9 @@ "dev": true }, "svelte": { - "version": "3.54.0", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.54.0.tgz", - "integrity": "sha512-tdrgeJU0hob0ZWAMoKXkhcxXA7dpTg6lZGxUeko5YqvPdJBiyRspGsCwV27kIrbrqPP2WUoSV9ca0gnLlw8YzQ==", + "version": "3.55.1", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.55.1.tgz", + "integrity": "sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==", "dev": true }, "svelte-hmr": { @@ -1408,31 +1431,31 @@ "dev": true }, "undici": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.14.0.tgz", - "integrity": "sha512-yJlHYw6yXPPsuOH0x2Ib1Km61vu4hLiRRQoafs+WUgX1vO64vgnxiCEN9dpIrhZyHFsai3F0AEj4P9zy19enEQ==", + "version": "5.19.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.19.1.tgz", + "integrity": "sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A==", "dev": true, "requires": { "busboy": "^1.6.0" } }, "vite": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.0.0.tgz", - "integrity": "sha512-ynad+4kYs8Jcnn8J7SacS9vAbk7eMy0xWg6E7bAhS1s79TK+D7tVFGXVZ55S7RNLRROU1rxoKlvZ/qjaB41DGA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.3.tgz", + "integrity": "sha512-0Zqo4/Fr/swSOBmbl+HAAhOjrqNwju+yTtoe4hQX9UsARdcuc9njyOdr6xU0DDnV7YP0RT6mgTTOiRtZgxfCxA==", "dev": true, "requires": { - "esbuild": "^0.16.3", + "esbuild": "^0.16.14", "fsevents": "~2.3.2", - "postcss": "^8.4.19", + "postcss": "^8.4.21", "resolve": "^1.22.1", - "rollup": "^3.7.0" + "rollup": "^3.10.0" } }, "vitefu": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.3.tgz", - "integrity": "sha512-75l7TTuU8isAhz1QFtNKjDkqjxvndfMC1AfIMjJ0ZQ59ZD0Ow9QOIsJJX16Wv9PS8f+zMzp6fHy5cCbKG/yVUQ==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", + "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", "dev": true, "requires": {} } diff --git a/content/tutorial/common/package.json b/content/tutorial/common/package.json index 7243df8c4..d3586eb9e 100644 --- a/content/tutorial/common/package.json +++ b/content/tutorial/common/package.json @@ -7,10 +7,10 @@ "preview": "./node_modules/vite/bin/vite.js preview" }, "devDependencies": { - "@sveltejs/kit": "next", - "esbuild-wasm": "^0.16.4", - "svelte": "^3.54.0", - "vite": "^4.0.0" + "@sveltejs/kit": "^1.7.2", + "esbuild-wasm": "^0.17.9", + "svelte": "^3.55.1", + "vite": "^4.1.3" }, "type": "module" } diff --git a/package.json b/package.json index a3185b37f..91cab4b73 100644 --- a/package.json +++ b/package.json @@ -14,34 +14,34 @@ "devDependencies": { "@playwright/test": "^1.30.0", "@sveltejs/adapter-auto": "1.0.0-next.90", - "@sveltejs/adapter-vercel": "1.0.0-next.85", - "@sveltejs/kit": "next", - "@sveltejs/site-kit": "^3.0.3", + "@sveltejs/adapter-vercel": "2.0.4", + "@sveltejs/kit": "^1.7.2", + "@sveltejs/site-kit": "^3.2.2", "@types/diff": "^5.0.2", "@types/marked": "^4.0.8", "@types/prismjs": "^1.26.0", - "@types/ws": "^8.5.3", + "@types/ws": "^8.5.4", "diff": "^5.1.0", - "esbuild": "^0.14.43", - "prettier": "^2.6.2", - "prettier-plugin-svelte": "^2.7.0", - "svelte": "^3.54.0", - "svelte-check": "^2.7.2", + "esbuild": "^0.17.9", + "prettier": "^2.8.4", + "prettier-plugin-svelte": "^2.9.0", + "svelte": "^3.55.1", + "svelte-check": "^2.10.3", "tiny-glob": "^0.2.9", "typescript": "~4.6.4", - "vite": "^4.0.0" + "vite": "^4.1.3" }, "type": "module", "dependencies": { - "@fontsource/roboto-mono": "^4.5.7", + "@fontsource/roboto-mono": "^4.5.10", "@webcontainer/api": "^0.0.8", - "adm-zip": "^0.5.9", + "adm-zip": "^0.5.10", "base64-js": "^1.5.1", - "marked": "^4.0.16", + "marked": "^4.2.12", "monaco-editor": "^0.33.0", "port-authority": "^2.0.1", "prism-svelte": "^0.5.0", - "prismjs": "^1.28.0", - "ws": "^8.8.0" + "prismjs": "^1.29.0", + "ws": "^8.12.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3941be82b..0cad8e442 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,71 +1,71 @@ lockfileVersion: 5.4 specifiers: - '@fontsource/roboto-mono': ^4.5.7 + '@fontsource/roboto-mono': ^4.5.10 '@playwright/test': ^1.30.0 '@sveltejs/adapter-auto': 1.0.0-next.90 - '@sveltejs/adapter-vercel': 1.0.0-next.85 - '@sveltejs/kit': next - '@sveltejs/site-kit': ^3.0.3 + '@sveltejs/adapter-vercel': 2.0.4 + '@sveltejs/kit': ^1.7.2 + '@sveltejs/site-kit': ^3.2.2 '@types/diff': ^5.0.2 '@types/marked': ^4.0.8 '@types/prismjs': ^1.26.0 - '@types/ws': ^8.5.3 + '@types/ws': ^8.5.4 '@webcontainer/api': ^0.0.8 - adm-zip: ^0.5.9 + adm-zip: ^0.5.10 base64-js: ^1.5.1 diff: ^5.1.0 - esbuild: ^0.14.43 - marked: ^4.0.16 + esbuild: ^0.17.9 + marked: ^4.2.12 monaco-editor: ^0.33.0 port-authority: ^2.0.1 - prettier: ^2.6.2 - prettier-plugin-svelte: ^2.7.0 + prettier: ^2.8.4 + prettier-plugin-svelte: ^2.9.0 prism-svelte: ^0.5.0 - prismjs: ^1.28.0 - svelte: ^3.54.0 - svelte-check: ^2.7.2 + prismjs: ^1.29.0 + svelte: ^3.55.1 + svelte-check: ^2.10.3 tiny-glob: ^0.2.9 typescript: ~4.6.4 - vite: ^4.0.0 - ws: ^8.8.0 + vite: ^4.1.3 + ws: ^8.12.1 dependencies: - '@fontsource/roboto-mono': 4.5.8 + '@fontsource/roboto-mono': 4.5.10 '@webcontainer/api': 0.0.8 - adm-zip: 0.5.9 + adm-zip: 0.5.10 base64-js: 1.5.1 - marked: 4.2.4 + marked: 4.2.12 monaco-editor: 0.33.0 port-authority: 2.0.1 prism-svelte: 0.5.0 prismjs: 1.29.0 - ws: 8.11.0 + ws: 8.12.1 devDependencies: '@playwright/test': 1.30.0 '@sveltejs/adapter-auto': 1.0.0-next.90 - '@sveltejs/adapter-vercel': 1.0.0-next.85 - '@sveltejs/kit': 1.0.0-next.589_svelte@3.54.0+vite@4.0.0 - '@sveltejs/site-kit': 3.0.3 + '@sveltejs/adapter-vercel': 2.0.4_@sveltejs+kit@1.7.2 + '@sveltejs/kit': 1.7.2_svelte@3.55.1+vite@4.1.3 + '@sveltejs/site-kit': 3.2.2 '@types/diff': 5.0.2 '@types/marked': 4.0.8 '@types/prismjs': 1.26.0 - '@types/ws': 8.5.3 + '@types/ws': 8.5.4 diff: 5.1.0 - esbuild: 0.14.54 - prettier: 2.8.1 - prettier-plugin-svelte: 2.9.0_sro2v6ld777payjtkjtiuogcxi - svelte: 3.54.0 - svelte-check: 2.10.2_svelte@3.54.0 + esbuild: 0.17.9 + prettier: 2.8.4 + prettier-plugin-svelte: 2.9.0_jrsxveqmsx2uadbqiuq74wlc4u + svelte: 3.55.1 + svelte-check: 2.10.3_svelte@3.55.1 tiny-glob: 0.2.9 typescript: 4.6.4 - vite: 4.0.0 + vite: 4.1.3 packages: - /@esbuild/android-arm/0.16.4: - resolution: {integrity: sha512-rZzb7r22m20S1S7ufIc6DC6W659yxoOrl7sKP1nCYhuvUlnCFHVSbATG4keGUtV8rDz11sRRDbWkvQZpzPaHiw==} + /@esbuild/android-arm/0.16.17: + resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -73,8 +73,17 @@ packages: dev: true optional: true - /@esbuild/android-arm64/0.16.4: - resolution: {integrity: sha512-VPuTzXFm/m2fcGfN6CiwZTlLzxrKsWbPkG7ArRFpuxyaHUm/XFHQPD4xNwZT6uUmpIHhnSjcaCmcla8COzmZ5Q==} + /@esbuild/android-arm/0.17.9: + resolution: {integrity: sha512-efHnZVJldh2e18fK40RYzYTTRDzZ0QgL9V/73PSsAH43BauvjVwkqSHPhbcn77H0EQOUM2JPuO/XCg7jcKt94A==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64/0.16.17: + resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -82,8 +91,17 @@ packages: dev: true optional: true - /@esbuild/android-x64/0.16.4: - resolution: {integrity: sha512-MW+B2O++BkcOfMWmuHXB15/l1i7wXhJFqbJhp82IBOais8RBEQv2vQz/jHrDEHaY2X0QY7Wfw86SBL2PbVOr0g==} + /@esbuild/android-arm64/0.17.9: + resolution: {integrity: sha512-bqds/6lXsCA7JhHGKIM/R80sy3BAIBR0HWyeas0bW57QVHT3Rz5sf4oUVS4ZsmN+J+8IgNnaIT2PXZ0pnRcLKg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64/0.16.17: + resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -91,8 +109,26 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64/0.16.4: - resolution: {integrity: sha512-a28X1O//aOfxwJVZVs7ZfM8Tyih2Za4nKJrBwW5Wm4yKsnwBy9aiS/xwpxiiTRttw3EaTg4Srerhcm6z0bu9Wg==} + /@esbuild/android-x64/0.17.9: + resolution: {integrity: sha512-pP+MLR/k8BAYZuOqEkjAaQd9/pzbNS52pNFiXgdiCHb/16u6o7s0rPF8vPlVg+1s8ii+M6HrymL4534xYwCQCA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.16.17: + resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64/0.17.9: + resolution: {integrity: sha512-Gdbnu/RCIGHE/zqLHZwujTXnHz0lBQxK9+llrbxm5tO46CMhqiOhUuA5Zt6q2imULNoPJtxmhspHSAQtcx2pkw==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -100,8 +136,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64/0.16.4: - resolution: {integrity: sha512-e3doCr6Ecfwd7VzlaQqEPrnbvvPjE9uoTpxG5pyLzr2rI2NMjDHmvY1E5EO81O/e9TUOLLkXA5m6T8lfjK9yAA==} + /@esbuild/darwin-x64/0.16.17: + resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -109,8 +145,26 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64/0.16.4: - resolution: {integrity: sha512-Oup3G/QxBgvvqnXWrBed7xxkFNwAwJVHZcklWyQt7YCAL5bfUkaa6FVWnR78rNQiM8MqqLiT6ZTZSdUFuVIg1w==} + /@esbuild/darwin-x64/0.17.9: + resolution: {integrity: sha512-GEZsUsDjJnCTVWuaq1cJ1Y3oV9GmNj/h4j6jA29VYSip7S7nSSiAo4dQFBJg734QKZZFos8fHc4abJpoN2ebGw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.16.17: + resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64/0.17.9: + resolution: {integrity: sha512-l3v6bZdpZIG4RpNKObqNqJhDvqQO5JqQlU2S+KyMCbf0xQhYCbTuhu5kKY8hndM1oKhmqq6VfPWhOSf6P3XT/g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -118,8 +172,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64/0.16.4: - resolution: {integrity: sha512-vAP+eYOxlN/Bpo/TZmzEQapNS8W1njECrqkTpNgvXskkkJC2AwOXwZWai/Kc2vEFZUXQttx6UJbj9grqjD/+9Q==} + /@esbuild/freebsd-x64/0.16.17: + resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -127,8 +181,26 @@ packages: dev: true optional: true - /@esbuild/linux-arm/0.16.4: - resolution: {integrity: sha512-A47ZmtpIPyERxkSvIv+zLd6kNIOtJH03XA0Hy7jaceRDdQaQVGSDt4mZqpWqJYgDk9rg96aglbF6kCRvPGDSUA==} + /@esbuild/freebsd-x64/0.17.9: + resolution: {integrity: sha512-o/qhS0gbIdS0AjgiT0mbdiRIyNVRD31N81c1H7NNM4p6jVkSvScqo0v9eYJ+30mPhJsL26BwSNiuFJzD/SCyuw==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.16.17: + resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm/0.17.9: + resolution: {integrity: sha512-AhSVW1uIbcXssQ1D+Mn0txGgcxU32ikvIxuqkmjLC7dUpcX0JuwkPgdqTOicuBjG06GV4WvXSHcKCBUjN+oBxA==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -136,8 +208,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64/0.16.4: - resolution: {integrity: sha512-2zXoBhv4r5pZiyjBKrOdFP4CXOChxXiYD50LRUU+65DkdS5niPFHbboKZd/c81l0ezpw7AQnHeoCy5hFrzzs4g==} + /@esbuild/linux-arm64/0.16.17: + resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -145,8 +217,26 @@ packages: dev: true optional: true - /@esbuild/linux-ia32/0.16.4: - resolution: {integrity: sha512-uxdSrpe9wFhz4yBwt2kl2TxS/NWEINYBUFIxQtaEVtglm1eECvsj1vEKI0KX2k2wCe17zDdQ3v+jVxfwVfvvjw==} + /@esbuild/linux-arm64/0.17.9: + resolution: {integrity: sha512-o3bvDJn9txfMxrCVJATbL3NeksMT9MGqSN7vTeG9g+387rDzfUiWpF5CN/L0MoI3QTicTydEDOx0PVX8/q+nCA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.16.17: + resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32/0.17.9: + resolution: {integrity: sha512-fh3Eb+jMHDJUd08vEYL8swRT7zJo4lhrcG8NYuosHVeT49XQ0Bn9xLMtgtYXjCw5aB11aphAUwnzawvDqJCqTQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -154,8 +244,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.14.54: - resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==} + /@esbuild/linux-loong64/0.16.17: + resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -163,8 +253,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64/0.16.4: - resolution: {integrity: sha512-peDrrUuxbZ9Jw+DwLCh/9xmZAk0p0K1iY5d2IcwmnN+B87xw7kujOkig6ZRcZqgrXgeRGurRHn0ENMAjjD5DEg==} + /@esbuild/linux-loong64/0.17.9: + resolution: {integrity: sha512-+DvqOzQLkXonfQTHo4PTlbiTCfz0Rx6oYn3fQrUlPX2PffGOth4HjuP4jHeFbw0YFfOErhjM6n481nB4VTmmFQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -172,8 +262,17 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el/0.16.4: - resolution: {integrity: sha512-sD9EEUoGtVhFjjsauWjflZklTNr57KdQ6xfloO4yH1u7vNQlOfAlhEzbyBKfgbJlW7rwXYBdl5/NcZ+Mg2XhQA==} + /@esbuild/linux-mips64el/0.16.17: + resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el/0.17.9: + resolution: {integrity: sha512-9O0HhtxRzx9OOqavv7kIONncJXxhzrbDFmOD+cJ/3UUsy8dn52J6X2xCeUOxbmEOXYP2K+uha7b1AXG/URhF5Q==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -181,8 +280,17 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64/0.16.4: - resolution: {integrity: sha512-X1HSqHUX9D+d0l6/nIh4ZZJ94eQky8d8z6yxAptpZE3FxCWYWvTDd9X9ST84MGZEJx04VYUD/AGgciddwO0b8g==} + /@esbuild/linux-ppc64/0.16.17: + resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64/0.17.9: + resolution: {integrity: sha512-tOwSTDZ0X5rcYK3OyfJVf4fFlvYLv3HGCOJxdE9gZVeRkXXd6O9CJ/A4Li1Tt9JQs9kJcFWCXxCwhY70h+t9iw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -190,8 +298,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64/0.16.4: - resolution: {integrity: sha512-97ANpzyNp0GTXCt6SRdIx1ngwncpkV/z453ZuxbnBROCJ5p/55UjhbaG23UdHj88fGWLKPFtMoU4CBacz4j9FA==} + /@esbuild/linux-riscv64/0.16.17: + resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -199,8 +307,17 @@ packages: dev: true optional: true - /@esbuild/linux-s390x/0.16.4: - resolution: {integrity: sha512-pUvPQLPmbEeJRPjP0DYTC1vjHyhrnCklQmCGYbipkep+oyfTn7GTBJXoPodR7ZS5upmEyc8lzAkn2o29wD786A==} + /@esbuild/linux-riscv64/0.17.9: + resolution: {integrity: sha512-mmirCaZItLSPw7loFPHvdDXO0A2I+cYOQ96eerbWEjqi9V4u+vvYSoUR3Or7HLe1JUZS+T0YWN+jPUASc1hqzg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x/0.16.17: + resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -208,8 +325,26 @@ packages: dev: true optional: true - /@esbuild/linux-x64/0.16.4: - resolution: {integrity: sha512-N55Q0mJs3Sl8+utPRPBrL6NLYZKBCLLx0bme/+RbjvMforTGGzFvsRl4xLTZMUBFC1poDzBEPTEu5nxizQ9Nlw==} + /@esbuild/linux-s390x/0.17.9: + resolution: {integrity: sha512-zuL5TDhxstsvxYVZ1McsnfNrO6vlpZmxiNShJmYuYPt8COBJ/4iRkwHZ5Rbf1OkEVazB3/WASNtopv1/Gq19IQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.16.17: + resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64/0.17.9: + resolution: {integrity: sha512-jVa5NKqwBmq57aNDZOSnNuRTV5GrI93HdjTlyQyRrOs7OSEQq2r9NyaGd6KmzuxLz19XTanFt4WeGoLnjFT1Ug==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -217,8 +352,17 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64/0.16.4: - resolution: {integrity: sha512-LHSJLit8jCObEQNYkgsDYBh2JrJT53oJO2HVdkSYLa6+zuLJh0lAr06brXIkljrlI+N7NNW1IAXGn/6IZPi3YQ==} + /@esbuild/netbsd-x64/0.16.17: + resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64/0.17.9: + resolution: {integrity: sha512-BRoQyPJ7aiQ7USFCtGmmrYTbRDa9muZAwoYchfqspd+ef8n2kKcXGQ0K2OqcLEqNFOwhLpAY4y4YAl22FbP+BA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -226,8 +370,17 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64/0.16.4: - resolution: {integrity: sha512-nLgdc6tWEhcCFg/WVFaUxHcPK3AP/bh+KEwKtl69Ay5IBqUwKDaq/6Xk0E+fh/FGjnLwqFSsarsbPHeKM8t8Sw==} + /@esbuild/openbsd-x64/0.16.17: + resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64/0.17.9: + resolution: {integrity: sha512-gDCVw9M2k8tyA9GokQEeh+L2gl0EZeGIIj5WB5H97Mb0ADq5Ea8vWyQs2iY1Q/tebcuP8cUoOZWxkCsmlyl1NA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -235,8 +388,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64/0.16.4: - resolution: {integrity: sha512-08SluG24GjPO3tXKk95/85n9kpyZtXCVwURR2i4myhrOfi3jspClV0xQQ0W0PYWHioJj+LejFMt41q+PG3mlAQ==} + /@esbuild/sunos-x64/0.16.17: + resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -244,8 +397,17 @@ packages: dev: true optional: true - /@esbuild/win32-arm64/0.16.4: - resolution: {integrity: sha512-yYiRDQcqLYQSvNQcBKN7XogbrSvBE45FEQdH8fuXPl7cngzkCvpsG2H9Uey39IjQ6gqqc+Q4VXYHsQcKW0OMjQ==} + /@esbuild/sunos-x64/0.17.9: + resolution: {integrity: sha512-f89/xt0Hzp7POTDJYSJvotyFXatxXBGXJyFFTQGJW+NTYhFHaMcrrb41OB3L8sfzYi3PSlM3pZnwlEk1QiBX2g==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64/0.16.17: + resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -253,8 +415,26 @@ packages: dev: true optional: true - /@esbuild/win32-ia32/0.16.4: - resolution: {integrity: sha512-5rabnGIqexekYkh9zXG5waotq8mrdlRoBqAktjx2W3kb0zsI83mdCwrcAeKYirnUaTGztR5TxXcXmQrEzny83w==} + /@esbuild/win32-arm64/0.17.9: + resolution: {integrity: sha512-jrU/SBHXc3NPS5mPgYeL8pgIrBTwdrnaoLtygkQtuPzz0oBjsTyxV46tZoOctv4Q1Jq06+4zsJWkTzVaoik8FQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.16.17: + resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32/0.17.9: + resolution: {integrity: sha512-/oVEu7DurNFM0E6qA18R8xkbYU6xilaTnqG65rqm4XJo8ONuqTzLnj/93bQps7RJIxPI+yKPl0Zx2KifvWUa5A==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -262,8 +442,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64/0.16.4: - resolution: {integrity: sha512-sN/I8FMPtmtT2Yw+Dly8Ur5vQ5a/RmC8hW7jO9PtPSQUPkowxWpcUZnqOggU7VwyT3Xkj6vcXWd3V/qTXwultQ==} + /@esbuild/win32-x64/0.16.17: + resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -271,8 +451,17 @@ packages: dev: true optional: true - /@fontsource/roboto-mono/4.5.8: - resolution: {integrity: sha512-AW44UkbQD0w1CT5mzDbsvhGZ6/bb0YmZzoELj6Sx8vcVEzcbYGUdt2Dtl5zqlOuYMWQFY1mniwWyVv+Bm/lVxw==} + /@esbuild/win32-x64/0.17.9: + resolution: {integrity: sha512-PLKuXKwlPljFrzzsUO6hHNWcYeE4a8FOX/6AJ7U7PajgKqtBGw2mGYxsfJHGb+UdfgdOapIOsYPgzMTG+SGDrg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@fontsource/roboto-mono/4.5.10: + resolution: {integrity: sha512-KrJdmkqz6DszT2wV/bbhXef4r0hV3B0vw2mAqei8A2kRnvq+gcJLmmIeQ94vu9VEXrUQzos5M9lH1TAAXpRphw==} dev: false /@jridgewell/resolve-uri/3.1.0: @@ -298,7 +487,7 @@ packages: detect-libc: 2.0.1 https-proxy-agent: 5.0.1 make-dir: 3.1.0 - node-fetch: 2.6.7 + node-fetch: 2.6.9 nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 @@ -327,7 +516,7 @@ packages: engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.14.0 + fastq: 1.15.0 dev: true /@playwright/test/1.30.0: @@ -335,7 +524,7 @@ packages: engines: {node: '>=14'} hasBin: true dependencies: - '@types/node': 18.11.13 + '@types/node': 18.14.0 playwright-core: 1.30.0 dev: true @@ -354,52 +543,55 @@ packages: /@sveltejs/adapter-auto/1.0.0-next.90: resolution: {integrity: sha512-qxH46Oqqn40998wTmnbffONI0HcW/kiZ3OIjZoysjONne+LU4uEsG425MZ2RHDxmR04zxhsdjCAsn6B4du8D7w==} dependencies: - import-meta-resolve: 2.2.0 + import-meta-resolve: 2.2.1 dev: true - /@sveltejs/adapter-vercel/1.0.0-next.85: - resolution: {integrity: sha512-vTR/PcJaYI3DQmYtrY49VfBmLC1kqXn7tKXj9tzUaiuKZ/r625P7cvm4pBoEbyTYmNwlW71hObqtkESUIMIZOg==} + /@sveltejs/adapter-vercel/2.0.4_@sveltejs+kit@1.7.2: + resolution: {integrity: sha512-5tN3sCMQtN/ZV7O26hEVpylIZMMPNkDaDmXxDdEyUZGYpO9x9FOa2CN1CbMQBBGAiCuMxgmtjlWFz4GkYXRU+Q==} + peerDependencies: + '@sveltejs/kit': ^1.5.0 dependencies: - '@vercel/nft': 0.22.5 - esbuild: 0.16.4 + '@sveltejs/kit': 1.7.2_svelte@3.55.1+vite@4.1.3 + '@vercel/nft': 0.22.6 + esbuild: 0.16.17 transitivePeerDependencies: - encoding - supports-color dev: true - /@sveltejs/kit/1.0.0-next.589_svelte@3.54.0+vite@4.0.0: - resolution: {integrity: sha512-5ABRw46z9B+cCe/YWhcx+I/azNZg1NCDEkVJifZn8ToFoJ3a1eP0OexNIrvMEWpllMbNMPcJm2TC9tnz9oPfWQ==} - engines: {node: '>=16.14'} + /@sveltejs/kit/1.7.2_svelte@3.55.1+vite@4.1.3: + resolution: {integrity: sha512-qU/kbupIhsA1JA0GIN4cGa6XrhzPc99Z4agsEDeGPMy7qQqYCuFcIL2MLEH+tfqPUCu4m3FQ6ULVSUIVCnHj+A==} + engines: {node: ^16.14 || >=18} hasBin: true requiresBuild: true peerDependencies: svelte: ^3.54.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.54.0+vite@4.0.0 + '@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.55.1+vite@4.1.3 '@types/cookie': 0.5.1 cookie: 0.5.0 - devalue: 4.2.0 + devalue: 4.3.0 esm-env: 1.0.0 kleur: 4.1.5 - magic-string: 0.27.0 + magic-string: 0.29.0 mime: 3.0.0 sade: 1.8.1 set-cookie-parser: 2.5.1 sirv: 2.0.2 - svelte: 3.54.0 + svelte: 3.55.1 tiny-glob: 0.2.9 - undici: 5.14.0 - vite: 4.0.0 + undici: 5.19.1 + vite: 4.1.3 transitivePeerDependencies: - supports-color dev: true - /@sveltejs/site-kit/3.0.3: - resolution: {integrity: sha512-zetnU9jGOu+DYcwqpgK9uSUv3qrGrL7JagMN7M8B4bQRoBq1lAPnCvBXtlfQckvkQLtH453JJTIX6ULqL1xtpA==} + /@sveltejs/site-kit/3.2.2: + resolution: {integrity: sha512-HBLtfNdLr5Ykl8i8CvJcYjib7zMIJupg4T/omplp3ccpgpiUh26tk71vRG1+a6yMkfbfy0ShoPb9uwNril5cnw==} dev: true - /@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.54.0+vite@4.0.0: + /@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.55.1+vite@4.1.3: resolution: {integrity: sha512-xCEan0/NNpQuL0l5aS42FjwQ6wwskdxC3pW1OeFtEKNZwRg7Evro9lac9HesGP6TdFsTv2xMes5ASQVKbCacxg==} engines: {node: ^14.18.0 || >= 16} peerDependencies: @@ -407,13 +599,13 @@ packages: vite: ^4.0.0 dependencies: debug: 4.3.4 - deepmerge: 4.2.2 + deepmerge: 4.3.0 kleur: 4.1.5 magic-string: 0.27.0 - svelte: 3.54.0 - svelte-hmr: 0.15.1_svelte@3.54.0 - vite: 4.0.0 - vitefu: 0.2.3_vite@4.0.0 + svelte: 3.55.1 + svelte-hmr: 0.15.1_svelte@3.55.1 + vite: 4.1.3 + vitefu: 0.2.4_vite@4.1.3 transitivePeerDependencies: - supports-color dev: true @@ -430,8 +622,8 @@ packages: resolution: {integrity: sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==} dev: true - /@types/node/18.11.13: - resolution: {integrity: sha512-IASpMGVcWpUsx5xBOrxMj7Bl8lqfuTY7FKAnPmu5cHkfQVWF8GulWS1jbRqA934qZL35xh5xN/+Xe/i26Bod4w==} + /@types/node/18.14.0: + resolution: {integrity: sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==} dev: true /@types/prismjs/1.26.0: @@ -445,30 +637,30 @@ packages: /@types/sass/1.43.1: resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} dependencies: - '@types/node': 18.11.13 + '@types/node': 18.14.0 dev: true - /@types/ws/8.5.3: - resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} + /@types/ws/8.5.4: + resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 18.11.13 + '@types/node': 18.14.0 dev: true - /@vercel/nft/0.22.5: - resolution: {integrity: sha512-mug57Wd1BL7GMj9gXMgMeKUjdqO0e4u+0QLPYMFE1rwdJ+55oPy6lp3nIBCS8gOvigT62UI4QKUL2sGqcoW4Hw==} + /@vercel/nft/0.22.6: + resolution: {integrity: sha512-gTsFnnT4mGxodr4AUlW3/urY+8JKKB452LwF3m477RFUJTAaDmcz2JqFuInzvdybYIeyIv1sSONEJxsxnbQ5JQ==} engines: {node: '>=14'} hasBin: true dependencies: '@mapbox/node-pre-gyp': 1.0.10 '@rollup/pluginutils': 4.2.1 - acorn: 8.8.1 + acorn: 8.8.2 async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 glob: 7.2.3 graceful-fs: 4.2.10 micromatch: 4.0.5 - node-gyp-build: 4.5.0 + node-gyp-build: 4.6.0 resolve-from: 5.0.0 transitivePeerDependencies: - encoding @@ -483,14 +675,14 @@ packages: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: true - /acorn/8.8.1: - resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==} + /acorn/8.8.2: + resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} engines: {node: '>=0.4.0'} hasBin: true dev: true - /adm-zip/0.5.9: - resolution: {integrity: sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==} + /adm-zip/0.5.10: + resolution: {integrity: sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ==} engines: {node: '>=6.0'} dev: false @@ -631,8 +823,8 @@ packages: ms: 2.1.2 dev: true - /deepmerge/4.2.2: - resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} + /deepmerge/4.3.0: + resolution: {integrity: sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==} engines: {node: '>=0.10.0'} dev: true @@ -650,8 +842,8 @@ packages: engines: {node: '>=8'} dev: true - /devalue/4.2.0: - resolution: {integrity: sha512-mbjoAaCL2qogBKgeFxFPOXAUsZchircF+B/79LD4sHH0+NHfYm8gZpQrskKDn5gENGt35+5OI1GUF7hLVnkPDw==} + /devalue/4.3.0: + resolution: {integrity: sha512-n94yQo4LI3w7erwf84mhRUkUJfhLoCZiLyoOZ/QFsDbcWNZePrLwbQpvZBUG2TNxwV3VjCKPxkiiQA6pe3TrTA==} dev: true /diff/5.1.0: @@ -667,243 +859,64 @@ packages: resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} dev: true - /esbuild-android-64/0.14.54: - resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-android-arm64/0.14.54: - resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-64/0.14.54: - resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-darwin-arm64/0.14.54: - resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-64/0.14.54: - resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-freebsd-arm64/0.14.54: - resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-32/0.14.54: - resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-64/0.14.54: - resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm/0.14.54: - resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-arm64/0.14.54: - resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-mips64le/0.14.54: - resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-ppc64le/0.14.54: - resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-riscv64/0.14.54: - resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-linux-s390x/0.14.54: - resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /esbuild-netbsd-64/0.14.54: - resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-openbsd-64/0.14.54: - resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /esbuild-sunos-64/0.14.54: - resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-32/0.14.54: - resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-64/0.14.54: - resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild-windows-arm64/0.14.54: - resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /esbuild/0.14.54: - resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==} + /esbuild/0.16.17: + resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/linux-loong64': 0.14.54 - esbuild-android-64: 0.14.54 - esbuild-android-arm64: 0.14.54 - esbuild-darwin-64: 0.14.54 - esbuild-darwin-arm64: 0.14.54 - esbuild-freebsd-64: 0.14.54 - esbuild-freebsd-arm64: 0.14.54 - esbuild-linux-32: 0.14.54 - esbuild-linux-64: 0.14.54 - esbuild-linux-arm: 0.14.54 - esbuild-linux-arm64: 0.14.54 - esbuild-linux-mips64le: 0.14.54 - esbuild-linux-ppc64le: 0.14.54 - esbuild-linux-riscv64: 0.14.54 - esbuild-linux-s390x: 0.14.54 - esbuild-netbsd-64: 0.14.54 - esbuild-openbsd-64: 0.14.54 - esbuild-sunos-64: 0.14.54 - esbuild-windows-32: 0.14.54 - esbuild-windows-64: 0.14.54 - esbuild-windows-arm64: 0.14.54 - dev: true - - /esbuild/0.16.4: - resolution: {integrity: sha512-qQrPMQpPTWf8jHugLWHoGqZjApyx3OEm76dlTXobHwh/EBbavbRdjXdYi/GWr43GyN0sfpap14GPkb05NH3ROA==} + '@esbuild/android-arm': 0.16.17 + '@esbuild/android-arm64': 0.16.17 + '@esbuild/android-x64': 0.16.17 + '@esbuild/darwin-arm64': 0.16.17 + '@esbuild/darwin-x64': 0.16.17 + '@esbuild/freebsd-arm64': 0.16.17 + '@esbuild/freebsd-x64': 0.16.17 + '@esbuild/linux-arm': 0.16.17 + '@esbuild/linux-arm64': 0.16.17 + '@esbuild/linux-ia32': 0.16.17 + '@esbuild/linux-loong64': 0.16.17 + '@esbuild/linux-mips64el': 0.16.17 + '@esbuild/linux-ppc64': 0.16.17 + '@esbuild/linux-riscv64': 0.16.17 + '@esbuild/linux-s390x': 0.16.17 + '@esbuild/linux-x64': 0.16.17 + '@esbuild/netbsd-x64': 0.16.17 + '@esbuild/openbsd-x64': 0.16.17 + '@esbuild/sunos-x64': 0.16.17 + '@esbuild/win32-arm64': 0.16.17 + '@esbuild/win32-ia32': 0.16.17 + '@esbuild/win32-x64': 0.16.17 + dev: true + + /esbuild/0.17.9: + resolution: {integrity: sha512-m3b2MR76QkwKPw/KQBlBJVaIncfQhhXsDMCFPoyqEOIziV+O7BAKqOYT1NbHsnFUX0/98CLWxUfM5stzh4yq4Q==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.16.4 - '@esbuild/android-arm64': 0.16.4 - '@esbuild/android-x64': 0.16.4 - '@esbuild/darwin-arm64': 0.16.4 - '@esbuild/darwin-x64': 0.16.4 - '@esbuild/freebsd-arm64': 0.16.4 - '@esbuild/freebsd-x64': 0.16.4 - '@esbuild/linux-arm': 0.16.4 - '@esbuild/linux-arm64': 0.16.4 - '@esbuild/linux-ia32': 0.16.4 - '@esbuild/linux-loong64': 0.16.4 - '@esbuild/linux-mips64el': 0.16.4 - '@esbuild/linux-ppc64': 0.16.4 - '@esbuild/linux-riscv64': 0.16.4 - '@esbuild/linux-s390x': 0.16.4 - '@esbuild/linux-x64': 0.16.4 - '@esbuild/netbsd-x64': 0.16.4 - '@esbuild/openbsd-x64': 0.16.4 - '@esbuild/sunos-x64': 0.16.4 - '@esbuild/win32-arm64': 0.16.4 - '@esbuild/win32-ia32': 0.16.4 - '@esbuild/win32-x64': 0.16.4 + '@esbuild/android-arm': 0.17.9 + '@esbuild/android-arm64': 0.17.9 + '@esbuild/android-x64': 0.17.9 + '@esbuild/darwin-arm64': 0.17.9 + '@esbuild/darwin-x64': 0.17.9 + '@esbuild/freebsd-arm64': 0.17.9 + '@esbuild/freebsd-x64': 0.17.9 + '@esbuild/linux-arm': 0.17.9 + '@esbuild/linux-arm64': 0.17.9 + '@esbuild/linux-ia32': 0.17.9 + '@esbuild/linux-loong64': 0.17.9 + '@esbuild/linux-mips64el': 0.17.9 + '@esbuild/linux-ppc64': 0.17.9 + '@esbuild/linux-riscv64': 0.17.9 + '@esbuild/linux-s390x': 0.17.9 + '@esbuild/linux-x64': 0.17.9 + '@esbuild/netbsd-x64': 0.17.9 + '@esbuild/openbsd-x64': 0.17.9 + '@esbuild/sunos-x64': 0.17.9 + '@esbuild/win32-arm64': 0.17.9 + '@esbuild/win32-ia32': 0.17.9 + '@esbuild/win32-x64': 0.17.9 dev: true /esm-env/1.0.0: @@ -925,8 +938,8 @@ packages: micromatch: 4.0.5 dev: true - /fastq/1.14.0: - resolution: {integrity: sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==} + /fastq/1.15.0: + resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: reusify: 1.0.4 dev: true @@ -1039,8 +1052,8 @@ packages: resolve-from: 4.0.0 dev: true - /import-meta-resolve/2.2.0: - resolution: {integrity: sha512-CpPOtiCHxP9HdtDM5F45tNiAe66Cqlv3f5uHoJjt+KlaLrUh9/Wz9vepADZ78SlqEo62aDWZtj9ydMGXV+CPnw==} + /import-meta-resolve/2.2.1: + resolution: {integrity: sha512-C6lLL7EJPY44kBvA80gq4uMsVFw5x3oSKfuMl1cuZ2RkI5+UJqQXgn+6hlUew0y4ig7Ypt4CObAAIzU53Nfpuw==} dev: true /inflight/1.0.6: @@ -1114,6 +1127,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true + /magic-string/0.29.0: + resolution: {integrity: sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -1121,8 +1141,8 @@ packages: semver: 6.3.0 dev: true - /marked/4.2.4: - resolution: {integrity: sha512-Wcc9ikX7Q5E4BYDPvh1C6QNSxrjC9tBgz+A/vAhp59KXUgachw++uMvMKiSW8oA85nopmPZcEvBoex/YLMsiyA==} + /marked/4.2.12: + resolution: {integrity: sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==} engines: {node: '>= 12'} hasBin: true dev: false @@ -1157,8 +1177,8 @@ packages: brace-expansion: 1.1.11 dev: true - /minimist/1.2.7: - resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} + /minimist/1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: true /minipass/3.3.6: @@ -1168,11 +1188,9 @@ packages: yallist: 4.0.0 dev: true - /minipass/4.0.0: - resolution: {integrity: sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==} + /minipass/4.0.3: + resolution: {integrity: sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==} engines: {node: '>=8'} - dependencies: - yallist: 4.0.0 dev: true /minizlib/2.1.2: @@ -1187,7 +1205,7 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: - minimist: 1.2.7 + minimist: 1.2.8 dev: true /mkdirp/1.0.4: @@ -1220,8 +1238,8 @@ packages: hasBin: true dev: true - /node-fetch/2.6.7: - resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + /node-fetch/2.6.9: + resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 @@ -1232,8 +1250,8 @@ packages: whatwg-url: 5.0.0 dev: true - /node-gyp-build/4.5.0: - resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} + /node-gyp-build/4.6.0: + resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==} hasBin: true dev: true @@ -1305,8 +1323,8 @@ packages: resolution: {integrity: sha512-Hz/WvSNt5+7x+Rq1Cn6DetJOZxKtLDehJ1mLCYge6ju4QvSF/PHvRgy94e1SKJVI96AJTcqEdNwkkaAFad+TXQ==} dev: false - /postcss/8.4.19: - resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==} + /postcss/8.4.21: + resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.4 @@ -1314,18 +1332,18 @@ packages: source-map-js: 1.0.2 dev: true - /prettier-plugin-svelte/2.9.0_sro2v6ld777payjtkjtiuogcxi: + /prettier-plugin-svelte/2.9.0_jrsxveqmsx2uadbqiuq74wlc4u: resolution: {integrity: sha512-3doBi5NO4IVgaNPtwewvrgPpqAcvNv0NwJNflr76PIGgi9nf1oguQV1Hpdm9TI2ALIQVn/9iIwLpBO5UcD2Jiw==} peerDependencies: prettier: ^1.16.4 || ^2.0.0 svelte: ^3.2.0 dependencies: - prettier: 2.8.1 - svelte: 3.54.0 + prettier: 2.8.4 + svelte: 3.55.1 dev: true - /prettier/2.8.1: - resolution: {integrity: sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==} + /prettier/2.8.4: + resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==} engines: {node: '>=10.13.0'} hasBin: true dev: true @@ -1397,8 +1415,8 @@ packages: glob: 7.2.3 dev: true - /rollup/3.7.3: - resolution: {integrity: sha512-7e68MQbAWCX6mI4/0lG1WHd+NdNAlVamg0Zkd+8LZ/oXojligdGnCNyHlzXqXCZObyjs5FRc3AH0b17iJESGIQ==} + /rollup/3.17.2: + resolution: {integrity: sha512-qMNZdlQPCkWodrAZ3qnJtvCAl4vpQ8q77uEujVCCbC/6CLB7Lcmvjq7HyiOSnf4fxTT9XgsE36oLHJBH49xjqA==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -1470,7 +1488,7 @@ packages: hasBin: true dependencies: buffer-crc32: 0.2.13 - minimist: 1.2.7 + minimist: 1.2.8 sander: 0.5.1 sourcemap-codec: 1.4.8 dev: true @@ -1524,8 +1542,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check/2.10.2_svelte@3.54.0: - resolution: {integrity: sha512-h1Tuiir0m8J5yqN+Vx6qgKKk1L871e6a9o7rMwVWfu8Qs6Wg7x2R+wcxS3SO3VpW5JCxCat90rxPsZMYgz+HaQ==} + /svelte-check/2.10.3_svelte@3.55.1: + resolution: {integrity: sha512-Nt1aWHTOKFReBpmJ1vPug0aGysqPwJh2seM1OvICfM2oeyaA62mOiy5EvkXhltGfhCcIQcq2LoE0l1CwcWPjlw==} hasBin: true peerDependencies: svelte: ^3.24.0 @@ -1536,8 +1554,8 @@ packages: import-fresh: 3.3.0 picocolors: 1.0.0 sade: 1.8.1 - svelte: 3.54.0 - svelte-preprocess: 4.10.7_gk4i2giaum4t5l5a23coockzlu + svelte: 3.55.1 + svelte-preprocess: 4.10.7_2k2jvcfvwmfbmgqn6isucmjpty typescript: 4.6.4 transitivePeerDependencies: - '@babel/core' @@ -1552,16 +1570,16 @@ packages: - sugarss dev: true - /svelte-hmr/0.15.1_svelte@3.54.0: + /svelte-hmr/0.15.1_svelte@3.55.1: resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==} engines: {node: ^12.20 || ^14.13.1 || >= 16} peerDependencies: svelte: '>=3.19.0' dependencies: - svelte: 3.54.0 + svelte: 3.55.1 dev: true - /svelte-preprocess/4.10.7_gk4i2giaum4t5l5a23coockzlu: + /svelte-preprocess/4.10.7_2k2jvcfvwmfbmgqn6isucmjpty: resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==} engines: {node: '>= 9.11.2'} requiresBuild: true @@ -1608,12 +1626,12 @@ packages: magic-string: 0.25.9 sorcery: 0.10.0 strip-indent: 3.0.0 - svelte: 3.54.0 + svelte: 3.55.1 typescript: 4.6.4 dev: true - /svelte/3.54.0: - resolution: {integrity: sha512-tdrgeJU0hob0ZWAMoKXkhcxXA7dpTg6lZGxUeko5YqvPdJBiyRspGsCwV27kIrbrqPP2WUoSV9ca0gnLlw8YzQ==} + /svelte/3.55.1: + resolution: {integrity: sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==} engines: {node: '>= 8'} dev: true @@ -1623,7 +1641,7 @@ packages: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 - minipass: 4.0.0 + minipass: 4.0.3 minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 @@ -1658,8 +1676,8 @@ packages: hasBin: true dev: true - /undici/5.14.0: - resolution: {integrity: sha512-yJlHYw6yXPPsuOH0x2Ib1Km61vu4hLiRRQoafs+WUgX1vO64vgnxiCEN9dpIrhZyHFsai3F0AEj4P9zy19enEQ==} + /undici/5.19.1: + resolution: {integrity: sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A==} engines: {node: '>=12.18'} dependencies: busboy: 1.6.0 @@ -1669,8 +1687,8 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /vite/4.0.0: - resolution: {integrity: sha512-ynad+4kYs8Jcnn8J7SacS9vAbk7eMy0xWg6E7bAhS1s79TK+D7tVFGXVZ55S7RNLRROU1rxoKlvZ/qjaB41DGA==} + /vite/4.1.3: + resolution: {integrity: sha512-0Zqo4/Fr/swSOBmbl+HAAhOjrqNwju+yTtoe4hQX9UsARdcuc9njyOdr6xU0DDnV7YP0RT6mgTTOiRtZgxfCxA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -1694,23 +1712,23 @@ packages: terser: optional: true dependencies: - esbuild: 0.16.4 - postcss: 8.4.19 + esbuild: 0.16.17 + postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.7.3 + rollup: 3.17.2 optionalDependencies: fsevents: 2.3.2 dev: true - /vitefu/0.2.3_vite@4.0.0: - resolution: {integrity: sha512-75l7TTuU8isAhz1QFtNKjDkqjxvndfMC1AfIMjJ0ZQ59ZD0Ow9QOIsJJX16Wv9PS8f+zMzp6fHy5cCbKG/yVUQ==} + /vitefu/0.2.4_vite@4.1.3: + resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} peerDependencies: vite: ^3.0.0 || ^4.0.0 peerDependenciesMeta: vite: optional: true dependencies: - vite: 4.0.0 + vite: 4.1.3 dev: true /webidl-conversions/3.0.1: @@ -1734,12 +1752,12 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true - /ws/8.11.0: - resolution: {integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==} + /ws/8.12.1: + resolution: {integrity: sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 + utf-8-validate: '>=5.0.2' peerDependenciesMeta: bufferutil: optional: true diff --git a/svelte.config.js b/svelte.config.js index 80b24465e..6fecf1600 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -3,7 +3,7 @@ import adapter from '@sveltejs/adapter-vercel'; /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { - adapter: adapter({ edge: true }) + adapter: adapter({ runtime: 'edge' }) }, vitePlugin: { From 071f05941ce3766a80c866466eb4d713608e3a17 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Mon, 20 Feb 2023 21:14:35 +0100 Subject: [PATCH 004/326] chore: setup test ci (#215) * chore: setup ci * pnpm * pnpm * playwright --------- Co-authored-by: Rich Harris --- .github/workflows/node.js.yml | 33 +++++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 000000000..b03de09df --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + # we call `pnpm playwright install` instead + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2.2.4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm playwright install chromium + - run: pnpm test diff --git a/package.json b/package.json index 91cab4b73..b511a0b22 100644 --- a/package.json +++ b/package.json @@ -43,5 +43,6 @@ "prism-svelte": "^0.5.0", "prismjs": "^1.29.0", "ws": "^8.12.1" - } + }, + "packageManager": "pnpm@7.27.0" } From e4db4c2208b81f6232f71d4302354ad0b87357a6 Mon Sep 17 00:00:00 2001 From: tomoam <29677552+tomoam@users.noreply.github.com> Date: Tue, 21 Feb 2023 08:58:39 +0900 Subject: [PATCH 005/326] fix: cross-origin isolation for preview (#214) --- vite.config.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 76e505639..e752dfd43 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,6 +1,18 @@ import path from 'path'; import { sveltekit } from '@sveltejs/kit/vite'; +const crossOriginIsolationForPreview = { + name: 'cross-origin-isolation-for-preview', + configurePreviewServer: (server) => { + server.middlewares.use((_, res, next) => { + res.setHeader('cross-origin-opener-policy', 'same-origin'); + res.setHeader('cross-origin-embedder-policy', 'require-corp'); + res.setHeader('cross-origin-resource-policy', 'cross-origin'); + next(); + }); + } +}; + /** @type {import('vite').UserConfig} */ export default { build: { @@ -9,7 +21,10 @@ export default { logLevel: 'info', - plugins: [sveltekit()], + plugins: [ + sveltekit(), + crossOriginIsolationForPreview + ], server: { fs: { From 759e7d596909cf801e0d55ae7a1718cb0f8c79d5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 20 Feb 2023 18:59:07 -0500 Subject: [PATCH 006/326] move plugin inline --- vite.config.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/vite.config.js b/vite.config.js index e752dfd43..1a3c3386d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,18 +1,6 @@ import path from 'path'; import { sveltekit } from '@sveltejs/kit/vite'; -const crossOriginIsolationForPreview = { - name: 'cross-origin-isolation-for-preview', - configurePreviewServer: (server) => { - server.middlewares.use((_, res, next) => { - res.setHeader('cross-origin-opener-policy', 'same-origin'); - res.setHeader('cross-origin-embedder-policy', 'require-corp'); - res.setHeader('cross-origin-resource-policy', 'cross-origin'); - next(); - }); - } -}; - /** @type {import('vite').UserConfig} */ export default { build: { @@ -22,8 +10,20 @@ export default { logLevel: 'info', plugins: [ - sveltekit(), - crossOriginIsolationForPreview + // apply cross-origin isolation headers when previewing locally + { + name: 'cross-origin-isolation-for-preview', + configurePreviewServer: (server) => { + server.middlewares.use((_, res, next) => { + res.setHeader('cross-origin-opener-policy', 'same-origin'); + res.setHeader('cross-origin-embedder-policy', 'require-corp'); + res.setHeader('cross-origin-resource-policy', 'cross-origin'); + next(); + }); + } + }, + + sveltekit() ], server: { From 97408be15f642f078969dbd09f436fd84f4f5dfb Mon Sep 17 00:00:00 2001 From: Zafar Date: Tue, 21 Feb 2023 09:02:53 +0900 Subject: [PATCH 007/326] Add note chatbot not working in current excersize (#210) * Add note chatbot not working in current excersize * Update content/tutorial/01-svelte/07-lifecycle/03-update/README.md --------- Co-authored-by: Rich Harris --- content/tutorial/01-svelte/07-lifecycle/03-update/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/tutorial/01-svelte/07-lifecycle/03-update/README.md b/content/tutorial/01-svelte/07-lifecycle/03-update/README.md index 3c791245b..80ac16f54 100644 --- a/content/tutorial/01-svelte/07-lifecycle/03-update/README.md +++ b/content/tutorial/01-svelte/07-lifecycle/03-update/README.md @@ -2,6 +2,8 @@ title: beforeUpdate and afterUpdate --- +> The Eliza Chatbot in this exercise doesn't currently work. For now, you can use the old tutorial instead: https://svelte.dev/tutorial/update + The `beforeUpdate` function schedules work to happen immediately before the DOM is updated. `afterUpdate` is its counterpart, used for running code once the DOM is in sync with your data. Together, they're useful for doing things imperatively that are difficult to achieve in a purely state-driven way, like updating the scroll position of an element. From 8c1a86394e52cef18854cddc5dbb7d0a0d14c595 Mon Sep 17 00:00:00 2001 From: tomoam <29677552+tomoam@users.noreply.github.com> Date: Tue, 21 Feb 2023 09:40:54 +0900 Subject: [PATCH 008/326] fix: restart Vite if tutorial has a .env file (#207) * fix timed out error * Revert "fix timed out error" This reverts commit 3632ee6d1e5ceb8611fa1abd0e67899f14182a72. * add test for tutorial with a .env file * fix: restart Vite if tutorial has a .env file * Update index.js --------- Co-authored-by: Rich Harris --- src/lib/client/adapters/webcontainer/index.js | 13 ++++ tests/env_file.spec.ts | 74 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 tests/env_file.spec.ts diff --git a/src/lib/client/adapters/webcontainer/index.js b/src/lib/client/adapters/webcontainer/index.js index 77eac9e43..ceeeb290d 100644 --- a/src/lib/client/adapters/webcontainer/index.js +++ b/src/lib/client/adapters/webcontainer/index.js @@ -116,6 +116,10 @@ export async function create(stubs, callback) { let added_new_file = false; + const previous_env = /** @type {import('$lib/types').FileStub=} */ ( + current_stubs.get('/.env') + ); + /** @type {import('$lib/types').Stub[]} */ const to_write = []; @@ -175,6 +179,15 @@ export async function create(stubs, callback) { await vm.fs.rm(file, { force: true, recursive: true }); } + // Adding a `.env` file does not restart Vite, but environment variables from `.env` + // are not available until Vite is restarted. By creating a dummy `.env` file, it will + // be recognized as changed when the real `.env` file is loaded into the Webcontainer. + // This will invoke a restart of Vite. Hacky but it works. + // TODO: remove when https://github.com/vitejs/vite/issues/12127 is closed + if (!previous_env && current_stubs.has('/.env')) { + await vm.run({ command: 'touch', args: ['.env']}); + } + await vm.loadFiles(convert_stubs_to_tree(to_write)); await promise; await new Promise((f) => setTimeout(f, 200)); // wait for chokidar diff --git a/tests/env_file.spec.ts b/tests/env_file.spec.ts new file mode 100644 index 000000000..8f98e30f6 --- /dev/null +++ b/tests/env_file.spec.ts @@ -0,0 +1,74 @@ +import { expect, test, chromium } from '@playwright/test'; + +const chromium_flags = ['--enable-features=SharedArrayBuffer']; + +const iframe_selector = 'iframe[src*="webcontainer.io/"]'; + +test('.env file: no timeout error occurs when switching a tutorials without a .env file to one with it', async () => { + const context = await chromium.launchPersistentContext('', { args: chromium_flags }); + const page = context.pages()[0]; + await page.bringToFront(); + + await page.goto('/tutorial/welcome-to-svelte'); + + const iframe_locator = page.frameLocator(iframe_selector); + + // wait for the iframe to load + await iframe_locator.getByText('Welcome!').waitFor(); + + // switch to another tutorial with a .env file + await page.click('header > h1', { delay: 200 }); + await page.locator('button', { hasText: 'Part 4: Advanced SvelteKit' }).click({ delay: 200}); + await page.locator('button', { hasText: 'Environment variables' }).click({ delay: 200}); + await page.locator('a', { hasText: '$env/static/private' }).click({ delay: 200}); + + // wait for the iframe to load + await iframe_locator.getByText('enter the passphrase').waitFor(); + + // wait for a bit, because when Vite dev server is restarted, learn.svelte.dev + // will wait for 10 seconds, after which time a timeout error will occur. + await page.waitForTimeout(11000); + + // expect no timeout error + await expect(page.getByText('Yikes!')).toBeHidden(); + await expect(iframe_locator.getByText('enter the passphrase')).toBeVisible(); + + await context.close(); +}); + +test('.env file: environment variables are available when switching a tutorial without a .env file to one with it', async () => { + const context = await chromium.launchPersistentContext('', { args: chromium_flags }); + const page = context.pages()[0]; + await page.bringToFront(); + + await page.goto('/tutorial/welcome-to-svelte'); + + const iframe_locator = page.frameLocator(iframe_selector); + + // wait for the iframe to load + await iframe_locator.getByText('Welcome!').waitFor(); + + // switch to another tutorial with a .env file + await page.click('header > h1', { delay: 200 }); + await page.locator('button', { hasText: 'Part 4: Advanced SvelteKit' }).click({ delay: 200}); + await page.locator('button', { hasText: 'Environment variables' }).click({ delay: 200}); + await page.locator('a', { hasText: '$env/dynamic/private' }).click({ delay: 200}); + + // wait for the iframe to load + await iframe_locator.getByText('enter the passphrase').waitFor(); + await iframe_locator.locator('input[name="passphrase"]').waitFor(); + + await page.waitForTimeout(500); + + // login + // 'open sesame' is the environment variables loaded from `.env` file + await iframe_locator.locator('input[name="passphrase"]').fill('open sesame'); + await page.keyboard.press('Enter', { delay: 200 }); + + // expect to be able to login. + // Being able to log in means that environment variables are loaded. + await expect(iframe_locator.getByText('wrong passphrase!')).toBeHidden(); + await expect(iframe_locator.locator('button', { hasText: 'log out'})).toBeEnabled(); + + await context.close(); +}); From 5cebfd4b12e67827687864367fc8acaa5a131b99 Mon Sep 17 00:00:00 2001 From: Dan Vail <46790194+thedanvail@users.noreply.github.com> Date: Mon, 20 Feb 2023 18:41:50 -0600 Subject: [PATCH 009/326] Use 'blazingly fast' instead of 'blazing fast' (#205) --- .../01-svelte/03-props/03-spread-props/app-a/src/lib/App.svelte | 2 +- .../01-svelte/03-props/03-spread-props/app-b/src/lib/App.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/App.svelte index 2f500a521..b90c62836 100644 --- a/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/App.svelte @@ -4,7 +4,7 @@ const pkg = { name: 'svelte', version: 3, - speed: 'blazing', + speed: 'blazingly', website: 'https://svelte.dev/' }; diff --git a/content/tutorial/01-svelte/03-props/03-spread-props/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/03-props/03-spread-props/app-b/src/lib/App.svelte index 8518af09e..69420ba6a 100644 --- a/content/tutorial/01-svelte/03-props/03-spread-props/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/03-props/03-spread-props/app-b/src/lib/App.svelte @@ -4,7 +4,7 @@ const pkg = { name: 'svelte', version: 3, - speed: 'blazing', + speed: 'blazingly', website: 'https://svelte.dev/' }; From f565e2b88032ada1e9b10111914372cfabc299d9 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 20 Feb 2023 21:10:32 -0500 Subject: [PATCH 010/326] testing something (#221) * testing something * separate build from test --- .github/workflows/node.js.yml | 26 +++++++++++++------------- playwright.config.ts | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b03de09df..fa09429f6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ "main" ] + branches: ['main'] pull_request: - branches: [ "main" ] + branches: ['main'] env: # we call `pnpm playwright install` instead @@ -12,7 +12,6 @@ env: jobs: build: - runs-on: ubuntu-latest strategy: @@ -21,13 +20,14 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2.2.4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - run: pnpm install --frozen-lockfile - - run: pnpm playwright install chromium - - run: pnpm test + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2.2.4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm playwright install chromium + - run: pnpm build + - run: pnpm test diff --git a/playwright.config.ts b/playwright.config.ts index b0dfce015..3b94e6902 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -2,7 +2,7 @@ import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { webServer: { - command: 'pnpm build && pnpm preview', + command: 'pnpm preview', port: 4173 } }; From 56d29e0658b56a034fe689cdff896de04d7b2aeb Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 21 Feb 2023 13:18:18 +0100 Subject: [PATCH 011/326] docs: update Keyed Each Blocks tutorial align with https://github.com/sveltejs/svelte/pull/8188 --- .../05-keyed-each-blocks/app-a/src/lib/Thing.svelte | 7 +++++++ .../05-keyed-each-blocks/app-b/src/lib/Thing.svelte | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte index 8bf862b30..3eb272b93 100644 --- a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte +++ b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte @@ -1,4 +1,6 @@

diff --git a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte index 3445e7208..9ca6b8b17 100644 --- a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte +++ b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte @@ -1,4 +1,6 @@

From 48751dcff0a6dd86cb705e78ca394527762a8221 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 21 Feb 2023 10:06:32 -0500 Subject: [PATCH 012/326] webcontainer v1 (#220) --- package.json | 2 +- pnpm-lock.yaml | 8 +-- src/app.d.ts | 16 ++--- src/lib/client/adapters/webcontainer/index.js | 72 +++++++++---------- 4 files changed, 45 insertions(+), 53 deletions(-) diff --git a/package.json b/package.json index b511a0b22..ab9036188 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "type": "module", "dependencies": { "@fontsource/roboto-mono": "^4.5.10", - "@webcontainer/api": "^0.0.8", + "@webcontainer/api": "^1.0.2", "adm-zip": "^0.5.10", "base64-js": "^1.5.1", "marked": "^4.2.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cad8e442..c86ba99ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,7 +11,7 @@ specifiers: '@types/marked': ^4.0.8 '@types/prismjs': ^1.26.0 '@types/ws': ^8.5.4 - '@webcontainer/api': ^0.0.8 + '@webcontainer/api': ^1.0.2 adm-zip: ^0.5.10 base64-js: ^1.5.1 diff: ^5.1.0 @@ -32,7 +32,7 @@ specifiers: dependencies: '@fontsource/roboto-mono': 4.5.10 - '@webcontainer/api': 0.0.8 + '@webcontainer/api': 1.0.2 adm-zip: 0.5.10 base64-js: 1.5.1 marked: 4.2.12 @@ -667,8 +667,8 @@ packages: - supports-color dev: true - /@webcontainer/api/0.0.8: - resolution: {integrity: sha512-t285UFNMzz8mmJlfAP/mloJlN+rHuu5jmFCNW05WGT3FzJ0sNseU6WN5+TiTtWIfjiUfLPtJI6ndsgiTujkXAw==} + /@webcontainer/api/1.0.2: + resolution: {integrity: sha512-JyJSE/EuNmbv2l9M+GE254Z/s0A9Hma8gtc71co6ZznpCr1UyB70556xZapbd8fWcjOTb1sLGb0GnRx9Ofp9sA==} dev: false /abbrev/1.1.1: diff --git a/src/app.d.ts b/src/app.d.ts index 657780a03..f59b884c5 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,12 +1,12 @@ -/// - // See https://kit.svelte.dev/docs/types#app // for information about these interfaces -declare namespace App { - // interface Locals {} - // interface Platform {} - // interface Session {} - interface Stuff { - index: import('$lib/types').PartStub[]; +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface Platform {} } } + +export {}; diff --git a/src/lib/client/adapters/webcontainer/index.js b/src/lib/client/adapters/webcontainer/index.js index ceeeb290d..290bfb10b 100644 --- a/src/lib/client/adapters/webcontainer/index.js +++ b/src/lib/client/adapters/webcontainer/index.js @@ -1,4 +1,4 @@ -import { load } from '@webcontainer/api'; +import { WebContainer } from '@webcontainer/api'; import base64 from 'base64-js'; import { get_depth } from '../../../utils.js'; import { ready } from '../common/index.js'; @@ -6,6 +6,15 @@ import { ready } from '../common/index.js'; /** @type {import('@webcontainer/api').WebContainer} Web container singleton */ let vm; +/** @param {string} label */ +function console_stream(label) { + return new WritableStream({ + write(chunk) { + console.log(`[${label}] ${chunk}`); + } + }); +} + /** * @param {import('$lib/types').Stub[]} stubs * @param {(progress: number, status: string) => void} callback @@ -31,15 +40,12 @@ export async function create(stubs, callback) { /** @type {boolean} Track whether there was an error from vite dev server */ let vite_error = false; - callback(1 / 6, 'loading webcontainer'); - const WebContainer = await load(); - - callback(2 / 6, 'booting webcontainer'); + callback(1 / 5, 'booting webcontainer'); vm = await WebContainer.boot(); - callback(3 / 6, 'writing virtual files'); + callback(2 / 5, 'writing virtual files'); const common = await ready; - await vm.loadFiles({ + await vm.mount({ 'common.zip': { file: { contents: new Uint8Array(common.zipped) } }, @@ -49,24 +55,18 @@ export async function create(stubs, callback) { ...convert_stubs_to_tree(stubs) }); - callback(4 / 6, 'unzipping files'); - const unzip = await vm.run( - { - command: 'node', - args: ['unzip.cjs'] - }, - { - stderr: (data) => console.error(`[unzip] ${data}`) - } - ); - const code = await unzip.onExit; + callback(3 / 5, 'unzipping files'); + const unzip = await vm.spawn('node', ['unzip.cjs']); + unzip.output.pipeTo(console_stream('unzip')); + const code = await unzip.exit; + if (code !== 0) { throw new Error('Failed to initialize WebContainer'); } - await vm.run({ command: 'chmod', args: ['a+x', 'node_modules/vite/bin/vite.js'] }); + await vm.spawn('chmod', ['a+x', 'node_modules/vite/bin/vite.js']); - callback(5 / 6, 'starting dev server'); + callback(4 / 5, 'starting dev server'); const base = await new Promise(async (fulfil, reject) => { const error_unsub = vm.on('error', (error) => { error_unsub(); @@ -75,27 +75,21 @@ export async function create(stubs, callback) { const ready_unsub = vm.on('server-ready', (port, base) => { ready_unsub(); - callback(6 / 6, 'ready'); + callback(5 / 5, 'ready'); fulfil(base); // this will be the last thing that happens if everything goes well }); await run_dev(); async function run_dev() { - const process = await vm.run( - { command: 'turbo', args: ['run', 'dev'] }, - { - stdout: (data) => { - console.log(`[dev] ${data}`); - }, - stderr: (data) => { - vite_error = true; - console.error(`[dev] ${data}`); - } - } - ); + const process = await vm.spawn('turbo', ['run', 'dev']); + + // TODO differentiate between stdout and stderr (sets `vite_error` to `true`) + // https://github.com/stackblitz/webcontainer-core/issues/971 + process.output.pipeTo(console_stream('dev')); + // keep restarting dev server (can crash in case of illegal +files for example) - process.onExit.then((code) => { + process.exit.then((code) => { if (code !== 0) { setTimeout(() => { run_dev(); @@ -185,10 +179,10 @@ export async function create(stubs, callback) { // This will invoke a restart of Vite. Hacky but it works. // TODO: remove when https://github.com/vitejs/vite/issues/12127 is closed if (!previous_env && current_stubs.has('/.env')) { - await vm.run({ command: 'touch', args: ['.env']}); + await vm.spawn('touch', ['.env']); } - await vm.loadFiles(convert_stubs_to_tree(to_write)); + await vm.mount(convert_stubs_to_tree(to_write)); await promise; await new Promise((f) => setTimeout(f, 200)); // wait for chokidar @@ -220,13 +214,13 @@ export async function create(stubs, callback) { }; } - tree = /** @type {import('@webcontainer/api').DirectoryEntry} */ (tree[part]).directory; + tree = /** @type {import('@webcontainer/api').DirectoryNode} */ (tree[part]).directory; } tree[basename] = to_file(stub); } - await vm.loadFiles(root); + await vm.mount(root); stubs_to_map(stubs, current_stubs); @@ -236,8 +230,6 @@ export async function create(stubs, callback) { }, destroy: async () => { vm.teardown(); - // @ts-ignore - vm = null; } }; } From 3d6da290ba162e7324d7086060d4fed30349a733 Mon Sep 17 00:00:00 2001 From: tomoam <29677552+tomoam@users.noreply.github.com> Date: Wed, 22 Feb 2023 00:07:14 +0900 Subject: [PATCH 013/326] fix: setTimeout for time-consuming test (#222) --- tests/env_file.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/env_file.spec.ts b/tests/env_file.spec.ts index 8f98e30f6..7b6ff5a97 100644 --- a/tests/env_file.spec.ts +++ b/tests/env_file.spec.ts @@ -5,6 +5,8 @@ const chromium_flags = ['--enable-features=SharedArrayBuffer']; const iframe_selector = 'iframe[src*="webcontainer.io/"]'; test('.env file: no timeout error occurs when switching a tutorials without a .env file to one with it', async () => { + test.setTimeout(60000); + const context = await chromium.launchPersistentContext('', { args: chromium_flags }); const page = context.pages()[0]; await page.bringToFront(); From 288c9864153ce637120285a51f7cd216d6486f40 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 21 Feb 2023 12:21:39 -0500 Subject: [PATCH 014/326] Cookie instructions (#223) * fix chrome 3P cookie instructions - closes #60 * firefox instructions --- src/routes/tutorial/[slug]/Loading.svelte | 27 +++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/routes/tutorial/[slug]/Loading.svelte b/src/routes/tutorial/[slug]/Loading.svelte index e40ec0251..cddea05a3 100644 --- a/src/routes/tutorial/[slug]/Loading.svelte +++ b/src/routes/tutorial/[slug]/Loading.svelte @@ -30,16 +30,29 @@ third party cookies are enabled for this site, and disable Enhanced Tracking Protection.

+

+ If you have 'Delete cookies and site data when Firefox is closed' enabled in + about:preferences#privacy, make sure learn.svelte.dev is included + as an exception. +

{:else if /chrome/i.test(navigator.userAgent) && !/edg/i.test(navigator.userAgent)}

- We couldn't start the app. Please ensure - - third party cookies - are enabled for this site. + eye + + + icon in the URL bar or go to + chrome://settings/cookies and add learn.svelte.dev to 'Sites that + can always use cookies'.

{:else}

From e9c1730250f7fc1bd6d59a35b54bee6a4506f023 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Tue, 21 Feb 2023 20:05:24 +0100 Subject: [PATCH 015/326] docs: move @html tag to later section --- .../{11-debugging => 11-special-tags}/01-debug/README.md | 0 .../01-debug/app-a/src/lib/App.svelte | 0 .../01-debug/app-b/src/lib/App.svelte | 0 .../11-special-tags/02-html-tags}/README.md | 2 +- .../11-special-tags/02-html-tags}/app-a/src/lib/App.svelte | 0 .../11-special-tags/02-html-tags}/app-b/src/lib/App.svelte | 0 .../{11-debugging => 11-special-tags}/meta.json | 0 7 files changed, 1 insertion(+), 1 deletion(-) rename content/tutorial/03-advanced-svelte/{11-debugging => 11-special-tags}/01-debug/README.md (100%) rename content/tutorial/03-advanced-svelte/{11-debugging => 11-special-tags}/01-debug/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/{11-debugging => 11-special-tags}/01-debug/app-b/src/lib/App.svelte (100%) rename content/tutorial/{01-svelte/01-introduction/06-html-tags => 03-advanced-svelte/11-special-tags/02-html-tags}/README.md (51%) rename content/tutorial/{01-svelte/01-introduction/06-html-tags => 03-advanced-svelte/11-special-tags/02-html-tags}/app-a/src/lib/App.svelte (100%) rename content/tutorial/{01-svelte/01-introduction/06-html-tags => 03-advanced-svelte/11-special-tags/02-html-tags}/app-b/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/{11-debugging => 11-special-tags}/meta.json (100%) diff --git a/content/tutorial/03-advanced-svelte/11-debugging/01-debug/README.md b/content/tutorial/03-advanced-svelte/11-special-tags/01-debug/README.md similarity index 100% rename from content/tutorial/03-advanced-svelte/11-debugging/01-debug/README.md rename to content/tutorial/03-advanced-svelte/11-special-tags/01-debug/README.md diff --git a/content/tutorial/03-advanced-svelte/11-debugging/01-debug/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/11-special-tags/01-debug/app-a/src/lib/App.svelte similarity index 100% rename from content/tutorial/03-advanced-svelte/11-debugging/01-debug/app-a/src/lib/App.svelte rename to content/tutorial/03-advanced-svelte/11-special-tags/01-debug/app-a/src/lib/App.svelte diff --git a/content/tutorial/03-advanced-svelte/11-debugging/01-debug/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/11-special-tags/01-debug/app-b/src/lib/App.svelte similarity index 100% rename from content/tutorial/03-advanced-svelte/11-debugging/01-debug/app-b/src/lib/App.svelte rename to content/tutorial/03-advanced-svelte/11-special-tags/01-debug/app-b/src/lib/App.svelte diff --git a/content/tutorial/01-svelte/01-introduction/06-html-tags/README.md b/content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/README.md similarity index 51% rename from content/tutorial/01-svelte/01-introduction/06-html-tags/README.md rename to content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/README.md index f39935bba..346ee2685 100644 --- a/content/tutorial/01-svelte/01-introduction/06-html-tags/README.md +++ b/content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/README.md @@ -12,4 +12,4 @@ In Svelte, you do this with the special `{@html ...}` tag:

{+++@html+++ string}

``` -> Svelte doesn't perform any sanitization of the expression inside `{@html ...}` before it gets inserted into the DOM. In other words, if you use this feature it's critical that you manually escape HTML that comes from sources you don't trust, otherwise you risk exposing your users to Cross-Site Scripting (XSS) attacks. +> **Warning!** Svelte doesn't perform any sanitization of the expression inside `{@html ...}` before it gets inserted into the DOM. In other words, if you use this feature it's critical that you manually escape HTML that comes from sources you don't trust, otherwise you risk exposing your users to Cross-Site Scripting (XSS) attacks. diff --git a/content/tutorial/01-svelte/01-introduction/06-html-tags/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/app-a/src/lib/App.svelte similarity index 100% rename from content/tutorial/01-svelte/01-introduction/06-html-tags/app-a/src/lib/App.svelte rename to content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/app-a/src/lib/App.svelte diff --git a/content/tutorial/01-svelte/01-introduction/06-html-tags/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/app-b/src/lib/App.svelte similarity index 100% rename from content/tutorial/01-svelte/01-introduction/06-html-tags/app-b/src/lib/App.svelte rename to content/tutorial/03-advanced-svelte/11-special-tags/02-html-tags/app-b/src/lib/App.svelte diff --git a/content/tutorial/03-advanced-svelte/11-debugging/meta.json b/content/tutorial/03-advanced-svelte/11-special-tags/meta.json similarity index 100% rename from content/tutorial/03-advanced-svelte/11-debugging/meta.json rename to content/tutorial/03-advanced-svelte/11-special-tags/meta.json From d681398e046ebe584b7cb93c99f71982afd4b19d Mon Sep 17 00:00:00 2001 From: tomoam <29677552+tomoam@users.noreply.github.com> Date: Wed, 22 Feb 2023 18:29:38 +0900 Subject: [PATCH 016/326] chore: refactor playwright tests (#229) --- playwright.config.ts | 3 ++- tests/env_file.spec.ts | 41 +++++++++++++--------------------- tests/focus_management.spec.ts | 34 ++++++++-------------------- 3 files changed, 27 insertions(+), 51 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 3b94e6902..ac4df8889 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -4,7 +4,8 @@ const config: PlaywrightTestConfig = { webServer: { command: 'pnpm preview', port: 4173 - } + }, + timeout: 60000 }; export default config; diff --git a/tests/env_file.spec.ts b/tests/env_file.spec.ts index 7b6ff5a97..1c5bc39cc 100644 --- a/tests/env_file.spec.ts +++ b/tests/env_file.spec.ts @@ -1,14 +1,10 @@ -import { expect, test, chromium } from '@playwright/test'; - -const chromium_flags = ['--enable-features=SharedArrayBuffer']; +import { expect, test } from '@playwright/test'; const iframe_selector = 'iframe[src*="webcontainer.io/"]'; -test('.env file: no timeout error occurs when switching a tutorials without a .env file to one with it', async () => { - test.setTimeout(60000); - - const context = await chromium.launchPersistentContext('', { args: chromium_flags }); - const page = context.pages()[0]; +test('.env file: no timeout error occurs when switching a tutorials without a .env file to one with it', async ({ + page +}) => { await page.bringToFront(); await page.goto('/tutorial/welcome-to-svelte'); @@ -20,9 +16,9 @@ test('.env file: no timeout error occurs when switching a tutorials without a .e // switch to another tutorial with a .env file await page.click('header > h1', { delay: 200 }); - await page.locator('button', { hasText: 'Part 4: Advanced SvelteKit' }).click({ delay: 200}); - await page.locator('button', { hasText: 'Environment variables' }).click({ delay: 200}); - await page.locator('a', { hasText: '$env/static/private' }).click({ delay: 200}); + await page.locator('button', { hasText: 'Part 4: Advanced SvelteKit' }).click({ delay: 200 }); + await page.locator('button', { hasText: 'Environment variables' }).click({ delay: 200 }); + await page.locator('a', { hasText: '$env/static/private' }).click({ delay: 200 }); // wait for the iframe to load await iframe_locator.getByText('enter the passphrase').waitFor(); @@ -34,13 +30,11 @@ test('.env file: no timeout error occurs when switching a tutorials without a .e // expect no timeout error await expect(page.getByText('Yikes!')).toBeHidden(); await expect(iframe_locator.getByText('enter the passphrase')).toBeVisible(); - - await context.close(); }); -test('.env file: environment variables are available when switching a tutorial without a .env file to one with it', async () => { - const context = await chromium.launchPersistentContext('', { args: chromium_flags }); - const page = context.pages()[0]; +test('.env file: environment variables are available when switching a tutorial without a .env file to one with it', async ({ + page +}) => { await page.bringToFront(); await page.goto('/tutorial/welcome-to-svelte'); @@ -52,25 +46,22 @@ test('.env file: environment variables are available when switching a tutorial w // switch to another tutorial with a .env file await page.click('header > h1', { delay: 200 }); - await page.locator('button', { hasText: 'Part 4: Advanced SvelteKit' }).click({ delay: 200}); - await page.locator('button', { hasText: 'Environment variables' }).click({ delay: 200}); - await page.locator('a', { hasText: '$env/dynamic/private' }).click({ delay: 200}); + await page.locator('button', { hasText: 'Part 4: Advanced SvelteKit' }).click({ delay: 200 }); + await page.locator('button', { hasText: 'Environment variables' }).click({ delay: 200 }); + await page.locator('a', { hasText: '$env/dynamic/private' }).click({ delay: 200 }); // wait for the iframe to load await iframe_locator.getByText('enter the passphrase').waitFor(); - await iframe_locator.locator('input[name="passphrase"]').waitFor(); - await page.waitForTimeout(500); + await page.waitForTimeout(3000); // login // 'open sesame' is the environment variables loaded from `.env` file await iframe_locator.locator('input[name="passphrase"]').fill('open sesame'); - await page.keyboard.press('Enter', { delay: 200 }); + await page.keyboard.press('Enter', { delay: 1000 }); // expect to be able to login. // Being able to log in means that environment variables are loaded. await expect(iframe_locator.getByText('wrong passphrase!')).toBeHidden(); - await expect(iframe_locator.locator('button', { hasText: 'log out'})).toBeEnabled(); - - await context.close(); + await expect(iframe_locator.locator('button', { hasText: 'log out' })).toBeEnabled(); }); diff --git a/tests/focus_management.spec.ts b/tests/focus_management.spec.ts index bceb20510..3ca821761 100644 --- a/tests/focus_management.spec.ts +++ b/tests/focus_management.spec.ts @@ -1,14 +1,10 @@ -import { expect, test, chromium } from '@playwright/test'; - -const chromium_flags = ['--enable-features=SharedArrayBuffer']; +import { expect, test } from '@playwright/test'; const editor_selector = 'div.monaco-scrollable-element.editor-scrollable'; const editor_focus_selector = 'textarea.inputarea.monaco-mouse-cursor-text'; const iframe_selector = 'iframe[src*="webcontainer.io/"]'; -test('focus management: the editor keeps focus when iframe is loaded', async () => { - const context = await chromium.launchPersistentContext('', { args: chromium_flags }); - const page = context.pages()[0]; +test('focus management: the editor keeps focus when iframe is loaded', async ({ page }) => { await page.bringToFront(); await page.goto('/tutorial/your-first-component'); @@ -27,13 +23,9 @@ test('focus management: the editor keeps focus when iframe is loaded', async () // expect focus to be on the editor await expect(page.locator(editor_focus_selector)).toBeFocused(); - - await context.close(); }); -test('focus management: input inside the iframe gets focus when clicking it', async () => { - const context = await chromium.launchPersistentContext('', { args: chromium_flags }); - const page = context.pages()[0]; +test('focus management: input inside the iframe gets focus when clicking it', async ({ page }) => { await page.bringToFront(); await page.goto('/tutorial/named-form-actions'); @@ -49,7 +41,7 @@ test('focus management: input inside the iframe gets focus when clicking it', as // then, click a input in the iframe const input = iframe.locator('input[name="description"]'); - await input.click({ delay: 500 }); + await input.click({ delay: 1000 }); // wait a little, because there may be a script that manipulates focus await page.waitForTimeout(1000); @@ -57,13 +49,11 @@ test('focus management: input inside the iframe gets focus when clicking it', as // expect focus to be on the input in the iframe, not the editor. await expect(input).toBeFocused(); await expect(page.locator(editor_focus_selector)).not.toBeFocused(); - - await context.close(); }); -test('focus management: body inside the iframe gets focus when clicking a link inside the iframe', async () => { - const context = await chromium.launchPersistentContext('', { args: chromium_flags }); - const page = context.pages()[0]; +test('focus management: body inside the iframe gets focus when clicking a link inside the iframe', async ({ + page +}) => { await page.bringToFront(); await page.goto('/tutorial/layouts'); @@ -88,13 +78,9 @@ test('focus management: body inside the iframe gets focus when clicking a link i // expect focus to be on body in the iframe, not the editor. await expect(iframe.locator('body')).toBeFocused(); - - await context.close(); }); -test('focus management: the editor keeps focus while typing', async () => { - const context = await chromium.launchPersistentContext('', { args: chromium_flags }); - const page = context.pages()[0]; +test('focus management: The editor keeps focus while typing', async ({ page }) => { await page.bringToFront(); await page.goto('/tutorial/your-first-component'); @@ -114,7 +100,7 @@ test('focus management: the editor keeps focus while typing', async () => { await page.waitForTimeout(500); // type the code as a person would do it manually - await page.keyboard.type(` export let data;`, { delay: 100 }); + await page.keyboard.type(` export let data;`, { delay: 150 }); // wait a little, because there may be a script that manipulates focus await page.waitForTimeout(1000); @@ -125,6 +111,4 @@ test('focus management: the editor keeps focus while typing', async () => { const expected = '\n

Hello world!

'; expect(received).toBe(expected); - - await context.close(); }); From c6d80882bb39982f8c6b4c7379d57abdc5a70317 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Feb 2023 11:22:47 -0500 Subject: [PATCH 017/326] minor fixes --- src/lib/client/adapters/webcontainer/index.js | 2 +- src/lib/utils.js | 2 +- src/routes/assets/media/[...path]/+server.js | 11 +++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lib/client/adapters/webcontainer/index.js b/src/lib/client/adapters/webcontainer/index.js index 290bfb10b..0ef49a1d4 100644 --- a/src/lib/client/adapters/webcontainer/index.js +++ b/src/lib/client/adapters/webcontainer/index.js @@ -73,7 +73,7 @@ export async function create(stubs, callback) { reject(new Error(error.message)); }); - const ready_unsub = vm.on('server-ready', (port, base) => { + const ready_unsub = vm.on('server-ready', (_port, base) => { ready_unsub(); callback(5 / 5, 'ready'); fulfil(base); // this will be the last thing that happens if everything goes well diff --git a/src/lib/utils.js b/src/lib/utils.js index 66fe9b35f..07bb5146e 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -1,4 +1,4 @@ -/** @type {string} name */ +/** @param {string} name */ export function get_depth(name) { return name.split('/').length - 1; } diff --git a/src/routes/assets/media/[...path]/+server.js b/src/routes/assets/media/[...path]/+server.js index 02dd84ce6..dfe1d56c6 100644 --- a/src/routes/assets/media/[...path]/+server.js +++ b/src/routes/assets/media/[...path]/+server.js @@ -1,13 +1,12 @@ +/** @type {import('./$types').RequestHandler} */ export async function GET({ request, params, fetch }) { const request_headers = new Headers(); - if (request.headers.has('range')) { - request_headers.set('range', request.headers.get('range')); - } + const range = request.headers.get('range'); + const if_range = request.headers.get('if-range'); - if (request.headers.has('if-range')) { - request_headers.set('if-range', request.headers.get('if-range')); - } + if (range) request_headers.set('range', range); + if (if_range) request_headers.set('if-range', if_range); const response = await fetch(`https://sveltejs.github.io/assets/${params.path}`, { headers: request_headers From cfe006f5fc6d781a7dcb11c9ea59923141ce9a78 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Feb 2023 11:23:03 -0500 Subject: [PATCH 018/326] remove adapter-auto --- package.json | 1 - pnpm-lock.yaml | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/package.json b/package.json index ab9036188..72ae87ee9 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ }, "devDependencies": { "@playwright/test": "^1.30.0", - "@sveltejs/adapter-auto": "1.0.0-next.90", "@sveltejs/adapter-vercel": "2.0.4", "@sveltejs/kit": "^1.7.2", "@sveltejs/site-kit": "^3.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c86ba99ed..3b2b74667 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,7 +3,6 @@ lockfileVersion: 5.4 specifiers: '@fontsource/roboto-mono': ^4.5.10 '@playwright/test': ^1.30.0 - '@sveltejs/adapter-auto': 1.0.0-next.90 '@sveltejs/adapter-vercel': 2.0.4 '@sveltejs/kit': ^1.7.2 '@sveltejs/site-kit': ^3.2.2 @@ -44,7 +43,6 @@ dependencies: devDependencies: '@playwright/test': 1.30.0 - '@sveltejs/adapter-auto': 1.0.0-next.90 '@sveltejs/adapter-vercel': 2.0.4_@sveltejs+kit@1.7.2 '@sveltejs/kit': 1.7.2_svelte@3.55.1+vite@4.1.3 '@sveltejs/site-kit': 3.2.2 @@ -540,12 +538,6 @@ packages: picomatch: 2.3.1 dev: true - /@sveltejs/adapter-auto/1.0.0-next.90: - resolution: {integrity: sha512-qxH46Oqqn40998wTmnbffONI0HcW/kiZ3OIjZoysjONne+LU4uEsG425MZ2RHDxmR04zxhsdjCAsn6B4du8D7w==} - dependencies: - import-meta-resolve: 2.2.1 - dev: true - /@sveltejs/adapter-vercel/2.0.4_@sveltejs+kit@1.7.2: resolution: {integrity: sha512-5tN3sCMQtN/ZV7O26hEVpylIZMMPNkDaDmXxDdEyUZGYpO9x9FOa2CN1CbMQBBGAiCuMxgmtjlWFz4GkYXRU+Q==} peerDependencies: @@ -1052,10 +1044,6 @@ packages: resolve-from: 4.0.0 dev: true - /import-meta-resolve/2.2.1: - resolution: {integrity: sha512-C6lLL7EJPY44kBvA80gq4uMsVFw5x3oSKfuMl1cuZ2RkI5+UJqQXgn+6hlUew0y4ig7Ypt4CObAAIzU53Nfpuw==} - dev: true - /inflight/1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: From d6b38af4432e2ba09ed968b250965850688e99ae Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Feb 2023 11:36:15 -0500 Subject: [PATCH 019/326] remove unused arg --- src/routes/tutorial/[slug]/Editor.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/tutorial/[slug]/Editor.svelte b/src/routes/tutorial/[slug]/Editor.svelte index 7d76739f4..d755bbf03 100644 --- a/src/routes/tutorial/[slug]/Editor.svelte +++ b/src/routes/tutorial/[slug]/Editor.svelte @@ -48,7 +48,7 @@ import('$lib/client/monaco/monaco.js').then(({ monaco }) => { if (destroyed) return; instance = init(monaco, dark_mode); - + document.fonts.ready.then(() => { monaco.editor.remeasureFonts(); }); @@ -265,7 +265,7 @@ clearTimeout(remove_focus_timeout); preserve_editor_focus = true; }} - on:focusout={(e) => { + on:focusout={() => { // Heuristic: user did refocus themmselves if iframe_took_focus // doesn't happen in the next few miliseconds. Needed // because else navigations inside the iframe refocus the editor. From 5eb79b531a2a214b6a9e23a56df0fa417ff7680b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Feb 2023 16:21:13 -0500 Subject: [PATCH 020/326] tidy some stuff up (#230) * tidy some stuff up * fix * more tidying --- src/lib/server/content.js | 295 +++++++++---------- src/lib/types/index.d.ts | 15 - src/routes/tutorial/[slug]/+layout.server.js | 13 +- src/routes/tutorial/[slug]/Menu.svelte | 2 +- 4 files changed, 147 insertions(+), 178 deletions(-) diff --git a/src/lib/server/content.js b/src/lib/server/content.js index e16e58c21..90af5ebc8 100644 --- a/src/lib/server/content.js +++ b/src/lib/server/content.js @@ -1,5 +1,6 @@ import fs from 'node:fs'; import path from 'node:path'; +import glob from 'tiny-glob/sync.js'; import { transform } from './markdown.js'; const text_files = new Set([ @@ -22,94 +23,45 @@ function json(file) { return JSON.parse(fs.readFileSync(file, 'utf-8')); } -export function get_index() { - const parts = []; - - /** @type {import('$lib/types').ExerciseRaw | null} */ - let last_exercise = null; - - let last_part_meta = null; - let last_chapter_meta = null; - - for (const part of fs.readdirSync('content/tutorial')) { - if (!/^\d{2}-/.test(part)) continue; - - const part_meta = { - ...json(`content/tutorial/${part}/meta.json`), - slug: part - }; - - const chapters = []; - - for (const chapter of fs.readdirSync(`content/tutorial/${part}`)) { - if (!/^\d{2}-/.test(chapter)) continue; - - const chapter_meta = { - ...json(`content/tutorial/${part}/${chapter}/meta.json`), - slug: chapter - }; - - const exercises = []; - - for (const exercise of fs.readdirSync(`content/tutorial/${part}/${chapter}`)) { - if (!/^\d{2}-/.test(exercise)) continue; - - const dir = `content/tutorial/${part}/${chapter}/${exercise}`; - if (!fs.statSync(dir).isDirectory()) continue; - - const text = fs.readFileSync(`${dir}/README.md`, 'utf-8'); - const { frontmatter, markdown } = extract_frontmatter(text, dir); - const { title, path = '/', focus } = frontmatter; - const slug = exercise.slice(3); - const meta = fs.existsSync(`${dir}/meta.json`) ? json(`${dir}/meta.json`) : {}; - - if (last_exercise) { - last_exercise.next = { - slug, - title: - last_part_meta !== part_meta - ? part_meta.title - : last_chapter_meta !== chapter_meta - ? chapter_meta.title - : title - }; - } - - exercises.push( - (last_exercise = { - slug: exercise.slice(3), - title, - path, - focus, - markdown, - dir, - prev: last_exercise ? { slug: last_exercise.slug } : null, - meta, - next: null - }) - ); +/** @param {string} dir */ +function is_valid(dir) { + return /^\d{2}-/.test(dir); +} - last_chapter_meta = chapter_meta; - last_part_meta = part_meta; - } +/** + * @returns {import('$lib/types').PartStub[]} + */ +export function get_index() { + const parts = fs.readdirSync('content/tutorial').filter(is_valid); - chapters.push({ - meta: { - ...part_meta, - ...chapter_meta - }, - exercises - }); - } + return parts.map((part) => { + const chapters = fs.readdirSync(`content/tutorial/${part}`).filter(is_valid); - parts.push({ + return { slug: part, - meta: part_meta, - chapters - }); - } - - return parts; + title: json(`content/tutorial/${part}/meta.json`).title, + chapters: chapters.map((chapter) => { + const exercises = fs.readdirSync(`content/tutorial/${part}/${chapter}`).filter(is_valid); + + return { + slug: chapter, + title: json(`content/tutorial/${part}/${chapter}/meta.json`).title, + exercises: exercises.map((exercise) => { + const dir = `content/tutorial/${part}/${chapter}/${exercise}`; + + const text = fs.readFileSync(`${dir}/README.md`, 'utf-8'); + const { frontmatter } = extract_frontmatter(text, dir); + const { title } = frontmatter; + + return { + slug: exercise.slice(3), + title + }; + }) + }; + }) + }; + }); } /** @@ -117,80 +69,123 @@ export function get_index() { * @returns {import('$lib/types').Exercise | undefined} */ export function get_exercise(slug) { - const index = get_index(); + const exercises = glob('[0-9][0-9]-*/[0-9][0-9]-*/[0-9][0-9]-*/README.md', { + cwd: 'content/tutorial' + }); - for (let i = 0; i < index.length; i += 1) { - const part = index[i]; + /** @type {string[]} */ + const chain = []; - /** @type {string[]} */ - const chain = []; + for (let i = 0; i < exercises.length; i += 1) { + const file = exercises[i]; + const [part_dir, chapter_dir, exercise_dir] = file.split('/'); + const exercise_slug = exercise_dir.slice(3); - for (const chapter of part.chapters) { - for (const exercise of chapter.exercises) { - if (fs.existsSync(`${exercise.dir}/app-a`)) { - chain.length = 0; - chain.push(`${exercise.dir}/app-a`); - } + const dir = `content/tutorial/${part_dir}/${chapter_dir}/${exercise_dir}`; + + if (fs.existsSync(`${dir}/app-a`)) { + chain.length = 0; + chain.push(`${dir}/app-a`); + } + + if (exercise_slug === slug) { + const a = { + ...walk('content/tutorial/common', { + exclude: ['node_modules', 'static/tutorial', 'static/svelte-logo-mask.svg'] + }), + ...walk(`content/tutorial/${part_dir}/common`) + }; + + for (const dir of chain) { + Object.assign(a, walk(dir)); + } - if (exercise.slug === slug) { - const a = { - ...walk('content/tutorial/common', { - exclude: ['node_modules', 'static/tutorial', 'static/svelte-logo-mask.svg'] - }), - ...walk(`content/tutorial/${part.slug}/common`) - }; - - for (const dir of chain) { - Object.assign(a, walk(dir)); - } - - const b = walk(`${exercise.dir}/app-b`); - - const scope = chapter.meta.scope ?? part.meta.scope; - const filenames = new Set( - Object.keys(a) - .filter( - (filename) => filename.startsWith(scope.prefix) && a[filename].type === 'file' - ) - .map((filename) => filename.slice(scope.prefix.length)) - ); - - return { - part: { - slug: part.meta.slug, - title: part.meta.title, - index: i - }, - chapter: { - slug: chapter.meta.slug, - title: chapter.meta.title - }, - scope, - focus: exercise.focus ?? chapter.meta.focus ?? part.meta.focus, - title: exercise.title, - path: exercise.path, - slug: exercise.slug, - prev: exercise.prev, - next: exercise.next, - dir: exercise.dir, - editing_constraints: { - create: exercise.meta.editing_constraints?.create ?? [], - remove: exercise.meta.editing_constraints?.remove ?? [] - }, - html: transform(exercise.markdown, { - codespan: (text) => - filenames.size > 1 && filenames.has(text) - ? `${text}` - : `${text}` - }), - a, - b - }; + const b = walk(`${dir}/app-b`); + + const part_meta = json(`content/tutorial/${part_dir}/meta.json`); + const chapter_meta = json(`content/tutorial/${part_dir}/${chapter_dir}/meta.json`); + + const exercise_meta_file = `content/tutorial/${part_dir}/${chapter_dir}/${exercise_dir}/meta.json`; + const exercise_meta = fs.existsSync(exercise_meta_file) ? json(exercise_meta_file) : {}; + + const scope = chapter_meta.scope ?? part_meta.scope; + const filenames = new Set( + Object.keys(a) + .filter((filename) => filename.startsWith(scope.prefix) && a[filename].type === 'file') + .map((filename) => filename.slice(scope.prefix.length)) + ); + + const text = fs.readFileSync(`${dir}/README.md`, 'utf-8'); + const { frontmatter, markdown } = extract_frontmatter(text, dir); + const { title, path = '/', focus } = frontmatter; + + const prev_slug = exercises[i - 1]?.split('/')[2].slice(3); + const prev = prev_slug + ? { + slug: prev_slug + } + : null; + + let next = null; + + const next_exercise = exercises[i + 1]; + + if (next_exercise) { + /** @type {string} */ + let title; + + const dirs = next_exercise.split('/'); + if (dirs[0] !== part_dir) { + console.log({ dirs, part_dir, next_exercise }); + title = json(`content/tutorial/${dirs[0]}/meta.json`).title; + } else if (dirs[1] !== chapter_dir) { + title = json(`content/tutorial/${dirs[0]}/${dirs[1]}/meta.json`).title; + } else { + title = extract_frontmatter( + fs.readFileSync(`content/tutorial/${next_exercise}`, 'utf-8'), + next_exercise + ).frontmatter.title; } - chain.push(`${exercise.dir}/app-b`); + next = { + slug: next_exercise.split('/')[2].slice(3), + title + }; } + + return { + part: { + slug: part_dir, + title: `Part ${part_dir.slice(1, 2)}` + }, + chapter: { + slug: chapter_dir, + title: chapter_meta.title + }, + scope, + focus: focus ?? chapter_meta.focus ?? part_meta.focus, + title, + path, + slug: exercise_slug, + prev, + next, + dir, + editing_constraints: { + create: exercise_meta.editing_constraints?.create ?? [], + remove: exercise_meta.editing_constraints?.remove ?? [] + }, + html: transform(markdown, { + codespan: (text) => + filenames.size > 1 && filenames.has(text) + ? `${text}` + : `${text}` + }), + a, + b + }; } + + chain.push(`${dir}/app-b`); } } diff --git a/src/lib/types/index.d.ts b/src/lib/types/index.d.ts index 7151b3ad2..82a200875 100644 --- a/src/lib/types/index.d.ts +++ b/src/lib/types/index.d.ts @@ -40,7 +40,6 @@ export interface Exercise { part: { slug: string; title: string; - index: number; }; chapter: { slug: string; @@ -64,23 +63,9 @@ export interface Exercise { b: Record; } -export interface ExerciseRaw { - title: string; - path: string; - focus: string; - slug: string; - prev: { slug: string } | null; - next: { slug: string; title: string } | null; - meta: any; - markdown: string; - dir: string; -} - export interface ExerciseStub { title: string; slug: string; - prev: { slug: string } | null; - next: { slug: string; title: string } | null; } export interface ChapterStub { diff --git a/src/routes/tutorial/[slug]/+layout.server.js b/src/routes/tutorial/[slug]/+layout.server.js index d13f53b69..802dfa574 100644 --- a/src/routes/tutorial/[slug]/+layout.server.js +++ b/src/routes/tutorial/[slug]/+layout.server.js @@ -2,17 +2,6 @@ import { get_index } from '$lib/server/content'; export function load() { return { - index: get_index().map((part) => ({ - title: part.meta.title, - slug: part.meta.slug, - chapters: part.chapters.map((chapter) => ({ - title: chapter.meta.title, - slug: chapter.meta.slug, - exercises: chapter.exercises.map((exercise) => ({ - title: exercise.title, - slug: exercise.slug - })) - })) - })) + index: get_index() }; } diff --git a/src/routes/tutorial/[slug]/Menu.svelte b/src/routes/tutorial/[slug]/Menu.svelte index 2bb84d733..d63626b40 100644 --- a/src/routes/tutorial/[slug]/Menu.svelte +++ b/src/routes/tutorial/[slug]/Menu.svelte @@ -173,7 +173,7 @@

(is_open = true)}> - Part {current.part.index + 1} / + {current.part.title} / {current.chapter.title} / {current.title}

From ee1e920f954d8239e69d03293b027326da749bf0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Feb 2023 16:52:17 -0500 Subject: [PATCH 021/326] include all exercises in chapter that matches search - closes #226 (#231) --- src/routes/tutorial/[slug]/Menu.svelte | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/routes/tutorial/[slug]/Menu.svelte b/src/routes/tutorial/[slug]/Menu.svelte index d63626b40..2d8d5a8f3 100644 --- a/src/routes/tutorial/[slug]/Menu.svelte +++ b/src/routes/tutorial/[slug]/Menu.svelte @@ -36,20 +36,18 @@ $: filtered = index .map((part, i) => { - const chapters = part.chapters - .map((chapter, i) => ({ - ...chapter, - label: String.fromCharCode(97 + i), - first: chapter.exercises[0].slug, - exercises: chapter.exercises.filter((exercise) => regex.test(exercise.title)) - })) - .filter((chapter) => chapter.exercises.length > 0 || regex.test(chapter.title)); - return { - ...part, - label: i + 1, - first: part.chapters[0].exercises[0].slug, - chapters + slug: part.slug, + title: part.title, + chapters: part.chapters + .map((chapter) => ({ + slug: chapter.slug, + title: chapter.title, + exercises: regex.test(chapter.title) + ? chapter.exercises + : chapter.exercises.filter((exercise) => regex.test(exercise.title)) + })) + .filter((chapter) => chapter.exercises.length > 0) }; }) .filter((part) => part.chapters.length > 0 || regex.test(part.title)); @@ -102,7 +100,7 @@
    - {#each filtered as part (part.slug)} + {#each filtered as part, i (part.slug)}
  • - Part {part.label}: {part.title} + Part {i + 1}: {part.title} {#if search.length >= 2 || part.slug === expanded_part} From e5c501d03cf3000eff9edb250832051f9c12f3e8 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Feb 2023 17:21:16 -0500 Subject: [PATCH 022/326] focus search input when opening menu from header (#232) * include all exercises in chapter that matches search - closes #226 * this code looks wholly unnecessary * focus search input when opening menu from header - closes #225 --- src/routes/tutorial/[slug]/Menu.svelte | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/routes/tutorial/[slug]/Menu.svelte b/src/routes/tutorial/[slug]/Menu.svelte index 2d8d5a8f3..ffaca2faf 100644 --- a/src/routes/tutorial/[slug]/Menu.svelte +++ b/src/routes/tutorial/[slug]/Menu.svelte @@ -6,6 +6,7 @@ import Icon from '@sveltejs/site-kit/components/Icon.svelte'; import { browser } from '$app/environment'; import { afterNavigate } from '$app/navigation'; + import { tick } from 'svelte'; /** @type {import('$lib/types').PartStub[]}*/ export let index; @@ -13,29 +14,21 @@ /** @type {import('$lib/types').Exercise} */ export let current; + const duration = browser && matchMedia('(prefers-reduced-motion: reduce)').matches ? 0 : 200; + let is_open = false; let search = ''; - let expanded_part = ''; - let expanded_chapter = ''; - let duration = 0; + /** @type {HTMLInputElement} */ + let search_input; - // The following statements ensure that the select animation is not run during opening the menu - $: if (is_open || !is_open) { - expanded_part = current.part.slug; - expanded_chapter = current.chapter.slug; - } - $: if (is_open) { - duration = 0; - setTimeout(() => { - duration = browser && matchMedia('(prefers-reduced-motion: reduce)').matches ? 0 : 200; - }, 210); - } + $: expanded_part = current.part.slug; + $: expanded_chapter = current.chapter.slug; $: regex = new RegExp(`\\b${search.length >= 2 ? search : ''}`, 'i'); $: filtered = index - .map((part, i) => { + .map((part) => { return { slug: part.slug, title: part.title, @@ -92,6 +85,7 @@ -

    (is_open = true)}> +

    { + is_open = true; + await tick(); + search_input.focus(); + }} + > {current.part.title} / {current.chapter.title} / {current.title} From 9d3b26da74f953effd87c692945a13524fa5decb Mon Sep 17 00:00:00 2001 From: b1ue64 <77976308+b1ue64@users.noreply.github.com> Date: Fri, 3 Mar 2023 03:47:22 -0500 Subject: [PATCH 023/326] docs: clarify that the tutorial also includes SvelteKit (#234) --- .../01-svelte/01-introduction/01-welcome-to-svelte/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorial/01-svelte/01-introduction/01-welcome-to-svelte/README.md b/content/tutorial/01-svelte/01-introduction/01-welcome-to-svelte/README.md index 1ba0088a5..7227e7f32 100644 --- a/content/tutorial/01-svelte/01-introduction/01-welcome-to-svelte/README.md +++ b/content/tutorial/01-svelte/01-introduction/01-welcome-to-svelte/README.md @@ -12,7 +12,7 @@ Svelte is a tool for building web applications. Like other user interface framew These components are _compiled_ into small, efficient JavaScript modules that eliminate overhead traditionally associated with UI frameworks. -You can build your entire app with Svelte (for example, using an application framework like [SvelteKit](https://kit.svelte.dev)), or you can add it incrementally to an existing codebase. You can also ship components as standalone packages that work anywhere. +You can build your entire app with Svelte (for example, using an application framework like [SvelteKit](https://kit.svelte.dev), which this tutorial will cover), or you can add it incrementally to an existing codebase. You can also ship components as standalone packages that work anywhere. ## How to use this tutorial From 40f7923a44648649e13bd0ba98bfa01021eadabc Mon Sep 17 00:00:00 2001 From: Will Marquardt Date: Thu, 9 Mar 2023 15:44:07 +0100 Subject: [PATCH 024/326] Provide a link to the relevant docs until the tutorial is ready (#233) --- .../03-loading-data/03-universal-load-functions/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/tutorial/02-sveltekit/03-loading-data/03-universal-load-functions/README.md b/content/tutorial/02-sveltekit/03-loading-data/03-universal-load-functions/README.md index 38bdaa984..2c09853bb 100644 --- a/content/tutorial/02-sveltekit/03-loading-data/03-universal-load-functions/README.md +++ b/content/tutorial/02-sveltekit/03-loading-data/03-universal-load-functions/README.md @@ -4,6 +4,8 @@ title: Universal load functions > Coming soon +In the meantime, read the [documentation](https://kit.svelte.dev/docs/load#shared-vs-server) to learn more about the distinction between server `load` functions and universal `load` functions. + - { - if (!cancelling) return; - commit(e); - }} - on:keyup={(e) => { - if (e.key === 'Enter') { - commit(e); - } - - if (e.key === 'Escape') { - cancel(); - } - }} - /> -{:else} - - - {#if actions.length > 0} -
    - {#each actions as action} -
    +
  • + {#if renaming} + + { + if (!cancelling) { + commit(e); + } + }} + on:keyup={(e) => { + if (e.key === 'Enter') { + commit(e); + } + + if (e.key === 'Escape') { + cancel(); + } + }} + /> + {:else} + + + {#if actions.length > 0} +
    + {#each actions as action} +
    + {/if} {/if} -{/if} +
  • diff --git a/src/routes/tutorial/[slug]/state.js b/src/routes/tutorial/[slug]/state.js index fdd1c4267..1059950e8 100644 --- a/src/routes/tutorial/[slug]/state.js +++ b/src/routes/tutorial/[slug]/state.js @@ -12,6 +12,7 @@ import { derived, writable } from 'svelte/store'; * editing_constraints: import("$lib/types").EditingConstraints; * scope: import('$lib/types').Scope; * }; + * expanded: Record; * }} State */ @@ -29,8 +30,9 @@ const { subscribe, set, update } = writable({ create: [], remove: [] }, - scope: { depth: 0, name: '', prefix: '' } - } + scope: { name: '', prefix: '' } + }, + expanded: {} }); export const state = { @@ -69,6 +71,17 @@ export const state = { remove: exercise.editing_constraints.remove }; + /** @type {Record} */ + const expanded = { + '': true + }; + + for (const stub of Object.values(exercise.a)) { + if (stub.type === 'directory') { + expanded[stub.name] = true; + } + } + // TODO should exercise.a/b be an array in the first place? for (const stub of Object.values(exercise.b)) { if (stub.type === 'file' && stub.contents.startsWith('__delete')) { @@ -107,7 +120,8 @@ export const state = { scope: exercise.scope }, last_updated: undefined, - selected: exercise.focus + selected: exercise.focus, + expanded }); }, @@ -120,6 +134,20 @@ export const state = { })); }, + /** + * @param {string} name + * @param {boolean} [expanded] + */ + toggle_expanded: (name, expanded) => { + update((state) => ({ + ...state, + expanded: { + ...state.expanded, + [name]: expanded ?? !state.expanded[name] + } + })); + }, + /** @param {string | null} name */ select_file: (name) => { update((state) => ({ From bed4f26ea982aaf17879207f76a1c5ccffa02886 Mon Sep 17 00:00:00 2001 From: tomoam <29677552+tomoam@users.noreply.github.com> Date: Sat, 11 Mar 2023 00:07:25 +0900 Subject: [PATCH 034/326] fix: prevent iframe from reloading when a folder is clicked (#245) --- src/routes/tutorial/[slug]/state.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/tutorial/[slug]/state.js b/src/routes/tutorial/[slug]/state.js index 1059950e8..575fd0b65 100644 --- a/src/routes/tutorial/[slug]/state.js +++ b/src/routes/tutorial/[slug]/state.js @@ -2,7 +2,7 @@ import { derived, writable } from 'svelte/store'; /** * @typedef {{ - * status: 'initial' | 'select' | 'set' | 'update' | 'switch'; + * status: 'initial' | 'select' | 'set' | 'update' | 'switch' | 'expand'; * stubs: import("$lib/types").Stub[]; * last_updated?: import("$lib/types").FileStub; * selected: string | null; @@ -141,6 +141,7 @@ export const state = { toggle_expanded: (name, expanded) => { update((state) => ({ ...state, + status: 'expand', expanded: { ...state.expanded, [name]: expanded ?? !state.expanded[name] From 457c40b6423e785a54288394768ced297ebeabd8 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 10 Mar 2023 10:51:20 -0500 Subject: [PATCH 035/326] Update deps (#246) * update deps * more updates --------- Co-authored-by: Rich Harris --- package.json | 10 +-- pnpm-lock.yaml | 177 +++++++++++++++++++++++++------------------------ 2 files changed, 97 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 36c523483..efba89597 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@playwright/test": "^1.31.2", - "@sveltejs/adapter-vercel": "2.0.4", + "@sveltejs/adapter-vercel": "2.3.1", "@sveltejs/kit": "^1.11.0", "@sveltejs/site-kit": "^3.2.2", "@types/diff": "^5.0.2", @@ -24,10 +24,10 @@ "esbuild": "^0.17.11", "prettier": "^2.8.4", "prettier-plugin-svelte": "^2.9.0", - "svelte": "^3.55.1", - "svelte-check": "^2.10.3", + "svelte": "^3.56.0", + "svelte-check": "^3.1.1", "tiny-glob": "^0.2.9", - "typescript": "~4.6.4", + "typescript": "~4.9.5", "vite": "^4.1.4" }, "type": "module", @@ -38,7 +38,7 @@ "adm-zip": "^0.5.10", "base64-js": "^1.5.1", "marked": "^4.2.12", - "monaco-editor": "^0.33.0", + "monaco-editor": "^0.36.1", "port-authority": "^2.0.1", "prism-svelte": "^0.5.0", "prismjs": "^1.29.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a5dc16832..637ac5e9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,7 +4,7 @@ specifiers: '@fontsource/roboto-mono': ^4.5.10 '@playwright/test': ^1.31.2 '@rich_harris/svelte-split-pane': ^1.0.0 - '@sveltejs/adapter-vercel': 2.0.4 + '@sveltejs/adapter-vercel': 2.3.1 '@sveltejs/kit': ^1.11.0 '@sveltejs/site-kit': ^3.2.2 '@types/diff': ^5.0.2 @@ -17,27 +17,27 @@ specifiers: diff: ^5.1.0 esbuild: ^0.17.11 marked: ^4.2.12 - monaco-editor: ^0.33.0 + monaco-editor: ^0.36.1 port-authority: ^2.0.1 prettier: ^2.8.4 prettier-plugin-svelte: ^2.9.0 prism-svelte: ^0.5.0 prismjs: ^1.29.0 - svelte: ^3.55.1 - svelte-check: ^2.10.3 + svelte: ^3.56.0 + svelte-check: ^3.1.1 tiny-glob: ^0.2.9 - typescript: ~4.6.4 + typescript: ~4.9.5 vite: ^4.1.4 ws: ^8.12.1 dependencies: '@fontsource/roboto-mono': 4.5.10 - '@rich_harris/svelte-split-pane': 1.0.0_svelte@3.55.1 + '@rich_harris/svelte-split-pane': 1.0.0_svelte@3.56.0 '@webcontainer/api': 1.0.2 adm-zip: 0.5.10 base64-js: 1.5.1 marked: 4.2.12 - monaco-editor: 0.33.0 + monaco-editor: 0.36.1 port-authority: 2.0.1 prism-svelte: 0.5.0 prismjs: 1.29.0 @@ -45,8 +45,8 @@ dependencies: devDependencies: '@playwright/test': 1.31.2 - '@sveltejs/adapter-vercel': 2.0.4_@sveltejs+kit@1.11.0 - '@sveltejs/kit': 1.11.0_svelte@3.55.1+vite@4.1.4 + '@sveltejs/adapter-vercel': 2.3.1_@sveltejs+kit@1.11.0 + '@sveltejs/kit': 1.11.0_svelte@3.56.0+vite@4.1.4 '@sveltejs/site-kit': 3.2.2 '@types/diff': 5.0.2 '@types/marked': 4.0.8 @@ -55,11 +55,11 @@ devDependencies: diff: 5.1.0 esbuild: 0.17.11 prettier: 2.8.4 - prettier-plugin-svelte: 2.9.0_jrsxveqmsx2uadbqiuq74wlc4u - svelte: 3.55.1 - svelte-check: 2.10.3_svelte@3.55.1 + prettier-plugin-svelte: 2.9.0_gan2xfhhcbz3kbkivttwsjndea + svelte: 3.56.0 + svelte-check: 3.1.1_svelte@3.56.0 tiny-glob: 0.2.9 - typescript: 4.6.4 + typescript: 4.9.5 vite: 4.1.4 packages: @@ -524,7 +524,7 @@ packages: engines: {node: '>=14'} hasBin: true dependencies: - '@types/node': 18.14.0 + '@types/node': 18.15.0 playwright-core: 1.31.2 optionalDependencies: fsevents: 2.3.2 @@ -534,12 +534,12 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rich_harris/svelte-split-pane/1.0.0_svelte@3.55.1: + /@rich_harris/svelte-split-pane/1.0.0_svelte@3.56.0: resolution: {integrity: sha512-nHc6DSIEoyiIAxfSBJkxJOvbUVhPA8HyWi6vzKGZcbQkCMuv6h29Qbotdzs12+zHDxWqECa0X9P0cYY4iDQimA==} peerDependencies: svelte: ^3.54.0 dependencies: - svelte: 3.55.1 + svelte: 3.56.0 dev: false /@rollup/pluginutils/4.2.1: @@ -550,12 +550,12 @@ packages: picomatch: 2.3.1 dev: true - /@sveltejs/adapter-vercel/2.0.4_@sveltejs+kit@1.11.0: - resolution: {integrity: sha512-5tN3sCMQtN/ZV7O26hEVpylIZMMPNkDaDmXxDdEyUZGYpO9x9FOa2CN1CbMQBBGAiCuMxgmtjlWFz4GkYXRU+Q==} + /@sveltejs/adapter-vercel/2.3.1_@sveltejs+kit@1.11.0: + resolution: {integrity: sha512-EanZoRgqaZw4EaT3yGbkUtswYW3cQFVL/7aRunbiZ86mmDEyn6liuYNpmMCiqhgnz6hwhfJErpR7p8l71zcKRA==} peerDependencies: '@sveltejs/kit': ^1.5.0 dependencies: - '@sveltejs/kit': 1.11.0_svelte@3.55.1+vite@4.1.4 + '@sveltejs/kit': 1.11.0_svelte@3.56.0+vite@4.1.4 '@vercel/nft': 0.22.6 esbuild: 0.16.17 transitivePeerDependencies: @@ -563,7 +563,7 @@ packages: - supports-color dev: true - /@sveltejs/kit/1.11.0_svelte@3.55.1+vite@4.1.4: + /@sveltejs/kit/1.11.0_svelte@3.56.0+vite@4.1.4: resolution: {integrity: sha512-PwViZcMoLgEU/jhLoSyjf5hSrHS67wvSm0ifBo4prP9irpGa5HuPOZeVDTL5tPDSBoKxtdYi1zlGdoiJfO86jA==} engines: {node: ^16.14 || >=18} hasBin: true @@ -572,7 +572,7 @@ packages: svelte: ^3.54.0 vite: ^4.0.0 dependencies: - '@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.55.1+vite@4.1.4 + '@sveltejs/vite-plugin-svelte': 2.0.3_svelte@3.56.0+vite@4.1.4 '@types/cookie': 0.5.1 cookie: 0.5.0 devalue: 4.3.0 @@ -583,7 +583,7 @@ packages: sade: 1.8.1 set-cookie-parser: 2.5.1 sirv: 2.0.2 - svelte: 3.55.1 + svelte: 3.56.0 tiny-glob: 0.2.9 undici: 5.20.0 vite: 4.1.4 @@ -595,8 +595,8 @@ packages: resolution: {integrity: sha512-HBLtfNdLr5Ykl8i8CvJcYjib7zMIJupg4T/omplp3ccpgpiUh26tk71vRG1+a6yMkfbfy0ShoPb9uwNril5cnw==} dev: true - /@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.55.1+vite@4.1.4: - resolution: {integrity: sha512-xCEan0/NNpQuL0l5aS42FjwQ6wwskdxC3pW1OeFtEKNZwRg7Evro9lac9HesGP6TdFsTv2xMes5ASQVKbCacxg==} + /@sveltejs/vite-plugin-svelte/2.0.3_svelte@3.56.0+vite@4.1.4: + resolution: {integrity: sha512-o+cguBFdwIGtRbNkYOyqTM7KvRUffxh5bfK4oJsWKG2obu+v/cbpT03tJrGl58C7tRXo/aEC0/axN5FVHBj0nA==} engines: {node: ^14.18.0 || >= 16} peerDependencies: svelte: ^3.54.0 @@ -605,9 +605,9 @@ packages: debug: 4.3.4 deepmerge: 4.3.0 kleur: 4.1.5 - magic-string: 0.27.0 - svelte: 3.55.1 - svelte-hmr: 0.15.1_svelte@3.55.1 + magic-string: 0.29.0 + svelte: 3.56.0 + svelte-hmr: 0.15.1_svelte@3.56.0 vite: 4.1.4 vitefu: 0.2.4_vite@4.1.4 transitivePeerDependencies: @@ -626,8 +626,8 @@ packages: resolution: {integrity: sha512-HVNzMT5QlWCOdeuBsgXP8EZzKUf0+AXzN+sLmjvaB3ZlLqO+e4u0uXrdw9ub69wBKFs+c6/pA4r9sy6cCDvImw==} dev: true - /@types/node/18.14.0: - resolution: {integrity: sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A==} + /@types/node/18.15.0: + resolution: {integrity: sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w==} dev: true /@types/prismjs/1.26.0: @@ -638,16 +638,17 @@ packages: resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} dev: true - /@types/sass/1.43.1: - resolution: {integrity: sha512-BPdoIt1lfJ6B7rw35ncdwBZrAssjcwzI5LByIrYs+tpXlj/CAkuVdRsgZDdP4lq5EjyWzwxZCqAoFyHKFwp32g==} + /@types/sass/1.45.0: + resolution: {integrity: sha512-jn7qwGFmJHwUSphV8zZneO3GmtlgLsmhs/LQyVvQbIIa+fzGMUiHI4HXJZL3FT8MJmgXWbLGiVVY7ElvHq6vDA==} + deprecated: This is a stub types definition. sass provides its own type definitions, so you do not need this installed. dependencies: - '@types/node': 18.14.0 + sass: 1.58.3 dev: true /@types/ws/8.5.4: resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} dependencies: - '@types/node': 18.14.0 + '@types/node': 18.15.0 dev: true /@vercel/nft/0.22.6: @@ -721,7 +722,7 @@ packages: engines: {node: '>=10'} dependencies: delegates: 1.0.0 - readable-stream: 3.6.0 + readable-stream: 3.6.2 dev: true /async-sema/3.1.1: @@ -803,7 +804,7 @@ packages: dev: true /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true /console-control-strings/1.1.0: @@ -1048,6 +1049,10 @@ packages: - supports-color dev: true + /immutable/4.3.0: + resolution: {integrity: sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==} + dev: true + /import-fresh/3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -1114,14 +1119,15 @@ packages: yallist: 4.0.0 dev: true - /magic-string/0.25.9: - resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} + /magic-string/0.27.0: + resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} + engines: {node: '>=12'} dependencies: - sourcemap-codec: 1.4.8 + '@jridgewell/sourcemap-codec': 1.4.14 dev: true - /magic-string/0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} + /magic-string/0.29.0: + resolution: {integrity: sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.14 @@ -1188,8 +1194,8 @@ packages: yallist: 4.0.0 dev: true - /minipass/4.0.3: - resolution: {integrity: sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==} + /minipass/4.2.4: + resolution: {integrity: sha512-lwycX3cBMTvcejsHITUgYj6Gy6A7Nh4Q6h9NP4sTHY1ccJlC7yKzDmiShEHsJ16Jf1nKGDEaiHxiltsJEvk0nQ==} engines: {node: '>=8'} dev: true @@ -1214,8 +1220,8 @@ packages: hasBin: true dev: true - /monaco-editor/0.33.0: - resolution: {integrity: sha512-VcRWPSLIUEgQJQIE0pVT8FcGBIgFoxz7jtqctE+IiCxWugD0DwgyQBcZBhdSrdMC84eumoqMZsGl2GTreOzwqw==} + /monaco-editor/0.36.1: + resolution: {integrity: sha512-/CaclMHKQ3A6rnzBzOADfwdSJ25BFoFT0Emxsc4zYVyav5SkK9iA6lEtIeuN/oRYbwPgviJT+t3l+sjFa28jYg==} dev: false /mri/1.2.0: @@ -1332,14 +1338,14 @@ packages: source-map-js: 1.0.2 dev: true - /prettier-plugin-svelte/2.9.0_jrsxveqmsx2uadbqiuq74wlc4u: + /prettier-plugin-svelte/2.9.0_gan2xfhhcbz3kbkivttwsjndea: resolution: {integrity: sha512-3doBi5NO4IVgaNPtwewvrgPpqAcvNv0NwJNflr76PIGgi9nf1oguQV1Hpdm9TI2ALIQVn/9iIwLpBO5UcD2Jiw==} peerDependencies: prettier: ^1.16.4 || ^2.0.0 svelte: ^3.2.0 dependencies: prettier: 2.8.4 - svelte: 3.55.1 + svelte: 3.56.0 dev: true /prettier/2.8.4: @@ -1361,8 +1367,8 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /readable-stream/3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} + /readable-stream/3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} dependencies: inherits: 2.0.4 @@ -1415,8 +1421,8 @@ packages: glob: 7.2.3 dev: true - /rollup/3.17.2: - resolution: {integrity: sha512-qMNZdlQPCkWodrAZ3qnJtvCAl4vpQ8q77uEujVCCbC/6CLB7Lcmvjq7HyiOSnf4fxTT9XgsE36oLHJBH49xjqA==} + /rollup/3.19.1: + resolution: {integrity: sha512-lAbrdN7neYCg/8WaoWn/ckzCtz+jr70GFfYdlf50OF7387HTg+wiuiqJRFYawwSPpqfqDNYqK7smY/ks2iAudg==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -1449,6 +1455,16 @@ packages: rimraf: 2.7.1 dev: true + /sass/1.58.3: + resolution: {integrity: sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + chokidar: 3.5.3 + immutable: 4.3.0 + source-map-js: 1.0.2 + dev: true + /semver/6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true @@ -1483,14 +1499,14 @@ packages: totalist: 3.0.0 dev: true - /sorcery/0.10.0: - resolution: {integrity: sha512-R5ocFmKZQFfSTstfOtHjJuAwbpGyf9qjQa1egyhvXSbM7emjrtLXtGdZsDJDABC85YBfVvrOiGWKSYXPKdvP1g==} + /sorcery/0.11.0: + resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} hasBin: true dependencies: + '@jridgewell/sourcemap-codec': 1.4.14 buffer-crc32: 0.2.13 minimist: 1.2.8 sander: 0.5.1 - sourcemap-codec: 1.4.8 dev: true /source-map-js/1.0.2: @@ -1498,11 +1514,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /sourcemap-codec/1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - dev: true - /streamsearch/1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -1542,11 +1553,11 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check/2.10.3_svelte@3.55.1: - resolution: {integrity: sha512-Nt1aWHTOKFReBpmJ1vPug0aGysqPwJh2seM1OvICfM2oeyaA62mOiy5EvkXhltGfhCcIQcq2LoE0l1CwcWPjlw==} + /svelte-check/3.1.1_svelte@3.56.0: + resolution: {integrity: sha512-gupWK2sYXRAXg0mtuLOh7LvvuP7RaNH1qYe1dTM+7NyKs9+f1lf3ruxQKO0d6aAT5jWzWzgzGDXhh0xosEY4Zw==} hasBin: true peerDependencies: - svelte: ^3.24.0 + svelte: ^3.55.0 dependencies: '@jridgewell/trace-mapping': 0.3.17 chokidar: 3.5.3 @@ -1554,14 +1565,13 @@ packages: import-fresh: 3.3.0 picocolors: 1.0.0 sade: 1.8.1 - svelte: 3.55.1 - svelte-preprocess: 4.10.7_2k2jvcfvwmfbmgqn6isucmjpty - typescript: 4.6.4 + svelte: 3.56.0 + svelte-preprocess: 5.0.1_rx3ssngbibhj4vpczagsdyy47u + typescript: 4.9.5 transitivePeerDependencies: - '@babel/core' - coffeescript - less - - node-sass - postcss - postcss-load-config - pug @@ -1570,30 +1580,29 @@ packages: - sugarss dev: true - /svelte-hmr/0.15.1_svelte@3.55.1: + /svelte-hmr/0.15.1_svelte@3.56.0: resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==} engines: {node: ^12.20 || ^14.13.1 || >= 16} peerDependencies: svelte: '>=3.19.0' dependencies: - svelte: 3.55.1 + svelte: 3.56.0 dev: true - /svelte-preprocess/4.10.7_2k2jvcfvwmfbmgqn6isucmjpty: - resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==} - engines: {node: '>= 9.11.2'} + /svelte-preprocess/5.0.1_rx3ssngbibhj4vpczagsdyy47u: + resolution: {integrity: sha512-0HXyhCoc9rsW4zGOgtInylC6qj259E1hpFnJMJWTf+aIfeqh4O/QHT31KT2hvPEqQfdjmqBR/kO2JDkkciBLrQ==} + engines: {node: '>= 14.10.0'} requiresBuild: true peerDependencies: '@babel/core': ^7.10.2 coffeescript: ^2.5.1 less: ^3.11.3 || ^4.0.0 - node-sass: '*' postcss: ^7 || ^8 postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 pug: ^3.0.0 sass: ^1.26.8 stylus: ^0.55.0 - sugarss: ^2.0.0 + sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 svelte: ^3.23.0 typescript: ^3.9.5 || ^4.0.0 peerDependenciesMeta: @@ -1603,8 +1612,6 @@ packages: optional: true less: optional: true - node-sass: - optional: true postcss: optional: true postcss-load-config: @@ -1621,17 +1628,17 @@ packages: optional: true dependencies: '@types/pug': 2.0.6 - '@types/sass': 1.43.1 + '@types/sass': 1.45.0 detect-indent: 6.1.0 - magic-string: 0.25.9 - sorcery: 0.10.0 + magic-string: 0.27.0 + sorcery: 0.11.0 strip-indent: 3.0.0 - svelte: 3.55.1 - typescript: 4.6.4 + svelte: 3.56.0 + typescript: 4.9.5 dev: true - /svelte/3.55.1: - resolution: {integrity: sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==} + /svelte/3.56.0: + resolution: {integrity: sha512-LvXiJbjdvJKwB/0CQyYpDX0q+hFqCyWmybzC2G6eK1tJJA/RSRCytTfNmjHv+RHlLuA70vWG7nXp6gbeErYvRA==} engines: {node: '>= 8'} /tar/6.1.13: @@ -1640,7 +1647,7 @@ packages: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 - minipass: 4.0.3 + minipass: 4.2.4 minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 @@ -1669,8 +1676,8 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true - /typescript/4.6.4: - resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} + /typescript/4.9.5: + resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} hasBin: true dev: true @@ -1714,7 +1721,7 @@ packages: esbuild: 0.16.17 postcss: 8.4.21 resolve: 1.22.1 - rollup: 3.17.2 + rollup: 3.19.1 optionalDependencies: fsevents: 2.3.2 dev: true From 457da8a1dd5cb8187790fc56a07a4e249aba288d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 10 Mar 2023 11:20:21 -0500 Subject: [PATCH 036/326] remove type annotations (#247) Co-authored-by: Rich Harris --- src/hooks.server.js | 1 - src/routes/+page.js | 1 - src/routes/assets/media/[...path]/+server.js | 1 - src/routes/tutorial/[slug]/+page.server.js | 1 - src/routes/tutorial/[slug]/+page.svelte | 1 - 5 files changed, 5 deletions(-) diff --git a/src/hooks.server.js b/src/hooks.server.js index 0d50447a0..ae29b46cf 100644 --- a/src/hooks.server.js +++ b/src/hooks.server.js @@ -1,4 +1,3 @@ -/** @type {import('@sveltejs/kit').Handle} */ export async function handle({ event, resolve }) { const response = await resolve(event); diff --git a/src/routes/+page.js b/src/routes/+page.js index 6506626ed..de2936142 100644 --- a/src/routes/+page.js +++ b/src/routes/+page.js @@ -1,6 +1,5 @@ import { redirect } from '@sveltejs/kit'; -/** @type {import('./$types').PageLoad} */ export function load() { throw redirect(307, '/tutorial/welcome-to-svelte'); } diff --git a/src/routes/assets/media/[...path]/+server.js b/src/routes/assets/media/[...path]/+server.js index dfe1d56c6..e867cbaf0 100644 --- a/src/routes/assets/media/[...path]/+server.js +++ b/src/routes/assets/media/[...path]/+server.js @@ -1,4 +1,3 @@ -/** @type {import('./$types').RequestHandler} */ export async function GET({ request, params, fetch }) { const request_headers = new Headers(); diff --git a/src/routes/tutorial/[slug]/+page.server.js b/src/routes/tutorial/[slug]/+page.server.js index f9df0e782..4ea9a924e 100644 --- a/src/routes/tutorial/[slug]/+page.server.js +++ b/src/routes/tutorial/[slug]/+page.server.js @@ -1,7 +1,6 @@ import { get_exercise } from '$lib/server/content'; import { error } from '@sveltejs/kit'; -/** @type {import('./$types').PageServerLoad} */ export function load({ params }) { const exercise = get_exercise(params.slug); diff --git a/src/routes/tutorial/[slug]/+page.svelte b/src/routes/tutorial/[slug]/+page.svelte index 5c2f19ed6..355e1cff3 100644 --- a/src/routes/tutorial/[slug]/+page.svelte +++ b/src/routes/tutorial/[slug]/+page.svelte @@ -13,7 +13,6 @@ import Sidebar from './Sidebar.svelte'; import { state, selected, completed } from './state.js'; - /** @type {import('./$types').PageData} */ export let data; let width = browser ? window.innerWidth : 1000; From 0aea74129bde3d86cb81835de05d9b42e7da9f38 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 13 Mar 2023 12:14:31 -0400 Subject: [PATCH 037/326] overhaul adapter code (#249) * tidy up * restart process immediately when it dies * create adapter in onMount * make adapter a singleton * WIP refactor * add an event mechanism for reloading iframe * call adapter methods directly * separate state from events * add some HMR support * unify types, remove destroy method * preserve loading screen until page is ready * expand new folders by default * remove unnecessary pagehide stuff * make update(...) take a single file * fix hella weird bug with process not exiting if vite and svelte configs are both written simultaneously * minor tweak * simplify * move collapsed state to the filetree * remove some more indirection * unused import * use sets for editing constraints * move logic to the server * move editing_constraints out of state * fix * create multiple independent stores so we can e.g. SSR the filetree * tweak * consistency * use correct path, prevent some errors --------- Co-authored-by: Rich Harris --- .../tutorial/common/src/routes/+page.svelte | 0 src/lib/client/adapters/filesystem/index.js | 6 +- src/lib/client/adapters/webcontainer/index.js | 163 +++++++------ src/lib/server/content.js | 41 +++- src/lib/types/index.d.ts | 21 +- src/routes/tutorial/[slug]/+page.svelte | 88 ++++++- src/routes/tutorial/[slug]/Editor.svelte | 18 +- src/routes/tutorial/[slug]/Output.svelte | 142 ++--------- src/routes/tutorial/[slug]/adapter.js | 149 ++++++------ .../tutorial/[slug]/filetree/File.svelte | 6 +- .../tutorial/[slug]/filetree/Filetree.svelte | 82 ++++--- .../tutorial/[slug]/filetree/Folder.svelte | 40 ++-- .../tutorial/[slug]/filetree/context.js | 1 + src/routes/tutorial/[slug]/state.js | 224 +++--------------- 14 files changed, 417 insertions(+), 564 deletions(-) create mode 100644 content/tutorial/common/src/routes/+page.svelte diff --git a/content/tutorial/common/src/routes/+page.svelte b/content/tutorial/common/src/routes/+page.svelte new file mode 100644 index 000000000..e69de29bb diff --git a/src/lib/client/adapters/filesystem/index.js b/src/lib/client/adapters/filesystem/index.js index e9d11f0fa..d3bd0e6ba 100644 --- a/src/lib/client/adapters/filesystem/index.js +++ b/src/lib/client/adapters/filesystem/index.js @@ -1,7 +1,7 @@ /** * @param {import('$lib/types').Stub[]} stubs * @param {(progress: number, status: string) => void} cb - * @returns {Promise} + * @returns {Promise} */ export async function create(stubs, cb) { const res = await fetch('http://github.com/backend', { @@ -56,10 +56,6 @@ export async function create(stubs, cb) { await new Promise((f) => setTimeout(f, 100)); // wait for chokidar return will_restart_vite_dev_server(stubs); - }, - - async destroy() { - navigator.sendBeacon(`/backend/destroy?id=${id}`); } }; } diff --git a/src/lib/client/adapters/webcontainer/index.js b/src/lib/client/adapters/webcontainer/index.js index 0ef49a1d4..125cc0e7e 100644 --- a/src/lib/client/adapters/webcontainer/index.js +++ b/src/lib/client/adapters/webcontainer/index.js @@ -16,16 +16,17 @@ function console_stream(label) { } /** - * @param {import('$lib/types').Stub[]} stubs - * @param {(progress: number, status: string) => void} callback - * @returns {Promise} + * @param {import('svelte/store').Writable} base + * @param {import('svelte/store').Writable} error + * @param {import('svelte/store').Writable<{ value: number, text: string }>} progress + * @returns {Promise} */ -export async function create(stubs, callback) { +export async function create(base, error, progress) { if (/safari/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent)) { throw new Error('WebContainers are not supported by Safari'); } - callback(0, 'loading files'); + progress.set({ value: 0, text: 'loading files' }); /** * Keeps track of the latest create/reset to ensure things are not processed in parallel. @@ -35,15 +36,15 @@ export async function create(stubs, callback) { let running; /** Paths and contents of the currently loaded file stubs */ - let current_stubs = stubs_to_map(stubs); + let current_stubs = stubs_to_map([]); /** @type {boolean} Track whether there was an error from vite dev server */ let vite_error = false; - callback(1 / 5, 'booting webcontainer'); + progress.set({ value: 1 / 5, text: 'booting webcontainer' }); vm = await WebContainer.boot(); - callback(2 / 5, 'writing virtual files'); + progress.set({ value: 2 / 5, text: 'writing virtual files' }); const common = await ready; await vm.mount({ 'common.zip': { @@ -51,11 +52,10 @@ export async function create(stubs, callback) { }, 'unzip.cjs': { file: { contents: common.unzip } - }, - ...convert_stubs_to_tree(stubs) + } }); - callback(3 / 5, 'unzipping files'); + progress.set({ value: 3 / 5, text: 'unzipping files' }); const unzip = await vm.spawn('node', ['unzip.cjs']); unzip.output.pipeTo(console_stream('unzip')); const code = await unzip.exit; @@ -66,41 +66,51 @@ export async function create(stubs, callback) { await vm.spawn('chmod', ['a+x', 'node_modules/vite/bin/vite.js']); - callback(4 / 5, 'starting dev server'); - const base = await new Promise(async (fulfil, reject) => { - const error_unsub = vm.on('error', (error) => { - error_unsub(); - reject(new Error(error.message)); - }); + vm.on('server-ready', (_port, url) => { + base.set(url); + }); - const ready_unsub = vm.on('server-ready', (_port, base) => { - ready_unsub(); - callback(5 / 5, 'ready'); - fulfil(base); // this will be the last thing that happens if everything goes well - }); + vm.on('error', ({ message }) => { + error.set(new Error(message)); + }); - await run_dev(); + let launched = false; - async function run_dev() { - const process = await vm.spawn('turbo', ['run', 'dev']); + async function launch() { + if (launched) return; + launched = true; - // TODO differentiate between stdout and stderr (sets `vite_error` to `true`) - // https://github.com/stackblitz/webcontainer-core/issues/971 - process.output.pipeTo(console_stream('dev')); + progress.set({ value: 4 / 5, text: 'starting dev server' }); - // keep restarting dev server (can crash in case of illegal +files for example) - process.exit.then((code) => { - if (code !== 0) { - setTimeout(() => { - run_dev(); - }, 2000); - } + await new Promise(async (fulfil, reject) => { + const error_unsub = vm.on('error', (error) => { + error_unsub(); + reject(new Error(error.message)); }); - } - }); + + const ready_unsub = vm.on('server-ready', (_port, base) => { + ready_unsub(); + progress.set({ value: 5 / 5, text: 'ready' }); + fulfil(base); // this will be the last thing that happens if everything goes well + }); + + await run_dev(); + + async function run_dev() { + const process = await vm.spawn('turbo', ['run', 'dev']); + + // TODO differentiate between stdout and stderr (sets `vite_error` to `true`) + // https://github.com/stackblitz/webcontainer-core/issues/971 + process.output.pipeTo(console_stream('dev')); + + // keep restarting dev server (can crash in case of illegal +files for example) + await process.exit; + run_dev(); + } + }); + } return { - base, reset: async (stubs) => { await running; /** @type {Function} */ @@ -146,7 +156,7 @@ export async function create(stubs, callback) { // For some reason, server-ready is fired again when the vite dev server is restarted. // We need to wait for it to finish before we can continue, else we might // request files from Vite before it's ready, leading to a timeout. - const will_restart = will_restart_vite_dev_server(to_write); + const will_restart = launched && to_write.some(will_restart_vite_dev_server); const promise = will_restart ? new Promise((fulfil, reject) => { const error_unsub = vm.on('error', (error) => { @@ -190,60 +200,57 @@ export async function create(stubs, callback) { // Also trigger a reload of the iframe in case new files were added / old ones deleted, // because that can result in a broken UI state - return will_restart || vite_error || to_delete.length > 0 || added_new_file; + const should_reload = !launched || will_restart || vite_error || to_delete.length > 0; + // `|| added_new_file`, but I don't actually think that's necessary? + + await launch(); + + return should_reload; }, - update: async (stubs) => { + update: async (file) => { await running; /** @type {import('@webcontainer/api').FileSystemTree} */ const root = {}; - for (const stub of stubs) { - let tree = root; - - const path = stub.name.split('/').slice(1); - const basename = /** @type {string} */ (path.pop()); + let tree = root; - for (const part of path) { - if (!tree[part]) { - /** @type {import('@webcontainer/api').FileSystemTree} */ - const directory = {}; + const path = file.name.split('/').slice(1); + const basename = /** @type {string} */ (path.pop()); - tree[part] = { - directory - }; - } + for (const part of path) { + if (!tree[part]) { + /** @type {import('@webcontainer/api').FileSystemTree} */ + const directory = {}; - tree = /** @type {import('@webcontainer/api').DirectoryNode} */ (tree[part]).directory; + tree[part] = { + directory + }; } - tree[basename] = to_file(stub); + tree = /** @type {import('@webcontainer/api').DirectoryNode} */ (tree[part]).directory; } + tree[basename] = to_file(file); + await vm.mount(root); - stubs_to_map(stubs, current_stubs); + current_stubs.set(file.name, file); await new Promise((f) => setTimeout(f, 200)); // wait for chokidar - return will_restart_vite_dev_server(stubs); - }, - destroy: async () => { - vm.teardown(); + return will_restart_vite_dev_server(file); } }; } /** - * @param {import('$lib/types').Stub[]} stubs + * @param {import('$lib/types').Stub} file */ -function will_restart_vite_dev_server(stubs) { - return stubs.some( - (stub) => - stub.type === 'file' && - (stub.name === '/vite.config.js' || - stub.name === '/svelte.config.js' || - stub.name === '/.env') +function will_restart_vite_dev_server(file) { + return ( + file.type === 'file' && + (file.name === '/vite.config.js' || file.name === '/svelte.config.js' || file.name === '/.env') ); } @@ -272,11 +279,11 @@ function convert_stubs_to_tree(stubs, depth = 1) { return tree; } -/** @param {import('$lib/types').FileStub} stub */ -function to_file(stub) { +/** @param {import('$lib/types').FileStub} file */ +function to_file(file) { // special case - if (stub.name === '/src/app.html') { - const contents = stub.contents.replace( + if (file.name === '/src/app.html') { + const contents = file.contents.replace( '', '' ); @@ -286,7 +293,7 @@ function to_file(stub) { }; } - const contents = stub.text ? stub.contents : base64.toByteArray(stub.contents); + const contents = file.text ? file.contents : base64.toByteArray(file.contents); return { file: { contents } @@ -294,12 +301,12 @@ function to_file(stub) { } /** - * @param {import('$lib/types').Stub[]} stubs + * @param {import('$lib/types').Stub[]} files * @returns {Map} */ -function stubs_to_map(stubs, map = new Map()) { - for (const stub of stubs) { - map.set(stub.name, stub); +function stubs_to_map(files, map = new Map()) { + for (const file of files) { + map.set(file.name, file); } return map; } diff --git a/src/lib/server/content.js b/src/lib/server/content.js index d10024d05..cfdd1bac5 100644 --- a/src/lib/server/content.js +++ b/src/lib/server/content.js @@ -101,6 +101,7 @@ export function get_exercise(slug) { } const b = walk(`${dir}/app-b`); + const has_solution = Object.keys(b).length > 0; const part_meta = json(`content/tutorial/${part_dir}/meta.json`); const chapter_meta = json(`content/tutorial/${part_dir}/${chapter_dir}/meta.json`); @@ -152,6 +153,36 @@ export function get_exercise(slug) { }; } + const editing_constraints = { + create: new Set(exercise_meta.editing_constraints?.create ?? []), + remove: new Set(exercise_meta.editing_constraints?.remove ?? []) + }; + + const solution = { ...a }; + + for (const stub of Object.values(b)) { + if (stub.type === 'file' && stub.contents.startsWith('__delete')) { + // remove file + editing_constraints.remove.add(stub.name); + delete solution[stub.name]; + } else if (stub.name.endsWith('/__delete')) { + // remove directory + const parent = stub.name.slice(0, stub.name.lastIndexOf('/')); + editing_constraints.remove.add(parent); + delete solution[parent]; + for (const k in solution) { + if (k.startsWith(parent + '/')) { + delete solution[k]; + } + } + } else { + if (!solution[stub.name]) { + editing_constraints.create.add(stub.name); + } + solution[stub.name] = stub; + } + } + return { part: { slug: part_dir, @@ -169,10 +200,7 @@ export function get_exercise(slug) { prev, next, dir, - editing_constraints: { - create: exercise_meta.editing_constraints?.create ?? [], - remove: exercise_meta.editing_constraints?.remove ?? [] - }, + editing_constraints, html: transform(markdown, { codespan: (text) => filenames.size > 1 && filenames.has(text) @@ -180,7 +208,8 @@ export function get_exercise(slug) { : `${text}` }), a, - b + b: solution, + has_solution }; } @@ -218,7 +247,7 @@ function extract_frontmatter(markdown, dir) { * exclude?: string[] * }} options */ -export function walk(cwd, options = {}) { +function walk(cwd, options = {}) { /** @type {Record} */ const result = {}; diff --git a/src/lib/types/index.d.ts b/src/lib/types/index.d.ts index 394f858be..f0779b4a8 100644 --- a/src/lib/types/index.d.ts +++ b/src/lib/types/index.d.ts @@ -16,18 +16,10 @@ export interface DirectoryStub { export type Stub = FileStub | DirectoryStub; -export interface AdapterInternal { - base: string; +export interface Adapter { /** Returns `false` if the reset was in such a way that a reload of the iframe isn't needed */ reset(files: Array): Promise; - update(file: Array): Promise; - destroy(): Promise; -} - -export interface Adapter extends AdapterInternal { - reset(files: Array): Promise; - update(file: Array): Promise; - init: Promise; + update(file: FileStub): Promise; } export interface Scope { @@ -55,11 +47,12 @@ export interface Exercise { html: string; dir: string; editing_constraints: { - create: string[]; - remove: string[]; + create: Set; + remove: Set; }; a: Record; b: Record; + has_solution: boolean; } export interface ExerciseStub { @@ -80,6 +73,6 @@ export interface PartStub { } export interface EditingConstraints { - create: string[]; - remove: string[]; + create: Set; + remove: Set; } diff --git a/src/routes/tutorial/[slug]/+page.svelte b/src/routes/tutorial/[slug]/+page.svelte index 355e1cff3..39d7baa27 100644 --- a/src/routes/tutorial/[slug]/+page.svelte +++ b/src/routes/tutorial/[slug]/+page.svelte @@ -1,7 +1,7 @@ @@ -57,7 +119,7 @@ index={data.index} exercise={data.exercise} on:select={(e) => { - state.select_file(e.detail.file); + select_file(e.detail.file); }} /> @@ -72,16 +134,16 @@
    - +
    diff --git a/src/routes/tutorial/[slug]/Editor.svelte b/src/routes/tutorial/[slug]/Editor.svelte index d755bbf03..387644008 100644 --- a/src/routes/tutorial/[slug]/Editor.svelte +++ b/src/routes/tutorial/[slug]/Editor.svelte @@ -1,7 +1,7 @@ { if (preserve_editor_focus && e.data.type === 'iframe_took_focus') { - instance?.editor.focus(); + editor_view.focus(); } }} /> -
    -
    { - if (e.key === 'Tab') { - preserve_editor_focus = false; +
    { + if (e.key === 'Tab') { + preserve_editor_focus = false; - setTimeout(() => { - preserve_editor_focus = true; - }, 200); - } - }} - on:focusin={() => { - clearTimeout(remove_focus_timeout); - preserve_editor_focus = true; - }} - on:focusout={() => { - // Heuristic: user did refocus themmselves if iframe_took_focus - // doesn't happen in the next few miliseconds. Needed - // because else navigations inside the iframe refocus the editor. - remove_focus_timeout = setTimeout(() => { - preserve_editor_focus = false; + setTimeout(() => { + preserve_editor_focus = true; }, 200); - }} - /> + } + }} + on:focusin={() => { + clearTimeout(remove_focus_timeout); + preserve_editor_focus = true; + }} + on:focusout={() => { + // Heuristic: user did refocus themmselves if iframe_took_focus + // doesn't happen in the next few miliseconds. Needed + // because else navigations inside the iframe refocus the editor. + remove_focus_timeout = setTimeout(() => { + preserve_editor_focus = false; + }, 200); + }} +> + {#if !browser && $selected_file} +
    +
    + {#each $selected_file.contents.split('\n') as _, i} +
    {i + 1}
    + {/each} +
    +
    + {#each $selected_file.contents.split('\n') as line} +
    {line || ' '}
    + {/each} +
    +
    + {/if}
    diff --git a/src/routes/tutorial/[slug]/Output.svelte b/src/routes/tutorial/[slug]/Output.svelte index 4d1ef46b5..59f907648 100644 --- a/src/routes/tutorial/[slug]/Output.svelte +++ b/src/routes/tutorial/[slug]/Output.svelte @@ -69,7 +69,7 @@ // removing the iframe from the document allows us to // change the src without adding a history entry, which // would make back/forward traversal very annoying - const parentNode = /** @type {HTMLElement} */ (iframe.parentNode); + const parentNode = /** @type {HTMLElement} */ (iframe?.parentNode); parentNode?.removeChild(iframe); iframe.src = src; parentNode?.appendChild(iframe); diff --git a/src/routes/tutorial/[slug]/codemirror.css b/src/routes/tutorial/[slug]/codemirror.css new file mode 100644 index 000000000..63d9a3360 --- /dev/null +++ b/src/routes/tutorial/[slug]/codemirror.css @@ -0,0 +1,60 @@ +.codemirror-wrapper { + height: 100%; +} + +.cm-editor { + height: 100%; +} + +.cm-editor .cm-scroller { + font-family: var(--font-mono); + font-size: 1.3rem; + line-height: 2rem; +} + +.cm-editor .cm-gutters { + background: var(--sk-back-3); + border-right: none; + padding: 0; + width: 5rem; +} + +.cm-editor .cm-activeLineGutter { + background-color: var(--sk-back-3); +} + +.cm-editor .cm-lineNumbers { + flex: 1; + color: #237893; +} + +.cm-editor .cm-foldGutter { + width: 1rem; +} + +.cm-editor .cm-content { + padding: 1rem 0; +} + +.cm-editor .cm-line { + padding: 0 1rem; +} + +.cm-editor .cm-selectionBackground { + border-radius: 2px; +} + +.cm-editor .cm-selectionMatch { + background: rgba(0,0,0,0.2); + color: var(--sk-text-2); +} + +@media (prefers-color-scheme: dark) { + .cm-editor .cm-activeLineGutter { + background-color: var(--sk-back-3); + } + + .cm-editor .cm-activeLine { + background-color: var(--sk-back-2); + } +} \ No newline at end of file diff --git a/tests/env_file.spec.ts b/tests/env_file.spec.ts index 1c5bc39cc..7177e40cf 100644 --- a/tests/env_file.spec.ts +++ b/tests/env_file.spec.ts @@ -2,6 +2,8 @@ import { expect, test } from '@playwright/test'; const iframe_selector = 'iframe[src*="webcontainer.io/"]'; +test.describe.configure({ mode: 'parallel' }); + test('.env file: no timeout error occurs when switching a tutorials without a .env file to one with it', async ({ page }) => { diff --git a/tests/focus_management.spec.ts b/tests/focus_management.spec.ts index 3ca821761..7b180d214 100644 --- a/tests/focus_management.spec.ts +++ b/tests/focus_management.spec.ts @@ -1,9 +1,11 @@ import { expect, test } from '@playwright/test'; -const editor_selector = 'div.monaco-scrollable-element.editor-scrollable'; -const editor_focus_selector = 'textarea.inputarea.monaco-mouse-cursor-text'; +const editor_selector = '.cm-content'; +const editor_focus_selector = '.cm-content'; const iframe_selector = 'iframe[src*="webcontainer.io/"]'; +test.describe.configure({ mode: 'parallel' }); + test('focus management: the editor keeps focus when iframe is loaded', async ({ page }) => { await page.bringToFront(); @@ -108,7 +110,7 @@ test('focus management: The editor keeps focus while typing', async ({ page }) = // get code from DOM, then replace nbsp with normal space const received = (await page.locator(editor_selector).innerText()).replace(/\u00a0/g, ' '); - const expected = '\n

    Hello world!

    '; + const expected = '\n\n'; expect(received).toBe(expected); }); From cc3cd3072ebcab41d3526f9b46c1df9236280971 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 13 Mar 2023 21:28:40 -0400 Subject: [PATCH 041/326] preload --- src/app.html | 2 +- src/routes/tutorial/[slug]/Menu.svelte | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app.html b/src/app.html index 8b1aa7c88..7ea18c7cc 100644 --- a/src/app.html +++ b/src/app.html @@ -7,7 +7,7 @@ %sveltekit.head% - +
    %sveltekit.body%
    diff --git a/src/routes/tutorial/[slug]/Menu.svelte b/src/routes/tutorial/[slug]/Menu.svelte index ffaca2faf..3c682c727 100644 --- a/src/routes/tutorial/[slug]/Menu.svelte +++ b/src/routes/tutorial/[slug]/Menu.svelte @@ -135,11 +135,7 @@ ? 'page' : undefined} > - (is_open = false)} - > + (is_open = false)}> {exercise.title}

  • From c1e1e58a4251826917db4ff94e0bed7836658a95 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 14 Mar 2023 09:08:43 -0400 Subject: [PATCH 042/326] mobile layout (#254) * partial fix for #12 * use dynamic viewport units --------- Co-authored-by: Rich Harris --- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- src/routes/+layout.svelte | 4 ++-- src/routes/tutorial/[slug]/Editor.svelte | 4 +++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b23cf28f7..ea2158932 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@lezer/javascript": "^1.4.1", "@lezer/lr": "^1.3.3", "@replit/codemirror-lang-svelte": "^6.0.0", - "@rich_harris/svelte-split-pane": "^1.0.0", + "@rich_harris/svelte-split-pane": "^1.0.1", "@webcontainer/api": "^1.0.2", "adm-zip": "^0.5.10", "ansi-to-html": "^0.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a8fc2ab3..60bac2584 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ specifiers: '@lezer/lr': ^1.3.3 '@playwright/test': ^1.31.2 '@replit/codemirror-lang-svelte': ^6.0.0 - '@rich_harris/svelte-split-pane': ^1.0.0 + '@rich_harris/svelte-split-pane': ^1.0.1 '@sveltejs/adapter-vercel': 2.3.1 '@sveltejs/kit': ^1.11.0 '@sveltejs/site-kit': ^3.2.2 @@ -59,7 +59,7 @@ dependencies: '@lezer/javascript': 1.4.1 '@lezer/lr': 1.3.3 '@replit/codemirror-lang-svelte': 6.0.0_ybny7xhlf2ysg4majw54z4nkly - '@rich_harris/svelte-split-pane': 1.0.0_svelte@3.56.0 + '@rich_harris/svelte-split-pane': 1.0.1_svelte@3.56.0 '@webcontainer/api': 1.0.2 adm-zip: 0.5.10 ansi-to-html: 0.7.2 @@ -728,8 +728,8 @@ packages: '@lezer/lr': 1.3.3 dev: false - /@rich_harris/svelte-split-pane/1.0.0_svelte@3.56.0: - resolution: {integrity: sha512-nHc6DSIEoyiIAxfSBJkxJOvbUVhPA8HyWi6vzKGZcbQkCMuv6h29Qbotdzs12+zHDxWqECa0X9P0cYY4iDQimA==} + /@rich_harris/svelte-split-pane/1.0.1_svelte@3.56.0: + resolution: {integrity: sha512-/11fp3792qh4pXxO3XtVmIQf6SCDFKcQyyQvVOAKr8U5tG0Z4QaLEXsyOKOpeAkngqWT1dbBfjVynUXa7kb1EA==} peerDependencies: svelte: ^3.54.0 dependencies: diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 22f5c25e5..9cdff2f85 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -50,7 +50,7 @@ :global(body) { margin: 0; width: 100%; - min-height: 100vh; + min-height: 100dvh; } /* TODO when we remove the launch banner, we can remove this override */ @@ -60,7 +60,7 @@ main { width: 100%; - height: calc(100vh - var(--nav-h)); + height: calc(100dvh - var(--nav-h)); position: relative; top: var(--nav-h); } diff --git a/src/routes/tutorial/[slug]/Editor.svelte b/src/routes/tutorial/[slug]/Editor.svelte index cbc0784c0..058fff696 100644 --- a/src/routes/tutorial/[slug]/Editor.svelte +++ b/src/routes/tutorial/[slug]/Editor.svelte @@ -75,7 +75,9 @@ editor_states.set(file.name, state); } - editor_view.setState(state); + if (editor_view) { + editor_view.setState(state); + } } onMount(() => { From 8ab615a2edaba2511151fe172054fb00e9a431a6 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 14 Mar 2023 11:23:43 -0400 Subject: [PATCH 043/326] fix solve button (#258) * style tweak * fix solve button - closes #256 --------- Co-authored-by: Rich Harris --- src/routes/tutorial/[slug]/Editor.svelte | 125 ++++++++++++++++------- src/routes/tutorial/[slug]/state.js | 6 ++ 2 files changed, 96 insertions(+), 35 deletions(-) diff --git a/src/routes/tutorial/[slug]/Editor.svelte b/src/routes/tutorial/[slug]/Editor.svelte index 058fff696..ff8589197 100644 --- a/src/routes/tutorial/[slug]/Editor.svelte +++ b/src/routes/tutorial/[slug]/Editor.svelte @@ -1,6 +1,6 @@ @@ -214,4 +263,10 @@ .fake-content { padding: 0 1rem; } + + @media (prefers-color-scheme: dark) { + .fake * { + color: #666; + } + } diff --git a/src/routes/tutorial/[slug]/state.js b/src/routes/tutorial/[slug]/state.js index 800c21db3..9932b214c 100644 --- a/src/routes/tutorial/[slug]/state.js +++ b/src/routes/tutorial/[slug]/state.js @@ -34,6 +34,12 @@ export function update_file(file) { /** @param {import('$lib/types').Stub[]} new_files */ export function reset_files(new_files) { + // if the selected file no longer exists, clear it + selected_name.update(($selected_name) => { + const file = new_files.find((file) => file.name === $selected_name); + return file?.name ?? null; + }); + files.set(new_files); adapter.reset(new_files); } From 4bda38b70f7caa76fa96a8d526bbe21b9decaff2 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 14 Mar 2023 11:32:57 -0400 Subject: [PATCH 044/326] show inline diagnostics (#17) (#257) Co-authored-by: Rich Harris --- content/tutorial/common/src/__client.js | 10 +++++++ content/tutorial/common/svelte.config.js | 6 +++++ package.json | 1 + pnpm-lock.yaml | 2 ++ src/routes/tutorial/[slug]/Editor.svelte | 32 +++++++++++++++++++++-- src/routes/tutorial/[slug]/Output.svelte | 6 +++++ src/routes/tutorial/[slug]/codemirror.css | 26 ++++++++++++++++++ src/routes/tutorial/[slug]/state.js | 27 ++++++++++++++++--- 8 files changed, 105 insertions(+), 5 deletions(-) diff --git a/content/tutorial/common/src/__client.js b/content/tutorial/common/src/__client.js index a6765fb35..4f4ffee9b 100644 --- a/content/tutorial/common/src/__client.js +++ b/content/tutorial/common/src/__client.js @@ -118,4 +118,14 @@ if (import.meta.hot) { '*' ); }); + + import.meta.hot.on('svelte:warnings', (data) => { + parent.postMessage( + { + type: 'warnings', + data + }, + '*' + ); + }); } diff --git a/content/tutorial/common/svelte.config.js b/content/tutorial/common/svelte.config.js index 29ce35b4b..66ff56f30 100644 --- a/content/tutorial/common/svelte.config.js +++ b/content/tutorial/common/svelte.config.js @@ -5,6 +5,12 @@ const config = { // Don't do this in your own apps unless you know what you're doing! // See https://kit.svelte.dev/docs/configuration#csrf for more info. csrf: false + }, + + vitePlugin: { + experimental: { + sendWarningsToBrowser: true + } } }; diff --git a/package.json b/package.json index ea2158932..4d3bc7fdc 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@codemirror/lang-html": "^6.4.2", "@codemirror/lang-javascript": "^6.1.4", "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.2.0", "@codemirror/state": "^6.2.0", "@codemirror/view": "^6.9.2", "@fontsource/roboto-mono": "^4.5.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60bac2584..7b5b7c8b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ specifiers: '@codemirror/lang-html': ^6.4.2 '@codemirror/lang-javascript': ^6.1.4 '@codemirror/language': ^6.6.0 + '@codemirror/lint': ^6.2.0 '@codemirror/state': ^6.2.0 '@codemirror/view': ^6.9.2 '@fontsource/roboto-mono': ^4.5.10 @@ -51,6 +52,7 @@ dependencies: '@codemirror/lang-html': 6.4.2 '@codemirror/lang-javascript': 6.1.4 '@codemirror/language': 6.6.0 + '@codemirror/lint': 6.2.0 '@codemirror/state': 6.2.0 '@codemirror/view': 6.9.2 '@fontsource/roboto-mono': 4.5.10 diff --git a/src/routes/tutorial/[slug]/Editor.svelte b/src/routes/tutorial/[slug]/Editor.svelte index ff8589197..b4ce4390e 100644 --- a/src/routes/tutorial/[slug]/Editor.svelte +++ b/src/routes/tutorial/[slug]/Editor.svelte @@ -6,6 +6,7 @@ import { EditorState } from '@codemirror/state'; import { indentWithTab } from '@codemirror/commands'; import { indentUnit } from '@codemirror/language'; + import { setDiagnostics } from '@codemirror/lint'; import { javascript } from '@codemirror/lang-javascript'; import { html } from '@codemirror/lang-html'; import { svelte } from '@replit/codemirror-lang-svelte'; @@ -13,7 +14,7 @@ import { HighlightStyle } from '@codemirror/language'; import { syntaxHighlighting } from '@codemirror/language'; import { afterNavigate, beforeNavigate } from '$app/navigation'; - import { files, selected_file, selected_name, update_file } from './state.js'; + import { files, selected_file, selected_name, update_file, warnings } from './state.js'; import './codemirror.css'; // TODO add more styles (selection ranges, etc) @@ -49,7 +50,31 @@ theme ]; - $: if (editor_view) select_state($selected_name); + $: if (editor_view) { + select_state($selected_name); + + if ($selected_name) { + const current_warnings = $warnings[$selected_name]; + + if (current_warnings) { + const diagnostics = current_warnings.map((warning) => { + /** @type {import('@codemirror/lint').Diagnostic} */ + const diagnostic = { + from: warning.start.character, + to: warning.end.character, + severity: 'warning', + message: warning.message + }; + + return diagnostic; + }); + + const transaction = setDiagnostics(editor_view.state, diagnostics); + + editor_view.dispatch(transaction); + } + } + } $: reset($files); @@ -178,6 +203,9 @@ reset($files); select_state($selected_name); + + // clear warnings + warnings.set({}); }); diff --git a/src/routes/tutorial/[slug]/Output.svelte b/src/routes/tutorial/[slug]/Output.svelte index 59f907648..a84a295fe 100644 --- a/src/routes/tutorial/[slug]/Output.svelte +++ b/src/routes/tutorial/[slug]/Output.svelte @@ -5,6 +5,7 @@ import Chrome from './Chrome.svelte'; import Loading from './Loading.svelte'; import { base, error, logs, progress, subscribe } from './adapter'; + import { warnings } from './state'; /** @type {import('$lib/types').Exercise} */ export let exercise; @@ -61,6 +62,11 @@ }, 1000); } else if (e.data.type === 'ping-pause') { clearTimeout(timeout); + } else if (e.data.type === 'warnings') { + warnings.update(($warnings) => ({ + ...$warnings, + [e.data.data.normalizedFilename]: e.data.data.allWarnings + })); } } diff --git a/src/routes/tutorial/[slug]/codemirror.css b/src/routes/tutorial/[slug]/codemirror.css index 63d9a3360..416da525a 100644 --- a/src/routes/tutorial/[slug]/codemirror.css +++ b/src/routes/tutorial/[slug]/codemirror.css @@ -49,6 +49,28 @@ color: var(--sk-text-2); } +.cm-editor .cm-tooltip { + border: none; + border-radius: 2px; + overflow: hidden; + margin: 0.4rem 0; + filter: drop-shadow(1px 2px 5px rgba(0,0,0,0.1)); +} +.cm-editor .cm-tooltip-hover {} +.cm-editor .cm-tooltip-below {} +.cm-editor .cm-tooltip-lint {} +.cm-editor .cm-tooltip-section {} +.cm-editor .cm-diagnostic { + border: none; + padding: 0.2rem 0.8rem; +} +.cm-editor .cm-diagnostic-warning { + /* background: hsl(36, 100%, 32%); */ + background: hsl(39, 100%, 10%); +} +.cm-editor .cm-diagnosticText {} + + @media (prefers-color-scheme: dark) { .cm-editor .cm-activeLineGutter { background-color: var(--sk-back-3); @@ -57,4 +79,8 @@ .cm-editor .cm-activeLine { background-color: var(--sk-back-2); } + + .cm-editor .cm-diagnostic-warning { + background: hsl(39, 100%, 20%); + } } \ No newline at end of file diff --git a/src/routes/tutorial/[slug]/state.js b/src/routes/tutorial/[slug]/state.js index 9932b214c..b9290b678 100644 --- a/src/routes/tutorial/[slug]/state.js +++ b/src/routes/tutorial/[slug]/state.js @@ -1,13 +1,34 @@ import { derived, writable } from 'svelte/store'; import * as adapter from './adapter.js'; -/** @type {import('svelte/store').Writable} */ +/** + * @template T + * @typedef {import('svelte/store').Writable} Writable + */ + +// TODO would be nice if svelte exported this type (maybe it does already?) +/** + * @typedef {{ + * code: string; + * start: { line: number, column: number, character: number }; + * end: { line: number, column: number, character: number }; + * pos: number; + * filename: string; + * frame: string; + * message: string; + * }} CompilerWarning + */ + +/** @type {Writable} */ export const files = writable([]); -/** @type {import('svelte/store').Writable>} */ +/** @type {Writable>} */ export const solution = writable({}); -/** @type {import('svelte/store').Writable} */ +/** @type {Writable>} */ +export const warnings = writable({}); + +/** @type {Writable} */ export const selected_name = writable(null); export const selected_file = derived([files, selected_name], ([$files, $selected_name]) => { From 2b1610c560712b565a6745e33baba7fecabd1bd2 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 14 Mar 2023 21:09:16 -0400 Subject: [PATCH 045/326] better mobile layout (#259) * mobile toggle * a11y * update lockfile * fix * fix tooltip positions * mobile filetree * debugging * wtf * throw CSS at the problem * remove debugging stuff * make view history-driven --------- Co-authored-by: Rich Harris --- package.json | 2 +- pnpm-lock.yaml | 8 +- src/routes/tutorial/[slug]/+page.svelte | 266 ++++++++++++------ src/routes/tutorial/[slug]/Editor.svelte | 5 +- src/routes/tutorial/[slug]/Output.svelte | 6 +- .../tutorial/[slug]/ScreenToggle.svelte | 74 +++-- .../tutorial/[slug]/ToggleButton.svelte | 83 ++++++ .../tutorial/[slug]/filetree/File.svelte | 8 +- .../tutorial/[slug]/filetree/Filetree.svelte | 24 +- .../tutorial/[slug]/filetree/Folder.svelte | 40 ++- .../tutorial/[slug]/filetree/Item.svelte | 3 +- .../tutorial/[slug]/filetree/context.js | 2 +- 12 files changed, 368 insertions(+), 153 deletions(-) create mode 100644 src/routes/tutorial/[slug]/ToggleButton.svelte diff --git a/package.json b/package.json index 4d3bc7fdc..ca5c1cca4 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@lezer/javascript": "^1.4.1", "@lezer/lr": "^1.3.3", "@replit/codemirror-lang-svelte": "^6.0.0", - "@rich_harris/svelte-split-pane": "^1.0.1", + "@rich_harris/svelte-split-pane": "^1.0.2", "@webcontainer/api": "^1.0.2", "adm-zip": "^0.5.10", "ansi-to-html": "^0.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7b5b7c8b2..32c554354 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,7 +17,7 @@ specifiers: '@lezer/lr': ^1.3.3 '@playwright/test': ^1.31.2 '@replit/codemirror-lang-svelte': ^6.0.0 - '@rich_harris/svelte-split-pane': ^1.0.1 + '@rich_harris/svelte-split-pane': ^1.0.2 '@sveltejs/adapter-vercel': 2.3.1 '@sveltejs/kit': ^1.11.0 '@sveltejs/site-kit': ^3.2.2 @@ -61,7 +61,7 @@ dependencies: '@lezer/javascript': 1.4.1 '@lezer/lr': 1.3.3 '@replit/codemirror-lang-svelte': 6.0.0_ybny7xhlf2ysg4majw54z4nkly - '@rich_harris/svelte-split-pane': 1.0.1_svelte@3.56.0 + '@rich_harris/svelte-split-pane': 1.0.2_svelte@3.56.0 '@webcontainer/api': 1.0.2 adm-zip: 0.5.10 ansi-to-html: 0.7.2 @@ -730,8 +730,8 @@ packages: '@lezer/lr': 1.3.3 dev: false - /@rich_harris/svelte-split-pane/1.0.1_svelte@3.56.0: - resolution: {integrity: sha512-/11fp3792qh4pXxO3XtVmIQf6SCDFKcQyyQvVOAKr8U5tG0Z4QaLEXsyOKOpeAkngqWT1dbBfjVynUXa7kb1EA==} + /@rich_harris/svelte-split-pane/1.0.2_svelte@3.56.0: + resolution: {integrity: sha512-8Qhno4kshsBFWC3MnM0++TIbyAvbiuCWXxiCA38VhCr/ZFKQcS8k9mjzWt9eynQjgkyZHejXN0j0V7ws7LV1KA==} peerDependencies: svelte: ^3.54.0 dependencies: diff --git a/src/routes/tutorial/[slug]/+page.svelte b/src/routes/tutorial/[slug]/+page.svelte index 6bb3bee4e..600a097bf 100644 --- a/src/routes/tutorial/[slug]/+page.svelte +++ b/src/routes/tutorial/[slug]/+page.svelte @@ -1,12 +1,10 @@ -
    - {#each labels as label, index} - - {/each} +
    + + +
    diff --git a/src/routes/tutorial/[slug]/ToggleButton.svelte b/src/routes/tutorial/[slug]/ToggleButton.svelte new file mode 100644 index 000000000..f16e49a69 --- /dev/null +++ b/src/routes/tutorial/[slug]/ToggleButton.svelte @@ -0,0 +1,83 @@ + + + + + + diff --git a/src/routes/tutorial/[slug]/filetree/File.svelte b/src/routes/tutorial/[slug]/filetree/File.svelte index e762a51cb..6b65bf25b 100644 --- a/src/routes/tutorial/[slug]/filetree/File.svelte +++ b/src/routes/tutorial/[slug]/filetree/File.svelte @@ -2,7 +2,7 @@ import * as context from './context.js'; import Item from './Item.svelte'; import file_icon from '$lib/icons/file.svg'; - import { selected_name, select_file, solution } from '../state.js'; + import { selected_name, solution } from '../state.js'; /** @type {import('$lib/types').FileStub} */ export let file; @@ -10,11 +10,11 @@ /** @type {number} */ export let depth; - const { rename, remove, readonly } = context.get(); + const { rename, remove, select } = context.get(); let renaming = false; - $: can_remove = !$readonly && !$solution[file.name]; + $: can_remove = !$solution[file.name]; /** @type {import('./ContextMenu.svelte').MenuItems} */ $: actions = can_remove @@ -45,7 +45,7 @@ icon={file_icon} selected={file.name === $selected_name} {actions} - on:click={() => select_file(file.name)} + on:click={() => select(file.name)} on:edit={() => { renaming = true; }} diff --git a/src/routes/tutorial/[slug]/filetree/Filetree.svelte b/src/routes/tutorial/[slug]/filetree/Filetree.svelte index 64252c98f..e23abd1a1 100644 --- a/src/routes/tutorial/[slug]/filetree/Filetree.svelte +++ b/src/routes/tutorial/[slug]/filetree/Filetree.svelte @@ -1,4 +1,5 @@ \n'; - await page.locator(editor_focus_selector).fill(code); + await page.locator(editor_selector).fill(code); // move the cursor into the script tag - await page.keyboard.press('PageUp', { delay: 500 }); - await page.keyboard.press('ArrowDown', { delay: 500 }); + await page.waitForTimeout(500); + await page.keyboard.press('PageUp'); + await page.waitForTimeout(500); + await page.keyboard.press('ArrowDown'); // wait a little because the above operation is flaky await page.waitForTimeout(500); From ec0fa015771f1d127397569eafaa8702fbb64253 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 15 Mar 2023 12:29:02 -0400 Subject: [PATCH 048/326] fix cursor styles - closes #262 (#264) Co-authored-by: Rich Harris --- src/routes/tutorial/[slug]/codemirror.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/routes/tutorial/[slug]/codemirror.css b/src/routes/tutorial/[slug]/codemirror.css index 416da525a..3a0f001be 100644 --- a/src/routes/tutorial/[slug]/codemirror.css +++ b/src/routes/tutorial/[slug]/codemirror.css @@ -32,6 +32,10 @@ width: 1rem; } +.cm-focused .cm-cursor { + border-left-color: var(--sk-text-3); +} + .cm-editor .cm-content { padding: 1rem 0; } From d5b80c55346779a43b15e162b3f4efc488f6d0ce Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 15 Mar 2023 14:04:38 -0400 Subject: [PATCH 049/326] Tweaks (#265) * better highlight * fix light mode diagnostic styling * always open external URLs in a new tab * tweak each block exercise * more * tidy up await block exercise * more --------- Co-authored-by: Rich Harris --- .../04-logic/04-each-blocks/README.md | 22 +++++---- .../04-each-blocks/app-a/src/lib/App.svelte | 13 +++--- .../04-each-blocks/app-b/src/lib/App.svelte | 5 +-- .../04-logic/05-keyed-each-blocks/README.md | 4 +- .../app-a/src/lib/Thing.svelte | 10 +---- .../app-b/src/lib/Thing.svelte | 45 ------------------- .../06-await-blocks/app-a/src/lib/App.svelte | 16 ++++--- .../app-a/src/routes/random-number/+server.js | 23 ++++++++++ .../06-await-blocks/app-b/src/lib/App.svelte | 16 ++++--- .../05-events/01-dom-events/README.md | 2 +- .../05-events/02-inline-handlers/README.md | 17 +++++-- .../05-events/03-event-modifiers/README.md | 4 +- .../app-a/src/lib/App.svelte | 4 +- content/tutorial/common/src/__client.js | 16 +++++++ src/routes/tutorial/[slug]/Sidebar.svelte | 2 +- src/routes/tutorial/[slug]/codemirror.css | 7 ++- 16 files changed, 106 insertions(+), 100 deletions(-) delete mode 100644 content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte create mode 100644 content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/routes/random-number/+server.js diff --git a/content/tutorial/01-svelte/04-logic/04-each-blocks/README.md b/content/tutorial/01-svelte/04-logic/04-each-blocks/README.md index f277503ce..f345bca34 100644 --- a/content/tutorial/01-svelte/04-logic/04-each-blocks/README.md +++ b/content/tutorial/01-svelte/04-logic/04-each-blocks/README.md @@ -6,11 +6,13 @@ If you need to loop over lists of data, use an `each` block: ```svelte ``` @@ -19,10 +21,12 @@ If you need to loop over lists of data, use an `each` block: You can get the current _index_ as a second argument, like so: ```svelte -{#each cats as cat, i} -
  • - {i + 1}: {cat.name} -
  • +{#each cats as cat+++, i}+++ +
  • + + +++{i + 1}:+++ {cat.name} + +
  • {/each} ``` diff --git a/content/tutorial/01-svelte/04-logic/04-each-blocks/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/04-logic/04-each-blocks/app-a/src/lib/App.svelte index 490c5f6c3..501254eb1 100644 --- a/content/tutorial/01-svelte/04-logic/04-each-blocks/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/04-logic/04-each-blocks/app-a/src/lib/App.svelte @@ -19,13 +19,10 @@ diff --git a/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte index 5676c3c59..7d5d7187a 100644 --- a/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte @@ -20,10 +20,7 @@
      {#each cats as { id, name }, i}
    • - + {i + 1}: {name}
    • diff --git a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/README.md b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/README.md index d6c0aa3c2..77bf35720 100644 --- a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/README.md +++ b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/README.md @@ -4,14 +4,14 @@ title: Keyed each blocks By default, when you modify the value of an `each` block, it will add and remove items at the _end_ of the block, and update any values that have changed. That might not be what you want. -It's easier to show why than to explain. Click the 'Remove first thing' button a few times, and notice what happens: It removes the first `` component, but the _last_ DOM node. Then it updates the `name` value in the remaining DOM nodes, but not the emoji. +It's easier to show why than to explain. Click the 'Remove first thing' button a few times, and notice what happens: It removes the first `` component, but the _last_ DOM node. Then it updates the `name` value in the remaining DOM nodes, but not the emoji, which in `Thing.svelte` is fixed when the component is created. Instead, we'd like to remove only the first `` component and its DOM node, and leave the others unaffected. To do that, we specify a unique identifier (or "key") for the `each` block: ```svelte -{#each things as thing (thing.id)} +{#each things as thing (+++thing.id+++)} {/each} ``` diff --git a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte index 3eb272b93..f5284f746 100644 --- a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte +++ b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte @@ -1,6 +1,4 @@

      diff --git a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte deleted file mode 100644 index 9ca6b8b17..000000000 --- a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-b/src/lib/Thing.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - -

      - The emoji for {name} is {emoji} -

      - - diff --git a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte index 524f9bfa0..7af6f29b5 100644 --- a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte @@ -1,14 +1,14 @@ - +

      {promise}

      diff --git a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/routes/random-number/+server.js b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/routes/random-number/+server.js new file mode 100644 index 000000000..e051d80bd --- /dev/null +++ b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/routes/random-number/+server.js @@ -0,0 +1,23 @@ +export async function GET(req) { + const query = req.url.searchParams; + let min = query.get('min') || '0'; + let max = query.get('max') || '100'; + min = +min; + max = +max; + + // simulate a long delay + await new Promise((res) => setTimeout(res, 1000)); + + // fail sometimes + if (Math.random() < 0.333) { + return new Response(`Failed to generate random number. Please try again`, { + status: 400, + headers: { 'Access-Control-Allow-Origin': '*' } + }); + } + + const num = min + Math.round(Math.random() * (max - min)); + return new Response(String(num), { + headers: { 'Access-Control-Allow-Origin': '*' } + }); +} \ No newline at end of file diff --git a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-b/src/lib/App.svelte index 7a0cd07fd..73b7d3f19 100644 --- a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-b/src/lib/App.svelte @@ -1,14 +1,14 @@ - + {#await promise}

      ...waiting

      diff --git a/content/tutorial/01-svelte/05-events/01-dom-events/README.md b/content/tutorial/01-svelte/05-events/01-dom-events/README.md index 64cfa3217..a0dfceef7 100644 --- a/content/tutorial/01-svelte/05-events/01-dom-events/README.md +++ b/content/tutorial/01-svelte/05-events/01-dom-events/README.md @@ -5,7 +5,7 @@ title: DOM events As we've briefly seen already, you can listen to any event on an element with the `on:` directive: ```svelte -
      +
      The mouse position is {m.x} x {m.y}
      ``` diff --git a/content/tutorial/01-svelte/05-events/02-inline-handlers/README.md b/content/tutorial/01-svelte/05-events/02-inline-handlers/README.md index 40585909f..8d59e4dba 100644 --- a/content/tutorial/01-svelte/05-events/02-inline-handlers/README.md +++ b/content/tutorial/01-svelte/05-events/02-inline-handlers/README.md @@ -5,11 +5,22 @@ title: Inline handlers You can also declare event handlers inline: ```svelte -
      + + +
      { + m = { x: e.clientX, y: e.clientY }; + }}+++ +> The mouse position is {m.x} x {m.y}
      ``` -The quote marks are optional, but they're helpful for syntax highlighting in some environments. - > In some frameworks you may see recommendations to avoid inline event handlers for performance reasons, particularly inside loops. That advice doesn't apply to Svelte — the compiler will always do the right thing, whichever form you choose. diff --git a/content/tutorial/01-svelte/05-events/03-event-modifiers/README.md b/content/tutorial/01-svelte/05-events/03-event-modifiers/README.md index 71954b2fc..4661d8de4 100644 --- a/content/tutorial/01-svelte/05-events/03-event-modifiers/README.md +++ b/content/tutorial/01-svelte/05-events/03-event-modifiers/README.md @@ -7,11 +7,11 @@ DOM event handlers can have _modifiers_ that alter their behaviour. For example, ```svelte - ``` diff --git a/content/tutorial/01-svelte/05-events/03-event-modifiers/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/05-events/03-event-modifiers/app-a/src/lib/App.svelte index 0a000c832..c56713d01 100644 --- a/content/tutorial/01-svelte/05-events/03-event-modifiers/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/05-events/03-event-modifiers/app-a/src/lib/App.svelte @@ -4,4 +4,6 @@ } - + diff --git a/content/tutorial/common/src/__client.js b/content/tutorial/common/src/__client.js index 4f4ffee9b..e735c3a65 100644 --- a/content/tutorial/common/src/__client.js +++ b/content/tutorial/common/src/__client.js @@ -93,6 +93,22 @@ window.addEventListener('focusin', (e) => { } }); +window.addEventListener('click', (e) => { + let node = e.target; + while (node) { + if (node.nodeName === 'A') { + const href = node.href; + const url = new URL(href); + + if (url.origin !== location.origin) { + e.preventDefault(); + window.open(url, '_blank'); + } + } + node = node.parent; + } +}); + function ping() { parent.postMessage( { diff --git a/src/routes/tutorial/[slug]/Sidebar.svelte b/src/routes/tutorial/[slug]/Sidebar.svelte index 541e0bc96..42f5dabd7 100644 --- a/src/routes/tutorial/[slug]/Sidebar.svelte +++ b/src/routes/tutorial/[slug]/Sidebar.svelte @@ -130,7 +130,7 @@ } .text :global(pre) :global(.highlight.add) { - --color: rgba(0, 255, 0, 0.1); + --color: rgba(0, 255, 0, 0.18); } .text :global(pre) :global(.highlight.remove) { diff --git a/src/routes/tutorial/[slug]/codemirror.css b/src/routes/tutorial/[slug]/codemirror.css index 3a0f001be..26526680b 100644 --- a/src/routes/tutorial/[slug]/codemirror.css +++ b/src/routes/tutorial/[slug]/codemirror.css @@ -69,8 +69,7 @@ padding: 0.2rem 0.8rem; } .cm-editor .cm-diagnostic-warning { - /* background: hsl(36, 100%, 32%); */ - background: hsl(39, 100%, 10%); + background: hsl(39, 100%, 70%); } .cm-editor .cm-diagnosticText {} @@ -87,4 +86,8 @@ .cm-editor .cm-diagnostic-warning { background: hsl(39, 100%, 20%); } + + .cm-editor .cm-diagnostic-warning { + background: hsl(39, 100%, 10%); + } } \ No newline at end of file From 8fac2beac2d2c41b42d71e2d88cacd66c5078ef5 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 16 Mar 2023 14:21:06 -0400 Subject: [PATCH 050/326] tweak --- .../tutorial/01-svelte/05-events/05-event-forwarding/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorial/01-svelte/05-events/05-event-forwarding/README.md b/content/tutorial/01-svelte/05-events/05-event-forwarding/README.md index 3daff332a..41467fd4f 100644 --- a/content/tutorial/01-svelte/05-events/05-event-forwarding/README.md +++ b/content/tutorial/01-svelte/05-events/05-event-forwarding/README.md @@ -30,5 +30,5 @@ But that's a lot of code to write, so Svelte gives us an equivalent shorthand import Inner from './Inner.svelte'; - + ``` From 843014076a34accae136ba1241c37ed8e51078ea Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 16 Mar 2023 15:44:29 -0400 Subject: [PATCH 051/326] escape html in terminal (#267) Co-authored-by: Rich Harris --- src/lib/client/adapters/webcontainer/index.js | 4 ++-- src/lib/server/markdown.js | 17 +++-------------- src/lib/utils.js | 12 ++++++++++++ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/lib/client/adapters/webcontainer/index.js b/src/lib/client/adapters/webcontainer/index.js index 5e977162f..922643f99 100644 --- a/src/lib/client/adapters/webcontainer/index.js +++ b/src/lib/client/adapters/webcontainer/index.js @@ -1,7 +1,7 @@ import { WebContainer } from '@webcontainer/api'; import base64 from 'base64-js'; import AnsiToHtml from 'ansi-to-html'; -import { get_depth } from '../../../utils.js'; +import { escape_html, get_depth } from '../../../utils.js'; import { ready } from '../common/index.js'; const converter = new AnsiToHtml({ @@ -59,7 +59,7 @@ export async function create(base, error, progress, logs) { // clear screen logs.set([]); } else { - const log = converter.toHtml(chunk); + const log = converter.toHtml(escape_html(chunk)); logs.update(($logs) => [...$logs, log]); } } diff --git a/src/lib/server/markdown.js b/src/lib/server/markdown.js index eaadb73d3..d92d71c28 100644 --- a/src/lib/server/markdown.js +++ b/src/lib/server/markdown.js @@ -4,6 +4,7 @@ import 'prismjs/components/prism-diff.js'; import 'prismjs/components/prism-typescript.js'; import 'prism-svelte'; import { marked } from 'marked'; +import { escape_html } from '$lib/utils'; const languages = { bash: 'bash', @@ -17,18 +18,6 @@ const languages = { '': '' }; -/** @type {Record} */ -const chars = { - '&': '&', - '<': '<', - '>': '>' -}; - -/** @param {string} html */ -function escape(html) { - return html.replace(/[&<>]/g, (c) => chars[c]); -} - const delimiter_substitutes = { '+++': ' ', '---': ' ', @@ -84,7 +73,7 @@ const default_renderer = { return { type, - content: escape(content) + content: escape_html(content) }; }); @@ -99,7 +88,7 @@ const default_renderer = { const plang = languages[lang]; const highlighted = plang ? PrismJS.highlight(source, PrismJS.languages[plang], language) - : escape(source); + : escape_html(source); html = `
      ${ options.file ? `${options.file}` : '' diff --git a/src/lib/utils.js b/src/lib/utils.js index 07bb5146e..b4c4ea460 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -2,3 +2,15 @@ export function get_depth(name) { return name.split('/').length - 1; } + +/** @type {Record} */ +const chars = { + '&': '&', + '<': '<', + '>': '>' +}; + +/** @param {string} html */ +export function escape_html(html) { + return html.replace(/[&<>]/g, (c) => chars[c]); +} \ No newline at end of file From bf5fda6053ff856231aaba5206ae43995b98364e Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Fri, 17 Mar 2023 18:08:02 +0100 Subject: [PATCH 052/326] docs: add svelte:element/document chapters (#270) from old tutorial - also updates some existing content --- .../app-a/src/lib/Folder.svelte | 11 +-- .../01-svelte-self/app-b/src/lib/File.svelte | 17 ---- .../app-b/src/lib/Folder.svelte | 11 +-- .../03-svelte-element/README.md | 23 +++++ .../app-a/src/lib/App.svelte | 18 ++++ .../app-b/src/lib/App.svelte | 12 +++ .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../06-svelte-document/README.md | 13 +++ .../app-a/src/lib/App.svelte | 10 ++ .../app-b/src/lib/App.svelte | 10 ++ .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-a/static/kitten.png | Bin .../app-b/src/lib/App.svelte | 0 .../07-svelte-options/app-b/src/lib/flash.js | 13 --- .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-a/src/lib/Todo.svelte | 12 ++- .../app-a/src/lib/flash.js | 0 .../app-b/src/lib/App.svelte | 0 .../app-b/src/lib/Todo.svelte | 12 ++- .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-a/src/lib/Box.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../app-b/src/lib/Box.svelte | 0 content/tutorial/common/package-lock.json | 14 +-- content/tutorial/common/package.json | 2 +- package.json | 2 +- pnpm-lock.yaml | 88 ++++++++---------- 38 files changed, 158 insertions(+), 110 deletions(-) delete mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/File.svelte create mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/README.md create mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-a/src/lib/App.svelte create mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-b/src/lib/App.svelte rename content/tutorial/03-advanced-svelte/09-special-elements/{03-svelte-window => 04-svelte-window}/README.md (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{03-svelte-window => 04-svelte-window}/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{03-svelte-window => 04-svelte-window}/app-b/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{04-svelte-window-bindings => 05-svelte-window-bindings}/README.md (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{04-svelte-window-bindings => 05-svelte-window-bindings}/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{04-svelte-window-bindings => 05-svelte-window-bindings}/app-b/src/lib/App.svelte (100%) create mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/06-svelte-document/README.md create mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/06-svelte-document/app-a/src/lib/App.svelte create mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/06-svelte-document/app-b/src/lib/App.svelte rename content/tutorial/03-advanced-svelte/09-special-elements/{05-svelte-body => 07-svelte-body}/README.md (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{05-svelte-body => 07-svelte-body}/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{05-svelte-body => 07-svelte-body}/app-a/static/kitten.png (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{05-svelte-body => 07-svelte-body}/app-b/src/lib/App.svelte (100%) delete mode 100644 content/tutorial/03-advanced-svelte/09-special-elements/07-svelte-options/app-b/src/lib/flash.js rename content/tutorial/03-advanced-svelte/09-special-elements/{06-svelte-head => 08-svelte-head}/README.md (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{06-svelte-head => 08-svelte-head}/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{06-svelte-head => 08-svelte-head}/app-b/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{07-svelte-options => 09-svelte-options}/README.md (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{07-svelte-options => 09-svelte-options}/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{07-svelte-options => 09-svelte-options}/app-a/src/lib/Todo.svelte (70%) rename content/tutorial/03-advanced-svelte/09-special-elements/{07-svelte-options => 09-svelte-options}/app-a/src/lib/flash.js (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{07-svelte-options => 09-svelte-options}/app-b/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{07-svelte-options => 09-svelte-options}/app-b/src/lib/Todo.svelte (72%) rename content/tutorial/03-advanced-svelte/09-special-elements/{08-svelte-fragment => 10-svelte-fragment}/README.md (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{08-svelte-fragment => 10-svelte-fragment}/app-a/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{08-svelte-fragment => 10-svelte-fragment}/app-a/src/lib/Box.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{08-svelte-fragment => 10-svelte-fragment}/app-b/src/lib/App.svelte (100%) rename content/tutorial/03-advanced-svelte/09-special-elements/{08-svelte-fragment => 10-svelte-fragment}/app-b/src/lib/Box.svelte (100%) diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-a/src/lib/Folder.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-a/src/lib/Folder.svelte index 770339c77..cf49668e9 100644 --- a/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-a/src/lib/Folder.svelte +++ b/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-a/src/lib/Folder.svelte @@ -10,9 +10,7 @@ } -{name} + {#if expanded}
        @@ -29,13 +27,14 @@ {/if} diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/Folder.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/Folder.svelte index 213a3b598..dcf80e364 100644 --- a/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/Folder.svelte +++ b/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/Folder.svelte @@ -10,9 +10,7 @@ } -{name} + {#if expanded}
          @@ -29,13 +27,14 @@ {/if} diff --git a/content/tutorial/01-svelte/08-stores/01-writable-stores/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/08-stores/01-writable-stores/app-b/src/lib/App.svelte deleted file mode 100644 index a4d9b16dc..000000000 --- a/content/tutorial/01-svelte/08-stores/01-writable-stores/app-b/src/lib/App.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - -

          The count is {count_value}

          - - - - diff --git a/content/tutorial/01-svelte/08-stores/01-writable-stores/app-b/src/lib/stores.js b/content/tutorial/01-svelte/08-stores/01-writable-stores/app-b/src/lib/stores.js deleted file mode 100644 index d432d339e..000000000 --- a/content/tutorial/01-svelte/08-stores/01-writable-stores/app-b/src/lib/stores.js +++ /dev/null @@ -1,3 +0,0 @@ -import { writable } from 'svelte/store'; - -export const count = writable(0); diff --git a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Decrementer.svelte b/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Decrementer.svelte deleted file mode 100644 index 596ba4bba..000000000 --- a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Decrementer.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Incrementer.svelte b/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Incrementer.svelte deleted file mode 100644 index 1fb7dea3c..000000000 --- a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Incrementer.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Resetter.svelte b/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Resetter.svelte deleted file mode 100644 index 9c8809961..000000000 --- a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/Resetter.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/stores.js b/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/stores.js deleted file mode 100644 index d432d339e..000000000 --- a/content/tutorial/01-svelte/08-stores/02-auto-subscriptions/app-b/src/lib/stores.js +++ /dev/null @@ -1,3 +0,0 @@ -import { writable } from 'svelte/store'; - -export const count = writable(0); diff --git a/content/tutorial/01-svelte/08-stores/03-readable-stores/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/08-stores/03-readable-stores/app-b/src/lib/App.svelte deleted file mode 100644 index 463523a03..000000000 --- a/content/tutorial/01-svelte/08-stores/03-readable-stores/app-b/src/lib/App.svelte +++ /dev/null @@ -1,15 +0,0 @@ - - -

          The time is {formatter.format($time)}

          diff --git a/content/tutorial/01-svelte/08-stores/04-derived-stores/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/08-stores/04-derived-stores/app-b/src/lib/App.svelte deleted file mode 100644 index 782ff95d3..000000000 --- a/content/tutorial/01-svelte/08-stores/04-derived-stores/app-b/src/lib/App.svelte +++ /dev/null @@ -1,21 +0,0 @@ - - -

          The time is {formatter.format($time)}

          - -

          - This page has been open for - {$elapsed} - {$elapsed === 1 ? 'second' : 'seconds'} -

          diff --git a/content/tutorial/01-svelte/08-stores/05-custom-stores/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/08-stores/05-custom-stores/app-b/src/lib/App.svelte deleted file mode 100644 index dbdd299d6..000000000 --- a/content/tutorial/01-svelte/08-stores/05-custom-stores/app-b/src/lib/App.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - -

          The count is {$count}

          - - - - diff --git a/content/tutorial/01-svelte/08-stores/06-store-bindings/app-b/src/lib/stores.js b/content/tutorial/01-svelte/08-stores/06-store-bindings/app-b/src/lib/stores.js deleted file mode 100644 index 58f25475c..000000000 --- a/content/tutorial/01-svelte/08-stores/06-store-bindings/app-b/src/lib/stores.js +++ /dev/null @@ -1,5 +0,0 @@ -import { writable, derived } from 'svelte/store'; - -export const name = writable('world'); - -export const greeting = derived(name, ($name) => `Hello ${$name}!`); diff --git a/content/tutorial/02-sveltekit/05-api-routes/01-get-handlers/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/05-api-routes/01-get-handlers/app-b/src/routes/+page.svelte deleted file mode 100644 index 99955f2ed..000000000 --- a/content/tutorial/02-sveltekit/05-api-routes/01-get-handlers/app-b/src/routes/+page.svelte +++ /dev/null @@ -1,15 +0,0 @@ - - - - -{#if number !== undefined} -

          You rolled a {number}

          -{/if} diff --git a/content/tutorial/02-sveltekit/05-api-routes/02-post-put-patch-delete/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/05-api-routes/02-post-put-patch-delete/app-b/src/routes/+page.svelte deleted file mode 100644 index 1333ed77b..000000000 --- a/content/tutorial/02-sveltekit/05-api-routes/02-post-put-patch-delete/app-b/src/routes/+page.svelte +++ /dev/null @@ -1 +0,0 @@ -TODO diff --git a/content/tutorial/03-advanced-svelte/05-bindings/06-component-bindings/app-b/src/lib/Keypad.svelte b/content/tutorial/03-advanced-svelte/05-bindings/06-component-bindings/app-b/src/lib/Keypad.svelte deleted file mode 100644 index b94e94453..000000000 --- a/content/tutorial/03-advanced-svelte/05-bindings/06-component-bindings/app-b/src/lib/Keypad.svelte +++ /dev/null @@ -1,44 +0,0 @@ - - -
          - - - - - - - - - - - - - -
          - - diff --git a/content/tutorial/03-advanced-svelte/05-bindings/07-component-this/app-b/src/lib/InputField.svelte b/content/tutorial/03-advanced-svelte/05-bindings/07-component-this/app-b/src/lib/InputField.svelte deleted file mode 100644 index caf9c2c9e..000000000 --- a/content/tutorial/03-advanced-svelte/05-bindings/07-component-this/app-b/src/lib/InputField.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/App.svelte deleted file mode 100755 index eed35a30e..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/App.svelte +++ /dev/null @@ -1,62 +0,0 @@ - - -

          Projects

          - -
            -
          • - -
            - -

            - Those interface tests are now passing. -

            -
            -
            -
            -
          • -
          • - -
          • -
          - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/Comment.svelte b/content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/Comment.svelte deleted file mode 100755 index a14ddebef..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/04-optional-slots/app-b/src/lib/Comment.svelte +++ /dev/null @@ -1,66 +0,0 @@ - - -
          -
          - -
          -

          {name}

          - -
          -
          -
          - -
          -
          - - diff --git a/content/tutorial/03-advanced-svelte/08-context/01-context-api/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/08-context/01-context-api/app-b/src/lib/App.svelte deleted file mode 100644 index a5bcd9c09..000000000 --- a/content/tutorial/03-advanced-svelte/08-context/01-context-api/app-b/src/lib/App.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - diff --git a/content/tutorial/03-advanced-svelte/08-context/01-context-api/app-b/src/lib/mapbox.js b/content/tutorial/03-advanced-svelte/08-context/01-context-api/app-b/src/lib/mapbox.js deleted file mode 100644 index 42660d35a..000000000 --- a/content/tutorial/03-advanced-svelte/08-context/01-context-api/app-b/src/lib/mapbox.js +++ /dev/null @@ -1,8 +0,0 @@ -import mapbox from 'mapbox-gl'; - -// https://docs.mapbox.com/help/glossary/access-token/ -mapbox.accessToken = MAPBOX_ACCESS_TOKEN; - -const key = {}; - -export { mapbox, key }; diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/App.svelte deleted file mode 100644 index 6046e6ced..000000000 --- a/content/tutorial/03-advanced-svelte/09-special-elements/01-svelte-self/app-b/src/lib/App.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/BlueThing.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/BlueThing.svelte deleted file mode 100644 index 551f1afbb..000000000 --- a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/BlueThing.svelte +++ /dev/null @@ -1,7 +0,0 @@ -Blue thing - - diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/GreenThing.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/GreenThing.svelte deleted file mode 100644 index a224720e6..000000000 --- a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/GreenThing.svelte +++ /dev/null @@ -1,7 +0,0 @@ -Green thing - - diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/RedThing.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/RedThing.svelte deleted file mode 100644 index 9774363c1..000000000 --- a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-b/src/lib/RedThing.svelte +++ /dev/null @@ -1,7 +0,0 @@ -Red thing - - diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/09-svelte-options/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/09-svelte-options/app-b/src/lib/App.svelte deleted file mode 100644 index 5be861d9c..000000000 --- a/content/tutorial/03-advanced-svelte/09-special-elements/09-svelte-options/app-b/src/lib/App.svelte +++ /dev/null @@ -1,34 +0,0 @@ - - -

          Todos

          -{#each todos as todo} - toggle(todo)} /> -{/each} diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/10-svelte-fragment/app-b/src/lib/Box.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/10-svelte-fragment/app-b/src/lib/Box.svelte deleted file mode 100644 index bd9bc6c7f..000000000 --- a/content/tutorial/03-advanced-svelte/09-special-elements/10-svelte-fragment/app-b/src/lib/Box.svelte +++ /dev/null @@ -1,21 +0,0 @@ -
          - No header was provided -

          Some content between header and footer

          - -
          - - diff --git a/content/tutorial/03-advanced-svelte/10-module-context/01-sharing-code/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/10-module-context/01-sharing-code/app-b/src/lib/App.svelte deleted file mode 100644 index 9c127ce0d..000000000 --- a/content/tutorial/03-advanced-svelte/10-module-context/01-sharing-code/app-b/src/lib/App.svelte +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/lib/server/content.js b/src/lib/server/content.js index cfdd1bac5..c827e3149 100644 --- a/src/lib/server/content.js +++ b/src/lib/server/content.js @@ -103,6 +103,19 @@ export function get_exercise(slug) { const b = walk(`${dir}/app-b`); const has_solution = Object.keys(b).length > 0; + // ensure no duplicate content + for (const key in b) { + if (!a[key]) continue; + if (b[key].type !== 'file') continue; + + const a_ = /** @type {import('$lib/types').FileStub} */ (a[key]); + const b_ = /** @type {import('$lib/types').FileStub} */ (b[key]); + + if (a_.contents === b_.contents) { + throw new Error(`duplicate file: ${exercise_slug} ${key}`) + } + } + const part_meta = json(`content/tutorial/${part_dir}/meta.json`); const chapter_meta = json(`content/tutorial/${part_dir}/${chapter_dir}/meta.json`); From 1bf38b7a904f058f1e63e2dfd7621c62cde58458 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 20 Mar 2023 23:13:11 -0400 Subject: [PATCH 060/326] Tighten up styles (#278) * update styles * update exercise * remove duplicate file * more styles * nicer styles * more tweaks --------- Co-authored-by: Rich Harris --- .../app-a/src/lib/PackageInfo.svelte | 8 - .../app-a/src/lib/Thing.svelte | 24 +-- .../01-dom-events/app-a/src/lib/App.svelte | 4 + .../01-dom-events/app-b/src/lib/App.svelte | 4 + .../app-a/src/lib/App.svelte | 19 -- .../app-b/src/lib/App.svelte | 4 + .../06-dom-event-forwarding/README.md | 4 +- .../app-a/src/lib/App.svelte | 10 +- .../app-a/src/lib/BigRedButton.svelte | 25 +++ .../app-a/src/lib/CustomButton.svelte | 24 --- .../app-a/src/lib/horn.mp3 | Bin 0 -> 30948 bytes .../app-b/src/lib/BigRedButton.svelte | 25 +++ .../app-b/src/lib/CustomButton.svelte | 24 --- .../app-a/src/lib/App.svelte | 11 -- .../app-b/src/lib/App.svelte | 11 -- .../app-a/src/lib/App.svelte | 10 +- .../app-b/src/lib/App.svelte | 8 - .../02-ondestroy/app-a/src/lib/Timer.svelte | 7 +- .../common/src/routes/+layout.svelte | 26 --- .../app-a/src/lib/App.svelte | 4 +- .../01-animate/app-a/src/lib/App.svelte | 5 +- .../05-bind-this/app-a/src/lib/App.svelte | 11 +- .../05-bind-this/app-b/src/lib/App.svelte | 11 +- .../01-classes/app-a/src/lib/App.svelte | 4 - .../01-classes/app-b/src/lib/App.svelte | 4 - .../app-a/src/lib/Folder.svelte | 1 + .../app-b/src/lib/Folder.svelte | 1 + .../app-a/src/lib/BlueThing.svelte | 4 +- .../app-a/src/lib/GreenThing.svelte | 4 +- .../app-a/src/lib/RedThing.svelte | 4 +- .../app-a/src/lib/App.svelte | 6 +- .../app-b/src/lib/App.svelte | 4 +- .../11-special-tags/meta.json | 2 +- .../common/src/routes/+layout.svelte | 26 --- .../app-a/src/routes/+layout.svelte | 2 +- content/tutorial/common/src/app.html | 171 +++++++++++++++--- 36 files changed, 250 insertions(+), 262 deletions(-) delete mode 100644 content/tutorial/01-svelte/05-events/02-inline-handlers/app-a/src/lib/App.svelte create mode 100644 content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/BigRedButton.svelte delete mode 100644 content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/CustomButton.svelte create mode 100644 content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/horn.mp3 create mode 100644 content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-b/src/lib/BigRedButton.svelte delete mode 100644 content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-b/src/lib/CustomButton.svelte delete mode 100644 content/tutorial/01-svelte/common/src/routes/+layout.svelte delete mode 100644 content/tutorial/03-advanced-svelte/common/src/routes/+layout.svelte diff --git a/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/PackageInfo.svelte b/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/PackageInfo.svelte index a879f76ca..7148fffd9 100644 --- a/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/PackageInfo.svelte +++ b/content/tutorial/01-svelte/03-props/03-spread-props/app-a/src/lib/PackageInfo.svelte @@ -13,11 +13,3 @@ npm and learn more here

          - - diff --git a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte index f5284f746..96f48a8d2 100644 --- a/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte +++ b/content/tutorial/01-svelte/04-logic/05-keyed-each-blocks/app-a/src/lib/Thing.svelte @@ -15,26 +15,4 @@ const emoji = emojis[name]; -

          - The emoji for {name} is {emoji} -

          - - +

          {emoji} = {name}

          \ No newline at end of file diff --git a/content/tutorial/01-svelte/05-events/01-dom-events/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/05-events/01-dom-events/app-a/src/lib/App.svelte index 5a020e0ea..ca3f7bd76 100644 --- a/content/tutorial/01-svelte/05-events/01-dom-events/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/05-events/01-dom-events/app-a/src/lib/App.svelte @@ -13,7 +13,11 @@ diff --git a/content/tutorial/01-svelte/05-events/01-dom-events/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/05-events/01-dom-events/app-b/src/lib/App.svelte index 54470a9a5..e08a73976 100644 --- a/content/tutorial/01-svelte/05-events/01-dom-events/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/05-events/01-dom-events/app-b/src/lib/App.svelte @@ -13,7 +13,11 @@ diff --git a/content/tutorial/01-svelte/05-events/02-inline-handlers/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/05-events/02-inline-handlers/app-a/src/lib/App.svelte deleted file mode 100644 index 54470a9a5..000000000 --- a/content/tutorial/01-svelte/05-events/02-inline-handlers/app-a/src/lib/App.svelte +++ /dev/null @@ -1,19 +0,0 @@ - - -
          - The mouse position is {m.x} x {m.y} -
          - - diff --git a/content/tutorial/01-svelte/05-events/02-inline-handlers/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/05-events/02-inline-handlers/app-b/src/lib/App.svelte index 4c9fd299f..6dadbb296 100644 --- a/content/tutorial/01-svelte/05-events/02-inline-handlers/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/05-events/02-inline-handlers/app-b/src/lib/App.svelte @@ -12,7 +12,11 @@ diff --git a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/README.md b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/README.md index 7be654ecd..9232f0b7b 100644 --- a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/README.md +++ b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/README.md @@ -4,10 +4,10 @@ title: DOM event forwarding Event forwarding works for DOM events too. -We want to get notified of clicks on our `` — to do that, we just need to forward `click` events on the ` ``` diff --git a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/App.svelte index f7dc6576b..b47a06f1e 100644 --- a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/App.svelte @@ -1,9 +1,13 @@ - + diff --git a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/BigRedButton.svelte b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/BigRedButton.svelte new file mode 100644 index 000000000..471695245 --- /dev/null +++ b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/BigRedButton.svelte @@ -0,0 +1,25 @@ + + + diff --git a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/CustomButton.svelte b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/CustomButton.svelte deleted file mode 100644 index fe3b417be..000000000 --- a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/CustomButton.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/horn.mp3 b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-a/src/lib/horn.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..3399767ac6d33d20dee4a6210d8093bcecfe579a GIT binary patch literal 30948 zcmeFY`CAj$8$LXfjU)sJA;7Sx2}=wZVG;rciZ%%d0fUB30kI}w5pXG+imlqo0t5`m zCI-YdfFQUcsKvDj0R)MP-~!fK5Tt0;;##$~ed*`>zCXPG!}rdWoLpz-nmN}q*L}`B z_qm^lP(L*AAClr$t`3=RzW@O6-+y9(oj@j#52OGY01c1;TY&9A-uyr2e2>?ByBY`q zMDuMd@HLP=f8I_&2IK;1KwLx|XZ|9V|GNkq-~k*U5cv16>E8ct@&7}_w)C&(J8b5^ zivXYi0PuJ`nM{Tth)$<_&4bNm2L=WTg~G^r#KgoTB_*Y#q-@^2Id2}{e*3Ljt=4L_ zHS=g_XlQ9^IeGHrxpU{P%%i`*|K`n`_wL<$G>_kY`|XcE{`m9HKmYyr-}!q5iUm@HqJX+0l}3dF#5of&=8}r~|xrv0Lm!CWzj!1lgbJerkiiE{M z8Taf-y!d}O zRNy_>i#zSa`g!+wFe%Ba_Qa1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f=@{C$f1^)qKr#`A0!0K}pI0R9K{|L^mEgBAGSo&5g|rtjMKl7D{nf4^ + Push + + + diff --git a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-b/src/lib/CustomButton.svelte b/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-b/src/lib/CustomButton.svelte deleted file mode 100644 index ff5278619..000000000 --- a/content/tutorial/01-svelte/05-events/06-dom-event-forwarding/app-b/src/lib/CustomButton.svelte +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-a/src/lib/App.svelte index 3b790cfee..f4d3b4feb 100644 --- a/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-a/src/lib/App.svelte @@ -36,14 +36,3 @@

          {a} + {b} = {a + b}

          - - diff --git a/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-b/src/lib/App.svelte index e24a9c1a9..d0016b0be 100644 --- a/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/06-bindings/02-numeric-inputs/app-b/src/lib/App.svelte @@ -36,14 +36,3 @@

          {a} + {b} = {a + b}

          - - diff --git a/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-a/src/lib/App.svelte index ccc7b3a6d..95e34d897 100644 --- a/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-a/src/lib/App.svelte @@ -50,12 +50,4 @@ selected question {selected ? selected.id : '[waiting...]'} -

          - - +

          \ No newline at end of file diff --git a/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-b/src/lib/App.svelte index 92e63e920..e771b95c9 100644 --- a/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/06-bindings/06-select-bindings/app-b/src/lib/App.svelte @@ -51,11 +51,3 @@ ? selected.id : '[waiting...]'}

          - - diff --git a/content/tutorial/01-svelte/07-lifecycle/02-ondestroy/app-a/src/lib/Timer.svelte b/content/tutorial/01-svelte/07-lifecycle/02-ondestroy/app-a/src/lib/Timer.svelte index cf2dcf055..1e745e6aa 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-ondestroy/app-a/src/lib/Timer.svelte +++ b/content/tutorial/01-svelte/07-lifecycle/02-ondestroy/app-a/src/lib/Timer.svelte @@ -7,12 +7,7 @@ onInterval(callback, interval); -

          - This component executes a callback every - {interval} millisecond{interval === 1 - ? '' - : 's'} -

          +

          This component executes a callback every {interval}ms

          diff --git a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/App.svelte index b57ef3e5a..4e3e11139 100644 --- a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/App.svelte @@ -46,10 +46,8 @@ .board > input { font-size: 1.4em; grid-column: 1/3; - border-radius: 5px; - background: #f4f4f4; padding: 0.5em; - border: none; + margin: 0 0 1rem 0; } h2 { diff --git a/content/tutorial/03-advanced-svelte/03-animations/01-animate/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/03-animations/01-animate/app-a/src/lib/App.svelte index 4813193e8..4e3e11139 100644 --- a/content/tutorial/03-advanced-svelte/03-animations/01-animate/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/03-animations/01-animate/app-a/src/lib/App.svelte @@ -46,11 +46,8 @@ .board > input { font-size: 1.4em; grid-column: 1/3; - border-radius: 5px; - background: #f4f4f4; padding: 0.5em; - border: none; - color: black; + margin: 0 0 1rem 0; } h2 { diff --git a/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-a/src/lib/App.svelte index 25a95e906..a7c9acd92 100644 --- a/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-a/src/lib/App.svelte @@ -55,12 +55,15 @@ diff --git a/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-b/src/lib/App.svelte index 4fd2b39db..bc1d207e5 100644 --- a/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-b/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/05-bindings/05-bind-this/app-b/src/lib/App.svelte @@ -59,12 +59,15 @@ diff --git a/content/tutorial/03-advanced-svelte/06-classes/01-classes/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/06-classes/01-classes/app-a/src/lib/App.svelte index a960bb26e..3ce5493cd 100644 --- a/content/tutorial/03-advanced-svelte/06-classes/01-classes/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/06-classes/01-classes/app-a/src/lib/App.svelte @@ -18,10 +18,6 @@ > diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/GreenThing.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/GreenThing.svelte index a224720e6..302da2bdc 100644 --- a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/GreenThing.svelte +++ b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/GreenThing.svelte @@ -1,7 +1,7 @@ -Green thing +

          Green thing

          diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/RedThing.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/RedThing.svelte index 9774363c1..6fd2a61b4 100644 --- a/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/RedThing.svelte +++ b/content/tutorial/03-advanced-svelte/09-special-elements/02-svelte-component/app-a/src/lib/RedThing.svelte @@ -1,7 +1,7 @@ -Red thing +

          Red thing

          diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-a/src/lib/App.svelte index 0718efd94..8e16ba761 100644 --- a/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-a/src/lib/App.svelte @@ -10,9 +10,9 @@ {#if selected === 'h1'} -

          I'm a h1 tag

          +

          I'm a <h1>

          {:else if selected === 'h3'} -

          I'm a h3 tag

          +

          I'm a <h3>

          {:else if selected === 'p'} -

          I'm a p tag

          +

          I'm a <p>

          {/if} diff --git a/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-b/src/lib/App.svelte index 068f7b3c4..f41011cc9 100644 --- a/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-b/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/09-special-elements/03-svelte-element/app-b/src/lib/App.svelte @@ -9,4 +9,6 @@ {/each} -I'm a {selected} tag + + I'm a <{selected}> + diff --git a/content/tutorial/03-advanced-svelte/11-special-tags/meta.json b/content/tutorial/03-advanced-svelte/11-special-tags/meta.json index fb2938580..b82c92d5b 100644 --- a/content/tutorial/03-advanced-svelte/11-special-tags/meta.json +++ b/content/tutorial/03-advanced-svelte/11-special-tags/meta.json @@ -1,5 +1,5 @@ { - "title": "Debugging", + "title": "Special tags", "scope": { "prefix": "/src/lib/", "name": "src" diff --git a/content/tutorial/03-advanced-svelte/common/src/routes/+layout.svelte b/content/tutorial/03-advanced-svelte/common/src/routes/+layout.svelte deleted file mode 100644 index 1b7e69566..000000000 --- a/content/tutorial/03-advanced-svelte/common/src/routes/+layout.svelte +++ /dev/null @@ -1,26 +0,0 @@ -
          - -
          - - diff --git a/content/tutorial/04-advanced-sveltekit/03-advanced-routing/05-breaking-out-of-layouts/app-a/src/routes/+layout.svelte b/content/tutorial/04-advanced-sveltekit/03-advanced-routing/05-breaking-out-of-layouts/app-a/src/routes/+layout.svelte index a1836f323..a3716f875 100644 --- a/content/tutorial/04-advanced-sveltekit/03-advanced-routing/05-breaking-out-of-layouts/app-a/src/routes/+layout.svelte +++ b/content/tutorial/04-advanced-sveltekit/03-advanced-routing/05-breaking-out-of-layouts/app-a/src/routes/+layout.svelte @@ -15,7 +15,7 @@ border: 1px solid #999; padding: 1em; margin: 1em 0 0 0; - border-radius: 2px; + border-radius: 4px; } :global(.layout::before) { diff --git a/content/tutorial/common/src/app.html b/content/tutorial/common/src/app.html index b24ae5c3a..4b820f1a8 100644 --- a/content/tutorial/common/src/app.html +++ b/content/tutorial/common/src/app.html @@ -9,9 +9,20 @@ From d30e5a04278d4e404204139827e721c8af9a2098 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 21 Mar 2023 17:44:56 -0400 Subject: [PATCH 061/326] Add `/// file` annotations (#285) * add clickable file annotations to code blocks * add more file annotations * add no-file * toggle mobile view when clicking annotations * create files from annotations * make all inline file annotations interactive * dont exempt exercises with only one file, its weird --------- Co-authored-by: Rich Harris --- .../02-your-first-component/README.md | 3 + .../03-dynamic-attributes/README.md | 3 + .../01-introduction/04-styling/README.md | 1 + .../05-nested-components/README.md | 2 + .../01-reactive-assignments/README.md | 2 + .../02-reactive-declarations/README.md | 2 + .../03-reactive-statements/README.md | 3 + .../04-updating-arrays-and-objects/README.md | 4 + .../03-props/01-declaring-props/README.md | 1 + .../03-props/02-default-values/README.md | 2 + .../03-props/03-spread-props/README.md | 1 + .../01-svelte/04-logic/01-if-blocks/README.md | 1 + .../04-logic/02-else-blocks/README.md | 1 + .../04-logic/03-else-if-blocks/README.md | 1 + .../04-logic/04-each-blocks/README.md | 2 + .../04-logic/05-keyed-each-blocks/README.md | 1 + .../04-logic/06-await-blocks/README.md | 2 + .../05-events/01-dom-events/README.md | 1 + .../05-events/02-inline-handlers/README.md | 1 + .../05-events/03-event-modifiers/README.md | 1 + .../05-events/04-component-events/README.md | 2 + .../05-events/05-event-forwarding/README.md | 2 + .../06-dom-event-forwarding/README.md | 1 + .../06-bindings/01-text-inputs/README.md | 1 + .../06-bindings/02-numeric-inputs/README.md | 1 + .../06-bindings/03-checkbox-inputs/README.md | 1 + .../06-bindings/04-group-inputs/README.md | 3 + .../06-bindings/05-textarea-inputs/README.md | 2 + .../06-bindings/06-select-bindings/README.md | 1 + .../07-multiple-select-bindings/README.md | 1 + .../07-lifecycle/01-onmount/README.md | 1 + .../07-lifecycle/02-ondestroy/README.md | 3 + .../07-lifecycle/03-update/README.md | 1 + .../01-svelte/07-lifecycle/04-tick/README.md | 2 + .../08-stores/01-writable-stores/README.md | 6 +- .../08-stores/02-auto-subscriptions/README.md | 20 ++++- .../08-stores/03-readable-stores/README.md | 3 +- .../08-stores/04-derived-stores/README.md | 6 +- .../04-derived-stores/app-a/src/lib/stores.js | 5 +- .../04-derived-stores/app-b/src/lib/stores.js | 5 +- .../08-stores/05-custom-stores/README.md | 7 +- .../08-stores/06-store-bindings/README.md | 8 +- .../02-routing/02-layouts/README.md | 4 +- .../03-loading-data/01-page-data/README.md | 1 + .../04-forms/03-form-validation/README.md | 1 + .../04-progressive-enhancement/README.md | 3 + .../05-customizing-use-enhance/README.md | 2 + .../01-motion/01-tweens/README.md | 2 + .../01-motion/02-springs/README.md | 2 + .../02-transitions/01-transition/README.md | 2 + .../README.md | 2 + .../02-transitions/03-in-and-out/README.md | 2 + .../04-custom-css-transitions/README.md | 3 + .../05-custom-js-transitions/README.md | 1 + .../06-transition-events/README.md | 1 + .../07-local-transitions/README.md | 1 + .../02-transitions/08-key-blocks/README.md | 1 + .../09-deferred-transitions/README.md | 4 +- .../03-animations/01-animate/README.md | 3 + .../04-actions/01-actions/README.md | 19 ++++- .../01-actions/app-a/src/lib/App.svelte | 7 +- .../src/lib/{click_outside.js => actions.js} | 0 .../01-actions/app-b/src/lib/App.svelte | 9 ++- .../src/lib/{click_outside.js => actions.js} | 0 .../02-adding-parameters-to-actions/README.md | 17 +++- .../app-a/src/lib/App.svelte | 3 +- .../app-a/src/lib/longpress.js | 2 +- .../app-b/src/lib/App.svelte | 3 +- .../01-contenteditable-bindings/README.md | 1 + .../02-each-block-bindings/README.md | 1 + .../05-bindings/03-media-elements/README.md | 1 + .../05-bindings/04-dimensions/README.md | 1 + .../05-bindings/05-bind-this/README.md | 1 + .../06-component-bindings/README.md | 1 + .../app-a/src/lib/App.svelte | 6 +- .../app-b/src/lib/App.svelte | 2 +- .../05-bindings/07-component-this/README.md | 12 ++- .../app-a/src/lib/App.svelte | 5 ++ .../app-b/src/lib/App.svelte | 6 +- .../06-classes/01-classes/README.md | 10 ++- .../06-classes/02-class-shorthand/README.md | 2 + .../07-composition/01-slots/README.md | 5 +- .../02-slot-fallbacks/README.md | 6 +- .../app-a/src/lib/Box.svelte | 2 +- .../07-composition/03-named-slots/README.md | 2 + .../04-optional-slots/README.md | 8 +- .../07-composition/05-slot-props/README.md | 3 + .../08-context/01-context-api/README.md | 4 + .../01-svelte-self/README.md | 4 +- .../02-svelte-component/README.md | 2 + .../03-svelte-element/README.md | 6 +- .../04-svelte-window/README.md | 1 + .../05-svelte-window-bindings/README.md | 1 + .../06-svelte-document/README.md | 3 +- .../07-svelte-body/README.md | 1 + .../08-svelte-head/README.md | 1 + .../09-svelte-options/README.md | 1 + .../10-svelte-fragment/README.md | 7 +- .../app-a/src/lib/Box.svelte | 3 +- .../01-sharing-code/README.md | 2 + .../02-module-exports/README.md | 11 ++- .../app-a/src/lib/App.svelte | 4 +- .../app-b/src/lib/App.svelte | 4 +- .../11-special-tags/01-debug/README.md | 1 + .../11-special-tags/02-html-tags/README.md | 1 + .../01-env-static-private/README.md | 1 + .../03-env-static-public/README.md | 1 + .../04-env-dynamic-public/README.md | 1 + src/lib/server/content.js | 26 +++++-- src/lib/server/markdown.js | 2 +- src/routes/tutorial/[slug]/+page.svelte | 77 +++++++++++++++++-- src/routes/tutorial/[slug]/Editor.svelte | 4 +- src/routes/tutorial/[slug]/Sidebar.svelte | 18 ++++- .../tutorial/[slug]/filetree/Filetree.svelte | 63 +++------------ .../tutorial/[slug]/filetree/Folder.svelte | 31 ++++---- src/routes/tutorial/[slug]/state.js | 41 +++++++++- 116 files changed, 448 insertions(+), 161 deletions(-) rename content/tutorial/03-advanced-svelte/04-actions/01-actions/app-a/src/lib/{click_outside.js => actions.js} (100%) rename content/tutorial/03-advanced-svelte/04-actions/01-actions/app-b/src/lib/{click_outside.js => actions.js} (100%) diff --git a/content/tutorial/01-svelte/01-introduction/02-your-first-component/README.md b/content/tutorial/01-svelte/01-introduction/02-your-first-component/README.md index 45117749f..ac4bb6c52 100644 --- a/content/tutorial/01-svelte/01-introduction/02-your-first-component/README.md +++ b/content/tutorial/01-svelte/01-introduction/02-your-first-component/README.md @@ -11,6 +11,7 @@ A component that just renders some static markup isn't very interesting. Let's a First, add a script tag to your component and declare a `name` variable: ```svelte +/// file: App.svelte ++++++ @@ -21,11 +22,13 @@ First, add a script tag to your component and declare a `name` variable: Then, we can refer to `name` in the markup: ```svelte +/// file: App.svelte

          Hello +++{name}+++!

          ``` Inside the curly braces, we can put any JavaScript we want. Try changing `name` to `name.toUpperCase()` for a shoutier greeting. ```svelte +/// file: App.svelte

          Hello {name+++.toUpperCase()+++}!

          ``` diff --git a/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md b/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md index b17bb93be..2f049885b 100644 --- a/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md +++ b/content/tutorial/01-svelte/01-introduction/03-dynamic-attributes/README.md @@ -7,6 +7,7 @@ Just like you can use curly braces to control text, you can use them to control Our image is missing a `src` — let's add one: ```svelte +/// file: App.svelte ``` @@ -19,6 +20,7 @@ When building web apps, it's important to make sure that they're _accessible_ to In this case, we're missing the `alt` attribute that describes the image for people using screenreaders, or people with slow or flaky internet connections that can't download the image. Let's add one: ```svelte +/// file: App.svelte ``` @@ -29,5 +31,6 @@ We can use curly braces _inside_ attributes. Try changing it to `"{name} dances. It's not uncommon to have an attribute where the name and value are the same, like `src={src}`. Svelte gives us a convenient shorthand for these cases: ```svelte +/// file: App.svelte A man dances. ``` diff --git a/content/tutorial/01-svelte/01-introduction/04-styling/README.md b/content/tutorial/01-svelte/01-introduction/04-styling/README.md index 9b2adbcfb..71099a820 100644 --- a/content/tutorial/01-svelte/01-introduction/04-styling/README.md +++ b/content/tutorial/01-svelte/01-introduction/04-styling/README.md @@ -5,6 +5,7 @@ title: Styling Just like in HTML, you can add a ` \ No newline at end of file diff --git a/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte index 7d5d7187a..a4c929d7f 100644 --- a/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/04-logic/04-each-blocks/app-b/src/lib/App.svelte @@ -1,28 +1,45 @@ -

          The Famous Cats of YouTube

          +

          Pick a colour

          -
            - {#each cats as { id, name }, i} -
          • - - {i + 1}: {name} - -
          • +
            + {#each colors as color, i} + {/each} -
          +
      + + \ No newline at end of file From b2a590a58ed2b8c7371c93b4403475c72a3a762a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 22 Mar 2023 13:20:43 -0400 Subject: [PATCH 069/326] tidy up await block example --- .../01-svelte/04-logic/06-await-blocks/README.md | 8 ++++---- .../06-await-blocks/app-a/src/lib/App.svelte | 16 ++-------------- .../06-await-blocks/app-a/src/lib/utils.js | 12 ++++++++++++ .../06-await-blocks/app-b/src/lib/App.svelte | 13 +------------ 4 files changed, 19 insertions(+), 30 deletions(-) create mode 100644 content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/utils.js diff --git a/content/tutorial/01-svelte/04-logic/06-await-blocks/README.md b/content/tutorial/01-svelte/04-logic/06-await-blocks/README.md index 4cd0b0ee1..37f5871b8 100644 --- a/content/tutorial/01-svelte/04-logic/06-await-blocks/README.md +++ b/content/tutorial/01-svelte/04-logic/06-await-blocks/README.md @@ -6,13 +6,13 @@ Most web applications have to deal with asynchronous data at some point. Svelte ```svelte /// file: App.svelte -{#await promise} ++++{#await promise}+++

      ...waiting

      -{:then number} ++++{:then number}

      The number is {number}

      {:catch error}

      {error.message}

      -{/await} +{/await}+++ ``` > Only the most recent `promise` is considered, meaning you don't need to worry about race conditions. @@ -20,7 +20,7 @@ Most web applications have to deal with asynchronous data at some point. Svelte If you know that your promise can't reject, you can omit the `catch` block. You can also omit the first block if you don't want to show anything until the promise resolves: ```svelte -/// file: App.svelte +/// no-file {#await promise then number}

      The number is {number}

      {/await} diff --git a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte index 7af6f29b5..a3030a8b3 100644 --- a/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/04-logic/06-await-blocks/app-a/src/lib/App.svelte @@ -1,16 +1,5 @@
      - The mouse position is {m.x} x {m.y} + The pointer is at {m.x} x {m.y}
      diff --git a/content/tutorial/01-svelte/06-bindings/05-textarea-inputs/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/06-bindings/05-textarea-inputs/app-b/src/lib/App.svelte index 057dafd2a..27e2ef0fe 100644 --- a/content/tutorial/01-svelte/06-bindings/05-textarea-inputs/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/06-bindings/05-textarea-inputs/app-b/src/lib/App.svelte @@ -1,15 +1,27 @@ -{@html marked(value)} +
      + input + - + output +
      {@html marked(value)}
      +
      diff --git a/content/tutorial/common/src/app.html b/content/tutorial/common/src/app.html index 4b820f1a8..c090e1a9f 100644 --- a/content/tutorial/common/src/app.html +++ b/content/tutorial/common/src/app.html @@ -23,6 +23,7 @@ font-family: var(--font); line-height: 1.5; margin: 1rem; + height: calc(100vh - 2rem); } h1, From c65a55f0b407a34200523922a9ef2ea48efa92fc Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 23 Mar 2023 12:45:53 -0400 Subject: [PATCH 079/326] reorder examples --- .../{06-select-bindings => 04-select-bindings}/README.md | 7 +++++-- .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../{04-group-inputs => 05-group-inputs}/README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../README.md | 0 .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 .../{05-textarea-inputs => 07-textarea-inputs}/README.md | 0 .../app-a/node_modules/.bin/marked | 0 .../app-a/node_modules/marked/LICENSE.md | 0 .../app-a/node_modules/marked/README.md | 0 .../app-a/node_modules/marked/bin/marked.js | 0 .../app-a/node_modules/marked/lib/marked.cjs | 0 .../app-a/node_modules/marked/lib/marked.esm.js | 0 .../app-a/node_modules/marked/lib/marked.umd.js | 0 .../app-a/node_modules/marked/man/marked.1 | 0 .../app-a/node_modules/marked/man/marked.1.txt | 0 .../app-a/node_modules/marked/marked.min.js | 0 .../app-a/node_modules/marked/package.json | 0 .../app-a/node_modules/marked/src/Lexer.js | 0 .../app-a/node_modules/marked/src/Parser.js | 0 .../app-a/node_modules/marked/src/Renderer.js | 0 .../app-a/node_modules/marked/src/Slugger.js | 0 .../app-a/node_modules/marked/src/TextRenderer.js | 0 .../app-a/node_modules/marked/src/Tokenizer.js | 0 .../app-a/node_modules/marked/src/defaults.js | 0 .../app-a/node_modules/marked/src/helpers.js | 0 .../app-a/node_modules/marked/src/marked.js | 0 .../app-a/node_modules/marked/src/rules.js | 0 .../app-a/package.json | 0 .../app-a/src/lib/App.svelte | 0 .../app-b/src/lib/App.svelte | 0 34 files changed, 5 insertions(+), 2 deletions(-) rename content/tutorial/01-svelte/06-bindings/{06-select-bindings => 04-select-bindings}/README.md (77%) rename content/tutorial/01-svelte/06-bindings/{06-select-bindings => 04-select-bindings}/app-a/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{06-select-bindings => 04-select-bindings}/app-b/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{04-group-inputs => 05-group-inputs}/README.md (100%) rename content/tutorial/01-svelte/06-bindings/{04-group-inputs => 05-group-inputs}/app-a/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{04-group-inputs => 05-group-inputs}/app-b/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{07-multiple-select-bindings => 06-multiple-select-bindings}/README.md (100%) rename content/tutorial/01-svelte/06-bindings/{07-multiple-select-bindings => 06-multiple-select-bindings}/app-a/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{07-multiple-select-bindings => 06-multiple-select-bindings}/app-b/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/README.md (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/.bin/marked (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/LICENSE.md (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/README.md (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/bin/marked.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/lib/marked.cjs (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/lib/marked.esm.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/lib/marked.umd.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/man/marked.1 (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/man/marked.1.txt (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/marked.min.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/package.json (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/Lexer.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/Parser.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/Renderer.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/Slugger.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/TextRenderer.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/Tokenizer.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/defaults.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/helpers.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/marked.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/node_modules/marked/src/rules.js (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/package.json (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-a/src/lib/App.svelte (100%) rename content/tutorial/01-svelte/06-bindings/{05-textarea-inputs => 07-textarea-inputs}/app-b/src/lib/App.svelte (100%) diff --git a/content/tutorial/01-svelte/06-bindings/06-select-bindings/README.md b/content/tutorial/01-svelte/06-bindings/04-select-bindings/README.md similarity index 77% rename from content/tutorial/01-svelte/06-bindings/06-select-bindings/README.md rename to content/tutorial/01-svelte/06-bindings/04-select-bindings/README.md index c1ce601c9..d6c22c998 100644 --- a/content/tutorial/01-svelte/06-bindings/06-select-bindings/README.md +++ b/content/tutorial/01-svelte/06-bindings/04-select-bindings/README.md @@ -2,11 +2,14 @@ title: Select bindings --- -We can also use `bind:value` with `` elements: ```svelte /// file: App.svelte - answer = ''} +> ``` Note that the `
      ``` -...so can components. Before a component can accept children, though, it needs to know where to put them. We do this with the `` element. Put this inside `Box.svelte`: +...so can components. Before a component can accept children, though, it needs to know where to put them. We do this with the `` element. Put this inside `Card.svelte`: ```svelte -/// file: Box.svelte -
      +/// file: Card.svelte +
      ++++++
      ``` -You can now put things in the box: +You can now put things on the card: ```svelte /// file: App.svelte - - +++

      Hello!

      +++ - +++

      This is a box. It can contain anything.

      +++ -
      + + +++Patrick BATEMAN+++ + +++Vice President+++ + ``` diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/App.svelte index 7f7b5d443..d17baea61 100644 --- a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/App.svelte @@ -1,7 +1,18 @@ - - - +
      + + + +
      + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/Box.svelte b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/Box.svelte deleted file mode 100644 index 36e57ccd8..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/Box.svelte +++ /dev/null @@ -1,14 +0,0 @@ -
      - -
      - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/Card.svelte b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/Card.svelte new file mode 100644 index 000000000..74d0e02d6 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/Card.svelte @@ -0,0 +1,47 @@ +
      + +
      + + diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/paper.svg b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/paper.svg new file mode 100644 index 000000000..f8f704fdf --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/paper.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/wood.svg b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/wood.svg new file mode 100644 index 000000000..5157ea83b --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/src/lib/wood.svg @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/static/Garamond Classico SC Regular.woff2 b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-a/static/Garamond Classico SC Regular.woff2 new file mode 100644 index 0000000000000000000000000000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)MNKmnEgd}rBNHUAi$n+jS!NR-F_d zGE8{C{G(4`D@~Z3$1545^md!j{dkNi(`L*Ai~!6MU<$&3WR>+ fp*M+!0Abc8;SXCa(*7FWSwsG=p_ZcRS^xk55jQhH literal 0 HcmV?d00001 diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/App.svelte index 986bdc01c..377be5167 100644 --- a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/App.svelte @@ -1,8 +1,19 @@ - -

      Hello!

      -

      This is a box. It can contain anything.

      -
      +
      + + Patrick BATEMAN + Vice President + +
      + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/Box.svelte b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/Box.svelte deleted file mode 100644 index 2d0a378d2..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/Box.svelte +++ /dev/null @@ -1,14 +0,0 @@ -
      - -
      - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/Card.svelte b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/Card.svelte new file mode 100644 index 000000000..31dda2a77 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/01-slots/app-b/src/lib/Card.svelte @@ -0,0 +1,47 @@ +
      + +
      + + diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md new file mode 100644 index 000000000..34ecc5250 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md @@ -0,0 +1,58 @@ +--- +title: Named slots +--- + +The previous example contained a _default slot_, which renders the direct children of a component. Sometimes you will need more control over placement. In those cases, we can use _named slots_. + +Inside the `` element, we've got `` and others for `company` and `address`. Let's add the corresponding named slots in `Card.svelte`: + +```svelte +/// file: Card.svelte +
      ++++
      + + +
      +++ + + + ++++
      + +
      +++ +
      +``` + +We need to add some styles to the `` element so that it occupies its own line. The contents of `` inherit styles from `Card.svelte`, such as `font-family` (the lettering is something called ['Silian Rail'](https://www.youtube.com/watch?v=aZVkW9p-cCU)), but normal scoping rules apply — we need to add the styles to `App.svelte` because that's where the element is: + +```svelte +/// file: App.svelte + +``` + +Alternatively, we could use the `:global` modifier inside `Card.svelte` to target all `small` elements inside `.card`: + +```svelte +/// file: Card.svelte + +``` \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte new file mode 100644 index 000000000..987f6452c --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte @@ -0,0 +1,28 @@ + + +
      + + Patrick BATEMAN + Vice President + + 212 555 6342 + + + Pierce & Pierce + Mergers and Acquisitions + + + 358 Exchange Place, New York, N.Y. 100099 fax 212 555 6390 telex 10 4534 + +
      + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/Card.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/Card.svelte new file mode 100644 index 000000000..31dda2a77 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/Card.svelte @@ -0,0 +1,47 @@ +
      + +
      + + diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/paper.svg b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/paper.svg new file mode 100644 index 000000000..f8f704fdf --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/paper.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/wood.svg b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/wood.svg new file mode 100644 index 000000000..5157ea83b --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/wood.svg @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte new file mode 100644 index 000000000..c66e6e624 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte @@ -0,0 +1,34 @@ + + +
      + + Patrick BATEMAN + Vice President + + 212 555 6342 + + + Pierce & Pierce + Mergers and Acquisitions + + + 358 Exchange Place, New York, N.Y. 100099 fax 212 555 6390 telex 10 4534 + +
      + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/Card.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/Card.svelte new file mode 100644 index 000000000..b7f4b3a6d --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/Card.svelte @@ -0,0 +1,56 @@ +
      +
      + + +
      + + + +
      + +
      +
      + + diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/README.md b/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/README.md deleted file mode 100644 index 3735b8547..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/README.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Slot fallbacks ---- - -A component can specify _fallbacks_ for any slots that are left empty, by putting content inside the `` element: - -```svelte -/// file: Box.svelte -
      - - +++no content was provided+++ - -
      -``` - -We can now create instances of `` without any children: - -```svelte -/// file: App.svelte - -

      Hello!

      -

      This is a box. It can contain anything.

      -
      - -++++++ -``` diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/app-b/src/lib/App.svelte deleted file mode 100644 index 708428d4d..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/app-b/src/lib/App.svelte +++ /dev/null @@ -1,10 +0,0 @@ - - - -

      Hello!

      -

      This is a box. It can contain anything.

      -
      - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/app-b/src/lib/Box.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/app-b/src/lib/Box.svelte deleted file mode 100644 index 8cb8128b3..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/02-slot-fallbacks/app-b/src/lib/Box.svelte +++ /dev/null @@ -1,16 +0,0 @@ -
      - - no content was provided - -
      - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/README.md b/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/README.md deleted file mode 100644 index 63fb33830..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/README.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: Named slots ---- - -The previous example contained a _default slot_, which renders the direct children of a component. Sometimes you will need more control over placement, such as with this ``. In those cases, we can use _named slots_. - -In `ContactCard.svelte`, add a `name` attribute to each slot: - -```svelte -/// file: ContactCard.svelte -
      -

      - - Unknown name - -

      - -
      - - Unknown address - -
      - - -
      -``` - -Then, add elements with corresponding `slot="..."` attributes inside the `` component: - -```svelte -/// file: App.svelte - - - P. Sherman - - - - 42 Wallaby Way
      - Sydney -
      -
      -``` diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-a/src/lib/App.svelte deleted file mode 100644 index f3143305c..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-a/src/lib/App.svelte +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-a/src/lib/ContactCard.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-a/src/lib/ContactCard.svelte deleted file mode 100644 index a3174a921..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-a/src/lib/ContactCard.svelte +++ /dev/null @@ -1,54 +0,0 @@ -
      -

      - - Unknown name - -

      - -
      - - Unknown address - -
      - - -
      - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-b/src/lib/App.svelte deleted file mode 100644 index ea27d75ed..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-b/src/lib/App.svelte +++ /dev/null @@ -1,12 +0,0 @@ - - - - P. Sherman - - - 42 Wallaby Way
      - Sydney -
      -
      diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-b/src/lib/ContactCard.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-b/src/lib/ContactCard.svelte deleted file mode 100644 index d72da2ad4..000000000 --- a/content/tutorial/03-advanced-svelte/07-composition/03-named-slots/app-b/src/lib/ContactCard.svelte +++ /dev/null @@ -1,54 +0,0 @@ -
      -

      - - Unknown name - -

      - -
      - - Unknown address - -
      - - -
      - - diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/README.md b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/README.md new file mode 100644 index 000000000..cb6169707 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/README.md @@ -0,0 +1,30 @@ +--- +title: Slot fallbacks +--- + +A component can specify _fallbacks_ for any slots that are left empty, by putting content inside the `` element: + +```svelte +/// file: Box.svelte +
      +
      + + +++(telephone)+++ + + + + +++(company name)+++ + +
      + + + +++(name)+++ + + +
      + + +++(address)+++ + +
      +
      +``` \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte new file mode 100644 index 000000000..fe769fff2 --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte @@ -0,0 +1,46 @@ + + +
      + + Patrick BATEMAN + Vice President + + 212 555 6342 + + + Pierce & Pierce + Mergers and Acquisitions + + + 358 Exchange Place, New York, N.Y. 100099 fax 212 555 6390 telex 10 4534 + + + +
      + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/Card.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/Card.svelte new file mode 100644 index 000000000..b7f4b3a6d --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/Card.svelte @@ -0,0 +1,56 @@ +
      +
      + + +
      + + + +
      + +
      +
      + + diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/paper.svg b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/paper.svg new file mode 100644 index 000000000..f8f704fdf --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/paper.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/wood.svg b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/wood.svg new file mode 100644 index 000000000..5157ea83b --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/wood.svg @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-b/src/lib/Card.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-b/src/lib/Card.svelte new file mode 100644 index 000000000..94d36a66b --- /dev/null +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-b/src/lib/Card.svelte @@ -0,0 +1,65 @@ +
      +
      + + (telephone) + + + + (company name) + +
      + + + (name) + + +
      + + (address) + +
      +
      + + From 9aa5e284b91e6c2a4eade6d0e76130d2077c6a52 Mon Sep 17 00:00:00 2001 From: tomoam <29677552+tomoam@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:40:40 +0900 Subject: [PATCH 145/326] fix: refresh URL (#319) --- content/tutorial/common/src/__client.js | 9 +++++++++ src/routes/tutorial/[slug]/Output.svelte | 1 + 2 files changed, 10 insertions(+) diff --git a/content/tutorial/common/src/__client.js b/content/tutorial/common/src/__client.js index 6f5fba340..d60514ebe 100644 --- a/content/tutorial/common/src/__client.js +++ b/content/tutorial/common/src/__client.js @@ -105,6 +105,15 @@ function ping() { ); } +let pre_url = location.href; +const url_observer = new MutationObserver(() => { + if (location.href !== pre_url) { + pre_url = location.href; + ping(); + } +}); +url_observer.observe(document, { subtree: true, childList: true, attributes: true }); + ping(); if (import.meta.hot) { diff --git a/src/routes/tutorial/[slug]/Output.svelte b/src/routes/tutorial/[slug]/Output.svelte index 5052231f2..8b511495d 100644 --- a/src/routes/tutorial/[slug]/Output.svelte +++ b/src/routes/tutorial/[slug]/Output.svelte @@ -41,6 +41,7 @@ if (paused) return; if (e.data.type === 'ping') { + path = e.data.data.path ?? path; loading = false; } else if (e.data.type === 'warnings') { warnings.update(($warnings) => ({ From 330512310a7053af1532f696d1f28b8edcfbdbe4 Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Wed, 5 Apr 2023 12:41:59 +0100 Subject: [PATCH 146/326] Fix user comment bug (#320) Set the user comment string before clearing the input value. --- .../01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte index d0ca382fc..93001c412 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte @@ -27,8 +27,6 @@ async function handleKeydown(event) { if (event.key === 'Enter' && event.target.value) { - event.target.value = ''; - const comment = { author: 'user', text: event.target.value @@ -39,6 +37,7 @@ text: eliza.transform(comment.text) }; + event.target.value = ''; comments = [...comments, comment]; await pause(200 * (1 + Math.random())); From c3b36ea4dfa2c8545b86fd104963089899d0fe11 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 5 Apr 2023 07:52:03 -0400 Subject: [PATCH 147/326] typo --- .../03-advanced-svelte/07-composition/02-named-slots/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md index 34ecc5250..3a19f5136 100644 --- a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/README.md @@ -4,7 +4,7 @@ title: Named slots The previous example contained a _default slot_, which renders the direct children of a component. Sometimes you will need more control over placement. In those cases, we can use _named slots_. -Inside the `` element, we've got `` and others for `company` and `address`. Let's add the corresponding named slots in `Card.svelte`: +Inside the `` component, we've got `` and others for `company` and `address`. Let's add the corresponding named slots in `Card.svelte`: ```svelte /// file: Card.svelte From 138680aee77d1a571e4ecc39ce5d5ef0554e94bd Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 5 Apr 2023 07:54:57 -0400 Subject: [PATCH 148/326] they spell it wrong in the movie --- .../07-composition/02-named-slots/app-a/src/lib/App.svelte | 2 +- .../07-composition/02-named-slots/app-b/src/lib/App.svelte | 2 +- .../07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte index 987f6452c..594151af4 100644 --- a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-a/src/lib/App.svelte @@ -11,7 +11,7 @@ Pierce & Pierce - Mergers and Acquisitions + Mergers and Aquisitions 358 Exchange Place, New York, N.Y. 100099 fax 212 555 6390 telex 10 4534 diff --git a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte index c66e6e624..2613efd08 100644 --- a/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/07-composition/02-named-slots/app-b/src/lib/App.svelte @@ -11,7 +11,7 @@ Pierce & Pierce - Mergers and Acquisitions + Mergers and Aquisitions 358 Exchange Place, New York, N.Y. 100099 fax 212 555 6390 telex 10 4534 diff --git a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte index fe769fff2..5bb5882ca 100644 --- a/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte +++ b/content/tutorial/03-advanced-svelte/07-composition/03-slot-fallbacks/app-a/src/lib/App.svelte @@ -11,7 +11,7 @@ Pierce & Pierce - Mergers and Acquisitions + Mergers and Aquisitions 358 Exchange Place, New York, N.Y. 100099 fax 212 555 6390 telex 10 4534 From 13e685368aa084131973c57651aaa6ae71e3bd3b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 5 Apr 2023 14:11:45 -0400 Subject: [PATCH 149/326] better eliza --- .../07-lifecycle/02-update/README.md | 5 +- .../02-update/app-a/src/lib/App.svelte | 104 ++++++++++++---- .../02-update/app-b/src/lib/App.svelte | 112 ++++++++++++++---- 3 files changed, 177 insertions(+), 44 deletions(-) diff --git a/content/tutorial/01-svelte/07-lifecycle/02-update/README.md b/content/tutorial/01-svelte/07-lifecycle/02-update/README.md index 0c587f497..b126e5beb 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-update/README.md +++ b/content/tutorial/01-svelte/07-lifecycle/02-update/README.md @@ -14,7 +14,10 @@ let div; +++let autoscroll = false;+++ beforeUpdate(() => { - +++autoscroll = div && div.offsetHeight + div.scrollTop > div.scrollHeight - 20;+++ ++++ if (div) { + const scrollableDistance = div.scrollHeight - div.offsetHeight; + autoscroll = div.scrollTop > scrollableDistance - 20; + }+++ }); afterUpdate(() => { diff --git a/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte index 93001c412..b6f8a5f29 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte @@ -21,9 +21,7 @@ const typing = { author: 'eliza', text: '...' }; - let comments = [ - { author: 'eliza', text: eliza.getInitial() } - ]; + let comments = []; async function handleKeydown(event) { if (event.key === 'Enter' && event.target.value) { @@ -49,37 +47,67 @@ } -
      -

      Eliza

      - -
      - {#each comments as comment} -
      - {comment.text} -
      - {/each} +
      +
      +
      +
      +

      Eliza

      + +
      + {eliza.getInitial()} +
      +
      + + {#each comments as comment} +
      + {comment.text} +
      + {/each} +
      + +
      - -
      diff --git a/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte index 58eb97852..3f0285387 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte @@ -9,7 +9,10 @@ let autoscroll = false; beforeUpdate(() => { - autoscroll = div && div.offsetHeight + div.scrollTop > div.scrollHeight - 20; + if (div) { + const scrollableDistance = div.scrollHeight - div.offsetHeight; + autoscroll = div.scrollTop > scrollableDistance - 20; + } }); afterUpdate(() => { @@ -23,14 +26,10 @@ const typing = { author: 'eliza', text: '...' }; - let comments = [ - { author: 'eliza', text: eliza.getInitial() } - ]; + let comments = []; async function handleKeydown(event) { if (event.key === 'Enter' && event.target.value) { - event.target.value = ''; - const comment = { author: 'user', text: event.target.value @@ -41,6 +40,7 @@ text: eliza.transform(comment.text) }; + event.target.value = ''; comments = [...comments, comment]; await pause(200 * (1 + Math.random())); @@ -52,37 +52,67 @@ } -
      -

      Eliza

      - -
      - {#each comments as comment} -
      - {comment.text} -
      - {/each} +
      +
      +
      +
      +

      Eliza

      + +
      + {eliza.getInitial()} +
      +
      + + {#each comments as comment} +
      + {comment.text} +
      + {/each} +
      + +
      - -
      From d1a397fc3f170aa6a0dfa430b2dbec1e5dd946f1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 5 Apr 2023 14:24:22 -0400 Subject: [PATCH 150/326] dark mode fixes --- .../07-lifecycle/02-update/app-a/src/lib/App.svelte | 9 ++++----- .../07-lifecycle/02-update/app-b/src/lib/App.svelte | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte b/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte index b6f8a5f29..03d237aca 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte +++ b/content/tutorial/01-svelte/07-lifecycle/02-update/app-a/src/lib/App.svelte @@ -95,7 +95,6 @@ flex: 1; font-size: 1.4em; text-align: center; - border-bottom: 1px solid var(--bg-1); } .chat { @@ -120,9 +119,9 @@ } .eliza span { - background-color: #eee; + background-color: var(--bg-1); border-radius: 1em 1em 1em 0; - color: black; + color: var(--fg-1); } .user span { @@ -138,7 +137,7 @@ @media (min-width: 400px) { .phone { - background: var(--bg-1); + background: var(--bg-2); position: relative; font-size: min(2.5vh, 1rem); width: auto; @@ -147,7 +146,7 @@ border: 0.2em solid #222; border-radius: 1em; box-sizing: border-box; - filter: drop-shadow(1px 1px 0px var(--fg-1)) drop-shadow(2px 2px 0px var(--fg-1)) drop-shadow(3px 3px 0px var(--fg-1)) + filter: drop-shadow(1px 1px 0px #222) drop-shadow(2px 2px 0px #222) drop-shadow(3px 3px 0px #222) } .phone::after { diff --git a/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte b/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte index 3f0285387..c80a29b93 100644 --- a/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte +++ b/content/tutorial/01-svelte/07-lifecycle/02-update/app-b/src/lib/App.svelte @@ -100,7 +100,6 @@ flex: 1; font-size: 1.4em; text-align: center; - border-bottom: 1px solid var(--bg-1); } .chat { @@ -125,9 +124,9 @@ } .eliza span { - background-color: #eee; + background-color: var(--bg-1); border-radius: 1em 1em 1em 0; - color: black; + color: var(--fg-1); } .user span { @@ -143,7 +142,7 @@ @media (min-width: 400px) { .phone { - background: var(--bg-1); + background: var(--bg-2); position: relative; font-size: min(2.5vh, 1rem); width: auto; @@ -152,7 +151,7 @@ border: 0.2em solid #222; border-radius: 1em; box-sizing: border-box; - filter: drop-shadow(1px 1px 0px var(--fg-1)) drop-shadow(2px 2px 0px var(--fg-1)) drop-shadow(3px 3px 0px var(--fg-1)) + filter: drop-shadow(1px 1px 0px #222) drop-shadow(2px 2px 0px #222) drop-shadow(3px 3px 0px #222) } .phone::after { From c35016d5c1fa14881896bb763c223a920c44d4cf Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 5 Apr 2023 16:27:14 -0400 Subject: [PATCH 151/326] make form exercises nicer --- .../04-forms/01-the-form-element/README.md | 5 +- .../app-a/src/lib/server/database.js | 12 +- .../app-a/src/routes/+page.svelte | 58 +++++-- .../app-a/src/routes/remove.svg | 3 + .../app-b/src/routes/+page.svelte | 75 +++++++-- .../04-forms/02-named-form-actions/README.md | 15 +- .../app-b/src/routes/+page.svelte | 84 +++++++--- .../04-forms/03-form-validation/README.md | 8 +- .../app-b/src/lib/server/database.js | 12 +- .../app-b/src/routes/+page.svelte | 98 ++++++++---- .../04-progressive-enhancement/README.md | 2 +- .../app-b/src/routes/+page.svelte | 98 ++++++++---- .../05-customizing-use-enhance/README.md | 20 ++- .../app-b/src/routes/+page.svelte | 146 ++++++++++++------ content/tutorial/common/src/app.html | 23 +++ 15 files changed, 480 insertions(+), 179 deletions(-) create mode 100644 content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg diff --git a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/README.md b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/README.md index 76fdbc6f9..6f5269092 100644 --- a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/README.md +++ b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/README.md @@ -13,7 +13,10 @@ Let's build a todo app. We've already got an in-memory database set up in `src/l +++
      +++ diff --git a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/lib/server/database.js b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/lib/server/database.js index 06afbf801..785df854a 100644 --- a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/lib/server/database.js +++ b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/lib/server/database.js @@ -3,14 +3,18 @@ const db = new Map(); export function getTodos(userid) { + if (!db.get(userid)) { + db.set(userid, [{ + id: crypto.randomUUID(), + description: 'Learn SvelteKit', + done: false + }]); + } + return db.get(userid); } export function createTodo(userid, description) { - if (!db.has(userid)) { - db.set(userid, []); - } - const todos = db.get(userid); todos.push({ diff --git a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/+page.svelte b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/+page.svelte index 0c2fd19d2..8295cb33f 100644 --- a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/+page.svelte +++ b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/+page.svelte @@ -2,12 +2,52 @@ export let data; -

      todos

      - -
        - {#each data.todos as todo (todo.id)} -
      • - {todo.description} -
      • - {/each} -
      +
      +

      todos

      + +
        + {#each data.todos as todo (todo.id)} +
      • + {todo.description} +
      • + {/each} +
      +
      + + diff --git a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg new file mode 100644 index 000000000..d338b3349 --- /dev/null +++ b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-b/src/routes/+page.svelte index 23d07eb27..e1d5603ec 100644 --- a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-b/src/routes/+page.svelte +++ b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-b/src/routes/+page.svelte @@ -2,19 +2,62 @@ export let data; -

      todos

      - -
      - -
      - -
        - {#each data.todos as todo (todo.id)} -
      • - {todo.description} -
      • - {/each} -
      +
      +

      todos

      + +
      + +
      + +
        + {#each data.todos as todo (todo.id)} +
      • + {todo.description} +
      • + {/each} +
      +
      + + diff --git a/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/README.md b/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/README.md index d76bfc221..83a3048cb 100644 --- a/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/README.md +++ b/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/README.md @@ -30,7 +30,10 @@ The `
      ` element has an optional `action` attribute, which is similar to an
      ``` @@ -41,14 +44,14 @@ Next, we want to create a form for each todo, complete with a hidden `` t ```svelte /// file: src/routes/+page.svelte -
        +
          {#each data.todos as todo (todo.id)} -
        • +
        • +++
          - +++ - {todo.description} -+++
          +++ + {todo.description} +
        • {/each}
        diff --git a/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/app-b/src/routes/+page.svelte index 9c1809b36..7896e68b9 100644 --- a/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/app-b/src/routes/+page.svelte +++ b/content/tutorial/02-sveltekit/04-forms/02-named-form-actions/app-b/src/routes/+page.svelte @@ -2,24 +2,66 @@ export let data; -

        todos

        - -
        - -
        - -
          - {#each data.todos as todo (todo.id)} -
        • -
          - - - - {todo.description} -
          -
        • - {/each} -
        +
        +

        todos

        + +
        + +
        + +
          + {#each data.todos as todo (todo.id)} +
        • +
          + + {todo.description} +
        • + {/each} +
        +
        + + diff --git a/content/tutorial/02-sveltekit/04-forms/03-form-validation/README.md b/content/tutorial/02-sveltekit/04-forms/03-form-validation/README.md index 6c7799b46..1b6130282 100644 --- a/content/tutorial/02-sveltekit/04-forms/03-form-validation/README.md +++ b/content/tutorial/02-sveltekit/04-forms/03-form-validation/README.md @@ -10,9 +10,10 @@ The first line of defense is the browser's [built-in form validation](https://de /// file: src/routes/+page.svelte
        @@ -32,10 +33,6 @@ export function createTodo(userid, description) { throw new Error('todo must have a description'); }+++ - if (!db.has(userid)) { - db.set(userid, []); - } - const todos = db.get(userid); +++ if (todos.find((todo) => todo.description === description)) { @@ -97,6 +94,7 @@ In `src/routes/+page.svelte`, we can access the returned value via the `form` pr diff --git a/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/lib/server/database.js b/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/lib/server/database.js index ff6a48db8..4a59d5609 100644 --- a/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/lib/server/database.js +++ b/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/lib/server/database.js @@ -3,6 +3,14 @@ const db = new Map(); export function getTodos(userid) { + if (!db.get(userid)) { + db.set(userid, [{ + id: crypto.randomUUID(), + description: 'Learn SvelteKit', + done: false + }]); + } + return db.get(userid); } @@ -11,10 +19,6 @@ export function createTodo(userid, description) { throw new Error('todo must have a description'); } - if (!db.has(userid)) { - db.set(userid, []); - } - const todos = db.get(userid); if (todos.find((todo) => todo.description === description)) { diff --git a/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/routes/+page.svelte index fdc24c779..8346527df 100644 --- a/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/routes/+page.svelte +++ b/content/tutorial/02-sveltekit/04-forms/03-form-validation/app-b/src/routes/+page.svelte @@ -3,32 +3,72 @@ export let form; -

        todos

        - -{#if form?.error} -

        {form.error}

        -{/if} - - - -
        - -
          - {#each data.todos as todo (todo.id)} -
        • -
          - - - - {todo.description} -
          -
        • - {/each} -
        +
        +

        todos

        + + {#if form?.error} +

        {form.error}

        + {/if} + +
        + +
        + +
          + {#each data.todos as todo (todo.id)} +
        • +
          + + {todo.description} +
        • + {/each} +
        +
        + + diff --git a/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/README.md b/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/README.md index efe5f3292..66b9f2969 100644 --- a/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/README.md +++ b/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/README.md @@ -52,5 +52,5 @@ Now that we're updating the page rather than reloading it, we can get fancy with ```svelte /// file: src/routes/+page.svelte -
      • ...
      • +
      • ...
      • ``` diff --git a/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte index 629d09091..f45a7a244 100644 --- a/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte +++ b/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte @@ -6,32 +6,72 @@ export let form; -

        todos

        - -{#if form?.error} -

        {form.error}

        -{/if} - -
        - -
        - -
          - {#each data.todos as todo (todo.id)} -
        • -
          - - - - {todo.description} -
          -
        • - {/each} -
        +
        +

        todos

        + + {#if form?.error} +

        {form.error}

        + {/if} + +
        + +
        + +
          + {#each data.todos as todo (todo.id)} +
        • +
          + + {todo.description} +
        • + {/each} +
        +
        + + diff --git a/content/tutorial/02-sveltekit/04-forms/05-customizing-use-enhance/README.md b/content/tutorial/02-sveltekit/04-forms/05-customizing-use-enhance/README.md index 2024db87b..a29366f18 100644 --- a/content/tutorial/02-sveltekit/04-forms/05-customizing-use-enhance/README.md +++ b/content/tutorial/02-sveltekit/04-forms/05-customizing-use-enhance/README.md @@ -52,24 +52,38 @@ When we create or delete items, it now takes a full second before the UI updates }}+++ > ``` +We can then show a message while we're saving data: + +```svelte +/// file: App.svelte +
          + +
        + ++++{#if creating} + saving... +{/if}+++ +``` + In the case of deletions, we don't really need to wait for the server to validate anything — we can just update the UI immediately: ```svelte /// file: src/routes/+page.svelte -
          +
            {#each +++data.todos.filter((todo) => !deleting.includes(todo.id))+++ as todo (todo.id)} -
          • +
          • -

            todos

            - -{#if form?.error} -

            {form.error}

            -{/if} - - { - creating = true; - - return async ({ update }) => { - await update(); - creating = false; - }; - }} -> - -
            - -
              - {#each data.todos.filter((todo) => !deleting.includes(todo.id)) as todo (todo.id)} -
            • -
              { - deleting = [...deleting, todo.id]; - return async ({ update }) => { - await update(); - deleting = deleting.filter((id) => id !== todo.id); - }; - }} - > - - - - {todo.description} -
              -
            • - {/each} -
            +
            +

            todos

            + + {#if form?.error} +

            {form.error}

            + {/if} + +
            { + creating = true; + + return async ({ update }) => { + await update(); + creating = false; + }; + }} + > + +
            + +
              + {#each data.todos.filter((todo) => !deleting.includes(todo.id)) as todo (todo.id)} +
            • +
              { + deleting = [...deleting, todo.id]; + return async ({ update }) => { + await update(); + deleting = deleting.filter((id) => id !== todo.id); + }; + }} + > + + {todo.description} +
            • + {/each} +
            + + {#if creating} + saving... + {/if} +
            + + diff --git a/content/tutorial/common/src/app.html b/content/tutorial/common/src/app.html index ec30998cc..f8f202fc1 100644 --- a/content/tutorial/common/src/app.html +++ b/content/tutorial/common/src/app.html @@ -184,6 +184,29 @@ border-radius: var(--border-radius); } + ul.todos { + padding: 0; + } + + ul.todos li:not(:has(> form)), + ul.todos li form { + position: relative; + display: flex; + align-items: center; + padding-left: 1em; + height: 3em; + margin: 0 0 0.5em 0; + gap: 0.5em; + border-radius: 5px; + user-select: none; + background: white; + filter: drop-shadow(2px 3px 6px rgba(0,0,0,0.1)); + } + + ul.todos .done { + + } + @media (prefers-color-scheme: dark) { body { --bg-1: hsl(0, 0%, 18%); From 2c4e0df4f6a76c0bb575bc29c750b539a68af29b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 5 Apr 2023 17:46:24 -0400 Subject: [PATCH 152/326] dark mode styles --- .../app-a/src/routes/remove.svg | 2 +- .../app-b/src/routes/+page.svelte | 15 ---- .../09-deferred-transitions/README.md | 7 +- .../app-a/src/lib/App.svelte | 4 +- .../app-a/src/lib/TodoList.svelte | 71 +++++++---------- .../app-a/src/lib/remove.svg | 2 +- .../app-b/src/lib/TodoList.svelte | 76 +++++++----------- .../03-animations/01-animate/README.md | 10 ++- .../01-animate/app-b/src/lib/TodoList.svelte | 78 +++++++------------ content/tutorial/common/src/app.html | 24 +++++- 10 files changed, 121 insertions(+), 168 deletions(-) diff --git a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg index d338b3349..434ab0956 100644 --- a/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg +++ b/content/tutorial/02-sveltekit/04-forms/01-the-form-element/app-a/src/routes/remove.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte b/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte index f45a7a244..88dd03d93 100644 --- a/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte +++ b/content/tutorial/02-sveltekit/04-forms/04-progressive-enhancement/app-b/src/routes/+page.svelte @@ -56,21 +56,6 @@ flex: 1; } - button { - border: none; - background: url(http://github.com/remove.svg) no-repeat 50% 50%; - background-size: 1rem 1rem; - cursor: pointer; - height: 100%; - aspect-ratio: 1; - opacity: 0.5; - transition: opacity 0.2s; - } - - button:hover { - opacity: 1; - } - .saving { opacity: 0.5; } diff --git a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/README.md b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/README.md index a71642a06..8a3a945fb 100644 --- a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/README.md +++ b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/README.md @@ -16,15 +16,16 @@ Open `TodoList.svelte`. First, import the `send` and `receive` transitions from +++import { send, receive } from './transition.js';+++ export let store; - export let filter; + export let done; ``` -Then, add them to the `
          • ` element, using the `todo.id` property as a key to match the elements: ```svelte /// file: TodoList.svelte -
      diff --git a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/TodoList.svelte b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/TodoList.svelte index 47b1e1a1f..43e6dc9af 100644 --- a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/TodoList.svelte +++ b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/TodoList.svelte @@ -1,35 +1,37 @@ -{#each $store.filter(filter) as todo (todo.id)} -
    \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/remove.svg b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/remove.svg index d338b3349..434ab0956 100644 --- a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/remove.svg +++ b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-a/src/lib/remove.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-b/src/lib/TodoList.svelte b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-b/src/lib/TodoList.svelte index 91dff8305..4354a6de6 100644 --- a/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-b/src/lib/TodoList.svelte +++ b/content/tutorial/03-advanced-svelte/02-transitions/09-deferred-transitions/app-b/src/lib/TodoList.svelte @@ -2,39 +2,40 @@ import { send, receive } from './transition.js'; export let store; - export let filter; + export let done; -{#each $store.filter(filter) as todo (todo.id)} -
\ No newline at end of file diff --git a/content/tutorial/03-advanced-svelte/03-animations/01-animate/README.md b/content/tutorial/03-advanced-svelte/03-animations/01-animate/README.md index 69cb3a625..53f0221a1 100644 --- a/content/tutorial/03-advanced-svelte/03-animations/01-animate/README.md +++ b/content/tutorial/03-advanced-svelte/03-animations/01-animate/README.md @@ -15,15 +15,16 @@ First, import the `flip` function — flip stands for ['First, Last, Invert, Pla import { send, receive } from './transition.js'; export let store; - export let filter; + export let done; ``` -Then add it to the `