diff --git a/packages/lit-dev-content/site/_includes/default.html b/packages/lit-dev-content/site/_includes/default.html
index 0d4adc7b8..8c07b35a0 100644
--- a/packages/lit-dev-content/site/_includes/default.html
+++ b/packages/lit-dev-content/site/_includes/default.html
@@ -67,17 +67,12 @@
{% include 'header.html' %}
- {% if selectedVersion !== latestVersion and selectedVersion !== "v3" %}
+ {% if selectedVersion !== latestVersion %}
You're viewing docs for an older version of Lit. Click
here for the latest version.
- {% elif selectedVersion === "v3" %}
-
- You're viewing docs for a pre-release version of Lit. Read the Lit 3.0 pre-releases
- announcement here.
-
{% endif %}
npm i lit@latest
+```
+
+You can find more details and how to handle the changes in the [Lit 2.x to 3.0 upgrade guide](/docs/v3/releases/upgrade/) is available in the docs.
+
+Detailed change logs can be found [on GitHub](https://github.com/lit/lit/releases?q=%22-pre.1%22&expanded=true).
+
+## Even Faster Rendering with the new Lit Template Compiler { #compiler }
+
+The Lit team is excited to announce a new Labs package [`@lit-labs/compiler`](https://www.npmjs.com/package/@lit-labs/compiler), which provides a [TypeScript Transformer](https://github.com/itsdouges/typescript-transformer-handbook#the-basics) that can be run over your JavaScript or TypeScript files to optimize away some of the work that Lit would have to do at runtime!
+
+
+
+In a best case scenario with a template heavy page, we measured a 46% faster first render, and a 21% faster update!
+
+To try out `@lit-labs/compiler` today, you’ll need a build step that accepts a TypeScript transformer. For Rollup.js users, this could be `@rollup/plugin-typescript`. An example `rollup.config.js` file might look like:
+
+```js
+// File: rollup.config.js
+import typescript from '@rollup/plugin-typescript';
+import {compileLitTemplates} from '@lit-labs/compiler';
+
+export default {
+ // ...
+ plugins: [
+ typescript({
+ transformers: {
+ before: [compileLitTemplates()],
+ },
+ }),
+ // other rollup plugins
+ ],
+};
+```
+
+### What does the transform do?
+
+Given some source code containing an `html` tag function to declare templates:
+
+```ts
+const hi = (name) => html`Hello ${name}!
`;
+```
+
+The Lit template transform will remove the html tag function and replace it with something similar to the following:
+
+```ts
+const b = (s) => s;
+const lit_template_1 = {h: b`Hello >
`, parts: [{type: 2, index: 1}]};
+const hi = (name) => ({_$litType$: lit_template_1, values: [name]});
+```
+
+We call this a compiled template, and it behaves the same as your authored template, except that when Lit renders the compiled template,
+Lit can skip an internal render phase called the Prepare phase, meaning you get a quicker initial render.
+
+As you can see in the above example, there is some additional code generated as part of the transform. We’ve measured that minified and compressed, you may get a 5% increase in file size for the compiled file. This is something we have plans to address.
+
+### Looking forward
+
+We’d love to hear from you and get feedback on your experience using the transform, as well as hear what you’d like to see optimized! Leave that feedback in this [Labs Feedback discussion](https://github.com/lit/lit/discussions/4117). We’d also like to learn more about what build systems Lit is used in, and welcome contributions!
+
+This is just the beginning. With this new package we have a foundation for layering on additional build-time optimizations. Some optimizations we’ve thought about:
+
+- For a Lit app which can be completely compiled, we could vend an import of lit-html that is smaller.
+- Add an option to the compiler transform to also minify the HTML in the templates.
+- Provide domain specific and targeted transforms, such as a standard decorator transform with a smaller emit.
+- Compress the emitted output file by applying domain specific file compression.
+
+
+## Lit Labs Graduation Day { #labs-graduation }
+
+We are also graduating our first set of Lit Labs packages: Context, Task, and React.
+
+These packages have a new home in the `@lit` npm scope, but are otherwise exactly the same as the current labs versions. The labs packages have been updated to depend on and re-export the non-labs versions so that they share a single implementation.
+
+Find them in their new npm homes:
+[`@lit/react`](https://www.npmjs.com/package/@lit/react),
+[`@lit/task`](https://www.npmjs.com/package/@lit/task), and
+[`@lit/context`](https://www.npmjs.com/package/@lit/context)
+
+These packages can now be considered stable, and have documentation and examples on lit.dev!
+
+Current users of these packages under the `@lit-labs` scope can migrate by first updating to the latest version of those packages to test for any breakages, then update the import to use the `@lit` scoped package. The latest `@lit-labs` scoped packages will receive the same updates until the next major version of the `@lit` scoped package.
+
+Thank you so much to everyone in the community who has tested out a Labs package, filed issues, discussed features, and led these packages to graduation! 🎓
+
+### React
+
+While custom elements can be used in React projects as is, there are some rough edges around their usage, namely:
+- Setting properties on elements (rather than attributes)
+- Adding handlers for custom events
+- Type checking custom elements and their props
+
+Some of these are being addressed by React in a future version, but they are currently only present in experimental builds not recommended for production.
+
+`@lit/react` allows creation of React components wrapping the custom element. The created components can be idiomatic to React such that users of the component do not have to worry about the inner web component implementaion.
+
+It is useful for both web component authors who wish to vend React versions of their components for users to reach a wider audience, as well as React developers who wish to use a neat web component that they found in their project more ergonomically.
+
+`@lit-labs/react` has been our most popular labs project by far with over 500k weekly npm downloads and is already being used by many web component libraries to provide React versions of their components to users.
+
+Read more about its usage at our [React framework integration doc](/docs/frameworks/react).
+
+### Context
+
+### Task
+
+## Preact Signals Integration { #preact-signals }
+
+**Thanks!,**
+
+**-The Lit Team**
diff --git a/packages/lit-dev-content/site/docs/v2/v2.json b/packages/lit-dev-content/site/docs/v2/v2.json
index 4a1be1b03..344204df6 100644
--- a/packages/lit-dev-content/site/docs/v2/v2.json
+++ b/packages/lit-dev-content/site/docs/v2/v2.json
@@ -1,3 +1,4 @@
{
- "collection": "docs-v2"
+ "collection": "docs-v2",
+ "selectedVersion": "v2"
}
diff --git a/packages/lit-dev-content/site/images/blog/3.0-launch/compiler-benchmarks.png b/packages/lit-dev-content/site/images/blog/3.0-launch/compiler-benchmarks.png
new file mode 100644
index 000000000..4e4ccf049
Binary files /dev/null and b/packages/lit-dev-content/site/images/blog/3.0-launch/compiler-benchmarks.png differ
diff --git a/packages/lit-dev-content/site/site.json b/packages/lit-dev-content/site/site.json
index d99fbce26..04f520b7e 100644
--- a/packages/lit-dev-content/site/site.json
+++ b/packages/lit-dev-content/site/site.json
@@ -1,13 +1,13 @@
{
- "selectedVersion": "v2",
- "latestVersion": "v2",
+ "selectedVersion": "v3",
+ "latestVersion": "v3",
"versions": {
"v3": {
- "path": "/docs/v3",
+ "path": "/docs",
"label": "v3"
},
"v2": {
- "path": "/docs",
+ "path": "/docs/v2",
"label": "v2"
},
"v1": {
diff --git a/packages/lit-dev-tests/src/playwright/home.spec.js-snapshots/homePageIntroSection-linux.png b/packages/lit-dev-tests/src/playwright/home.spec.js-snapshots/homePageIntroSection-linux.png
index b113338cf..188b26f44 100644
Binary files a/packages/lit-dev-tests/src/playwright/home.spec.js-snapshots/homePageIntroSection-linux.png and b/packages/lit-dev-tests/src/playwright/home.spec.js-snapshots/homePageIntroSection-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/backendErrorWritingGist-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/backendErrorWritingGist-linux.png
index 0d8303e00..1b284328c 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/backendErrorWritingGist-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/backendErrorWritingGist-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/gistDoesNotExist-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/gistDoesNotExist-linux.png
index c0b57bbb1..273e82615 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/gistDoesNotExist-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/gistDoesNotExist-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-1-shareMenuOpen-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-1-shareMenuOpen-linux.png
index b03156d48..a35e3aa68 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-1-shareMenuOpen-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-1-shareMenuOpen-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-2-signedIn-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-2-signedIn-linux.png
index 173292697..f6651785e 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-2-signedIn-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-2-signedIn-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-3-snackbarOpen-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-3-snackbarOpen-linux.png
index 40b6a8263..30094170d 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-3-snackbarOpen-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-3-snackbarOpen-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-4-pageReloaded-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-4-pageReloaded-linux.png
index 36682a3fe..e1fe240db 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-4-pageReloaded-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-4-pageReloaded-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-5-renamingFile-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-5-renamingFile-linux.png
index c980aadc8..4bf1bf3ea 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-5-renamingFile-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-5-renamingFile-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-6-addingFile-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-6-addingFile-linux.png
index f013e980a..93de84108 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-6-addingFile-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-6-addingFile-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-7-shareMenuOpenAgain-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-7-shareMenuOpenAgain-linux.png
index 54b4712e9..c0d014a60 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-7-shareMenuOpenAgain-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-7-shareMenuOpenAgain-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-8-gistUpdated-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-8-gistUpdated-linux.png
index 6bbb1c242..82df7fc14 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-8-gistUpdated-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-8-gistUpdated-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-9-pageReloadedAgain-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-9-pageReloadedAgain-linux.png
index 867ccec57..b6063bab4 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-9-pageReloadedAgain-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareGist-9-pageReloadedAgain-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-1-shareMenuOpen-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-1-shareMenuOpen-linux.png
index 85300f17e..77ff29213 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-1-shareMenuOpen-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-1-shareMenuOpen-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-2-snackbarOpen-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-2-snackbarOpen-linux.png
index 2914e31db..c6b9a718c 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-2-snackbarOpen-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-2-snackbarOpen-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-3-pageReloaded-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-3-pageReloaded-linux.png
index 0330f1521..2a7a6a80f 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-3-pageReloaded-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/shareLongUrl-3-pageReloaded-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userClosesGitHubAuthWindowTooEarly-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userClosesGitHubAuthWindowTooEarly-linux.png
index 1520cc2cd..f63efa5ac 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userClosesGitHubAuthWindowTooEarly-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userClosesGitHubAuthWindowTooEarly-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userDeclinesGithubAuth-linux.png b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userDeclinesGithubAuth-linux.png
index a24c4193e..00710c9e7 100644
Binary files a/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userDeclinesGithubAuth-linux.png and b/packages/lit-dev-tests/src/playwright/playground.spec.js-snapshots/userDeclinesGithubAuth-linux.png differ
diff --git a/packages/lit-dev-tests/src/playwright/tutorials.spec.js-snapshots/introToLitTutorialFirstStep-linux.png b/packages/lit-dev-tests/src/playwright/tutorials.spec.js-snapshots/introToLitTutorialFirstStep-linux.png
index fe1ec5a98..143777346 100644
Binary files a/packages/lit-dev-tests/src/playwright/tutorials.spec.js-snapshots/introToLitTutorialFirstStep-linux.png and b/packages/lit-dev-tests/src/playwright/tutorials.spec.js-snapshots/introToLitTutorialFirstStep-linux.png differ
diff --git a/packages/lit-dev-tools-esm/src/build-unversioned-docs.ts b/packages/lit-dev-tools-esm/src/build-unversioned-docs.ts
index 9255b1d10..0610b8c42 100644
--- a/packages/lit-dev-tools-esm/src/build-unversioned-docs.ts
+++ b/packages/lit-dev-tools-esm/src/build-unversioned-docs.ts
@@ -15,7 +15,7 @@ const CONTENT_PKG = pathlib.resolve(REPO_ROOT, 'packages', 'lit-dev-content');
const SITE_JSON = pathlib.resolve(CONTENT_PKG, 'site', 'site.json');
interface SiteJSON {
- latestVersion: 'v1' | 'v2';
+ latestVersion: 'v1' | 'v2' | 'v3';
}
type EleventyFrontMatterData = string[];
@@ -44,7 +44,7 @@ const UNVERSIONED_VERSION_LOCATION = pathlib.resolve(
*
* The following transforms are then applied on the files:
* - Permalink frontmatter is added to strip the version from the URL. E.g.,
- * /docs/v2/* becomes /docs/*.
+ * /docs/v3/* becomes /docs/*.
* - `api.html` has frontmatter transformed so base api paths become
* unversioned.
* - The latest version `v[N].json` file is renamed `unversioned.json` so it