diff --git a/apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md b/apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md index 205013078e..93e7034939 100644 --- a/apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md +++ b/apps/svelte.dev/content/blog/2024-12-01-advent-of-svelte.md @@ -83,9 +83,12 @@ A lot of you wanted a place to put asynchronous setup work that happens before y - [docs](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) -## Day 11 +## Day 11: `svelte/reactivity/window` -Coming soon! +Today we added a whole new module. `svelte/reactivity/window` exports a variety of reactive values like `innerWidth`, `innerHeight`, `scrollX`, `scrollY` and so on. Like the `MediaQuery` introduced on day 5 and `Spring` and `Tween` from day 6, these are class instances with a reactive `current` property that you can use in your template and in deriveds/effects. Behind the scenes, Svelte handles all the event listener stuff. + +- [docs](/docs/svelte/svelte-reactivity-window) +- [demo](/playground/8ac86e10fdce485a99c29c95e0092df4?version=5.11.0) ## Day 12 diff --git a/packages/site-kit/src/lib/codemirror/index.js b/packages/site-kit/src/lib/codemirror/index.js index b3ccb00d7f..24152606a3 100644 --- a/packages/site-kit/src/lib/codemirror/index.js +++ b/packages/site-kit/src/lib/codemirror/index.js @@ -245,6 +245,7 @@ export function completion_for_javascript(context, selected, files) { 'svelte/legacy', 'svelte/motion', 'svelte/reactivity', + 'svelte/reactivity/window', 'svelte/store', 'svelte/transition' ];