\ No newline at end of file
diff --git a/site/content/examples/00-introduction/00-hello-world/meta.json b/site/content/examples/00-introduction/00-hello-world/meta.json
new file mode 100644
index 000000000000..2f47184710c7
--- /dev/null
+++ b/site/content/examples/00-introduction/00-hello-world/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Adding data"
+}
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/01-dynamic-attributes/App.svelte b/site/content/examples/00-introduction/01-dynamic-attributes/App.svelte
new file mode 100644
index 000000000000..6a76b43dde14
--- /dev/null
+++ b/site/content/examples/00-introduction/01-dynamic-attributes/App.svelte
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/01-dynamic-attributes/meta.json b/site/content/examples/00-introduction/01-dynamic-attributes/meta.json
new file mode 100644
index 000000000000..89614e0aa6a6
--- /dev/null
+++ b/site/content/examples/00-introduction/01-dynamic-attributes/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Dynamic attributes"
+}
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/02-styling/App.svelte b/site/content/examples/00-introduction/02-styling/App.svelte
new file mode 100644
index 000000000000..cacaf8ccba86
--- /dev/null
+++ b/site/content/examples/00-introduction/02-styling/App.svelte
@@ -0,0 +1,9 @@
+
+
+
Styled!
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/02-styling/meta.json b/site/content/examples/00-introduction/02-styling/meta.json
new file mode 100644
index 000000000000..dcdf2bff0198
--- /dev/null
+++ b/site/content/examples/00-introduction/02-styling/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Styling"
+}
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/03-nested-components/App.svelte b/site/content/examples/00-introduction/03-nested-components/App.svelte
new file mode 100644
index 000000000000..e0a2e5fe176b
--- /dev/null
+++ b/site/content/examples/00-introduction/03-nested-components/App.svelte
@@ -0,0 +1,14 @@
+
+
+
+
+
These styles...
+
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/03-nested-components/Nested.svelte b/site/content/examples/00-introduction/03-nested-components/Nested.svelte
new file mode 100644
index 000000000000..17685233a5e9
--- /dev/null
+++ b/site/content/examples/00-introduction/03-nested-components/Nested.svelte
@@ -0,0 +1 @@
+
...don't affect this element
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/03-nested-components/meta.json b/site/content/examples/00-introduction/03-nested-components/meta.json
new file mode 100644
index 000000000000..5848360a403c
--- /dev/null
+++ b/site/content/examples/00-introduction/03-nested-components/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Nested components"
+}
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/04-html-tags/App.svelte b/site/content/examples/00-introduction/04-html-tags/App.svelte
new file mode 100644
index 000000000000..4029f076e227
--- /dev/null
+++ b/site/content/examples/00-introduction/04-html-tags/App.svelte
@@ -0,0 +1,5 @@
+
+
+
{@html string}
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/04-html-tags/meta.json b/site/content/examples/00-introduction/04-html-tags/meta.json
new file mode 100644
index 000000000000..01af59ac8434
--- /dev/null
+++ b/site/content/examples/00-introduction/04-html-tags/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "HTML tags"
+}
\ No newline at end of file
diff --git a/site/content/examples/00-introduction/meta.json b/site/content/examples/00-introduction/meta.json
new file mode 100644
index 000000000000..5c8f7bc10b6b
--- /dev/null
+++ b/site/content/examples/00-introduction/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Introduction"
+}
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/00-reactive-assignments/App.svelte b/site/content/examples/01-reactivity/00-reactive-assignments/App.svelte
new file mode 100644
index 000000000000..bc50d74cfc75
--- /dev/null
+++ b/site/content/examples/01-reactivity/00-reactive-assignments/App.svelte
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/00-reactive-assignments/meta.json b/site/content/examples/01-reactivity/00-reactive-assignments/meta.json
new file mode 100644
index 000000000000..feb3e8f33801
--- /dev/null
+++ b/site/content/examples/01-reactivity/00-reactive-assignments/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Reactive assignments"
+}
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/01-reactive-declarations/App.svelte b/site/content/examples/01-reactivity/01-reactive-declarations/App.svelte
new file mode 100644
index 000000000000..f7aca3bd80b4
--- /dev/null
+++ b/site/content/examples/01-reactivity/01-reactive-declarations/App.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
{count} * 2 = {doubled}
+
{doubled} * 2 = {quadrupled}
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/01-reactive-declarations/meta.json b/site/content/examples/01-reactivity/01-reactive-declarations/meta.json
new file mode 100644
index 000000000000..d824d8366965
--- /dev/null
+++ b/site/content/examples/01-reactivity/01-reactive-declarations/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Reactive declarations"
+}
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/02-reactive-statements/App.svelte b/site/content/examples/01-reactivity/02-reactive-statements/App.svelte
new file mode 100644
index 000000000000..f757be6f5107
--- /dev/null
+++ b/site/content/examples/01-reactivity/02-reactive-statements/App.svelte
@@ -0,0 +1,16 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/02-reactive-statements/meta.json b/site/content/examples/01-reactivity/02-reactive-statements/meta.json
new file mode 100644
index 000000000000..1ef62c88304a
--- /dev/null
+++ b/site/content/examples/01-reactivity/02-reactive-statements/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Reactive statements"
+}
\ No newline at end of file
diff --git a/site/content/examples/01-reactivity/meta.json b/site/content/examples/01-reactivity/meta.json
new file mode 100644
index 000000000000..c908815e040a
--- /dev/null
+++ b/site/content/examples/01-reactivity/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Reactivity"
+}
\ No newline at end of file
diff --git a/site/content/examples/02-props/00-declaring-props/App.svelte b/site/content/examples/02-props/00-declaring-props/App.svelte
new file mode 100644
index 000000000000..79d7e6b78956
--- /dev/null
+++ b/site/content/examples/02-props/00-declaring-props/App.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/02-props/00-declaring-props/Nested.svelte b/site/content/examples/02-props/00-declaring-props/Nested.svelte
new file mode 100644
index 000000000000..ecd3cb625410
--- /dev/null
+++ b/site/content/examples/02-props/00-declaring-props/Nested.svelte
@@ -0,0 +1,5 @@
+
+
+
The answer is {answer}
\ No newline at end of file
diff --git a/site/content/examples/02-props/00-declaring-props/meta.json b/site/content/examples/02-props/00-declaring-props/meta.json
new file mode 100644
index 000000000000..485c2708bd31
--- /dev/null
+++ b/site/content/examples/02-props/00-declaring-props/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Declaring props"
+}
\ No newline at end of file
diff --git a/site/content/examples/nested-components/App.svelte b/site/content/examples/02-props/01-default-values/App.svelte
similarity index 65%
rename from site/content/examples/nested-components/App.svelte
rename to site/content/examples/02-props/01-default-values/App.svelte
index 83cc0c6eb566..f9d63b30d654 100644
--- a/site/content/examples/nested-components/App.svelte
+++ b/site/content/examples/02-props/01-default-values/App.svelte
@@ -2,5 +2,5 @@
import Nested from './Nested.svelte';
-
This is a top-level element.
+
\ No newline at end of file
diff --git a/site/content/examples/02-props/01-default-values/Nested.svelte b/site/content/examples/02-props/01-default-values/Nested.svelte
new file mode 100644
index 000000000000..35ee5c9f88c0
--- /dev/null
+++ b/site/content/examples/02-props/01-default-values/Nested.svelte
@@ -0,0 +1,5 @@
+
+
+
The answer is {answer}
\ No newline at end of file
diff --git a/site/content/examples/02-props/01-default-values/meta.json b/site/content/examples/02-props/01-default-values/meta.json
new file mode 100644
index 000000000000..f690d64349b3
--- /dev/null
+++ b/site/content/examples/02-props/01-default-values/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Default values"
+}
\ No newline at end of file
diff --git a/site/content/examples/02-props/02-spread-props/App.svelte b/site/content/examples/02-props/02-spread-props/App.svelte
new file mode 100644
index 000000000000..f40d3b89c885
--- /dev/null
+++ b/site/content/examples/02-props/02-spread-props/App.svelte
@@ -0,0 +1,12 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/02-props/02-spread-props/Info.svelte b/site/content/examples/02-props/02-spread-props/Info.svelte
new file mode 100644
index 000000000000..74123982441f
--- /dev/null
+++ b/site/content/examples/02-props/02-spread-props/Info.svelte
@@ -0,0 +1,12 @@
+
+
+
+ The {name} package is {speed} fast.
+ Download version {version} from npm
+ and learn more here
+
\ No newline at end of file
diff --git a/site/content/examples/02-props/02-spread-props/meta.json b/site/content/examples/02-props/02-spread-props/meta.json
new file mode 100644
index 000000000000..3f4b5128bf89
--- /dev/null
+++ b/site/content/examples/02-props/02-spread-props/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Spread props"
+}
\ No newline at end of file
diff --git a/site/content/examples/02-props/meta.json b/site/content/examples/02-props/meta.json
new file mode 100644
index 000000000000..7b9e0a27831f
--- /dev/null
+++ b/site/content/examples/02-props/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Props"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/00-if-blocks/App.svelte b/site/content/examples/03-logic/00-if-blocks/App.svelte
new file mode 100644
index 000000000000..01b8867adeba
--- /dev/null
+++ b/site/content/examples/03-logic/00-if-blocks/App.svelte
@@ -0,0 +1,19 @@
+
+
+{#if user.loggedIn}
+
+{/if}
+
+{#if !user.loggedIn}
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/00-if-blocks/meta.json b/site/content/examples/03-logic/00-if-blocks/meta.json
new file mode 100644
index 000000000000..21598b878efc
--- /dev/null
+++ b/site/content/examples/03-logic/00-if-blocks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "If blocks"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/01-else-blocks/App.svelte b/site/content/examples/03-logic/01-else-blocks/App.svelte
new file mode 100644
index 000000000000..c82565c2f7ce
--- /dev/null
+++ b/site/content/examples/03-logic/01-else-blocks/App.svelte
@@ -0,0 +1,17 @@
+
+
+{#if user.loggedIn}
+
+{:else}
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/01-else-blocks/meta.json b/site/content/examples/03-logic/01-else-blocks/meta.json
new file mode 100644
index 000000000000..5703b7ea92ce
--- /dev/null
+++ b/site/content/examples/03-logic/01-else-blocks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Else blocks"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/02-else-if-blocks/App.svelte b/site/content/examples/03-logic/02-else-if-blocks/App.svelte
new file mode 100644
index 000000000000..9102618ff49f
--- /dev/null
+++ b/site/content/examples/03-logic/02-else-if-blocks/App.svelte
@@ -0,0 +1,11 @@
+
+
+{#if x > 10}
+
{x} is greater than 10
+{:else if 5 > x}
+
{x} is less than 5
+{:else}
+
{x} is between 5 and 10
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/02-else-if-blocks/meta.json b/site/content/examples/03-logic/02-else-if-blocks/meta.json
new file mode 100644
index 000000000000..c778d9f48b0c
--- /dev/null
+++ b/site/content/examples/03-logic/02-else-if-blocks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Else-if blocks"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/03-each-blocks/App.svelte b/site/content/examples/03-logic/03-each-blocks/App.svelte
new file mode 100644
index 000000000000..6ea5097be202
--- /dev/null
+++ b/site/content/examples/03-logic/03-each-blocks/App.svelte
@@ -0,0 +1,17 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/03-logic/03-each-blocks/meta.json b/site/content/examples/03-logic/03-each-blocks/meta.json
new file mode 100644
index 000000000000..d829b3cc53a6
--- /dev/null
+++ b/site/content/examples/03-logic/03-each-blocks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Each blocks"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte b/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte
new file mode 100644
index 000000000000..73a2dcc609f4
--- /dev/null
+++ b/site/content/examples/03-logic/04-keyed-each-blocks/App.svelte
@@ -0,0 +1,23 @@
+
+
+
+
+{#each things as thing (thing.id)}
+
+{/each}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte b/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte
new file mode 100644
index 000000000000..4e86d3210908
--- /dev/null
+++ b/site/content/examples/03-logic/04-keyed-each-blocks/Thing.svelte
@@ -0,0 +1,9 @@
+
+
+
{valueAtStart} / {value}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/04-keyed-each-blocks/meta.json b/site/content/examples/03-logic/04-keyed-each-blocks/meta.json
new file mode 100644
index 000000000000..faee8bff8d20
--- /dev/null
+++ b/site/content/examples/03-logic/04-keyed-each-blocks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Keyed each blocks"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/05-await-blocks/App.svelte b/site/content/examples/03-logic/05-await-blocks/App.svelte
new file mode 100644
index 000000000000..8c8036c0f1f4
--- /dev/null
+++ b/site/content/examples/03-logic/05-await-blocks/App.svelte
@@ -0,0 +1,30 @@
+
+
+
+
+{#await promise}
+
...waiting
+{:then number}
+
The number is {number}
+{:catch error}
+
{error.message}
+{/await}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/05-await-blocks/meta.json b/site/content/examples/03-logic/05-await-blocks/meta.json
new file mode 100644
index 000000000000..c7a809f5edd1
--- /dev/null
+++ b/site/content/examples/03-logic/05-await-blocks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Await blocks"
+}
\ No newline at end of file
diff --git a/site/content/examples/03-logic/meta.json b/site/content/examples/03-logic/meta.json
new file mode 100644
index 000000000000..3ecf1ccee24c
--- /dev/null
+++ b/site/content/examples/03-logic/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Logic"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/00-dom-events/App.svelte b/site/content/examples/04-events/00-dom-events/App.svelte
new file mode 100644
index 000000000000..f26112f06cec
--- /dev/null
+++ b/site/content/examples/04-events/00-dom-events/App.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
+ The mouse position is {m.x} x {m.y}
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/00-dom-events/meta.json b/site/content/examples/04-events/00-dom-events/meta.json
new file mode 100644
index 000000000000..5b3e37e41f50
--- /dev/null
+++ b/site/content/examples/04-events/00-dom-events/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "DOM events"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/01-inline-handlers/App.svelte b/site/content/examples/04-events/01-inline-handlers/App.svelte
new file mode 100644
index 000000000000..f0fd6ff17ab3
--- /dev/null
+++ b/site/content/examples/04-events/01-inline-handlers/App.svelte
@@ -0,0 +1,11 @@
+
+
+
+
+
+ The mouse position is {m.x} x {m.y}
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/01-inline-handlers/meta.json b/site/content/examples/04-events/01-inline-handlers/meta.json
new file mode 100644
index 000000000000..575b9ab2b6e0
--- /dev/null
+++ b/site/content/examples/04-events/01-inline-handlers/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Inline handlers"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/02-event-modifiers/App.svelte b/site/content/examples/04-events/02-event-modifiers/App.svelte
new file mode 100644
index 000000000000..94df49cb2d6f
--- /dev/null
+++ b/site/content/examples/04-events/02-event-modifiers/App.svelte
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/02-event-modifiers/meta.json b/site/content/examples/04-events/02-event-modifiers/meta.json
new file mode 100644
index 000000000000..322bb5ba5e28
--- /dev/null
+++ b/site/content/examples/04-events/02-event-modifiers/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Event modifiers"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/03-component-events/App.svelte b/site/content/examples/04-events/03-component-events/App.svelte
new file mode 100644
index 000000000000..a8d14a368a0f
--- /dev/null
+++ b/site/content/examples/04-events/03-component-events/App.svelte
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/03-component-events/Inner.svelte b/site/content/examples/04-events/03-component-events/Inner.svelte
new file mode 100644
index 000000000000..6ac8301f2495
--- /dev/null
+++ b/site/content/examples/04-events/03-component-events/Inner.svelte
@@ -0,0 +1,15 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/03-component-events/meta.json b/site/content/examples/04-events/03-component-events/meta.json
new file mode 100644
index 000000000000..2a777d4d003c
--- /dev/null
+++ b/site/content/examples/04-events/03-component-events/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Component events"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/04-event-forwarding/App.svelte b/site/content/examples/04-events/04-event-forwarding/App.svelte
new file mode 100644
index 000000000000..973df50f0a2e
--- /dev/null
+++ b/site/content/examples/04-events/04-event-forwarding/App.svelte
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/04-event-forwarding/Inner.svelte b/site/content/examples/04-events/04-event-forwarding/Inner.svelte
new file mode 100644
index 000000000000..6ac8301f2495
--- /dev/null
+++ b/site/content/examples/04-events/04-event-forwarding/Inner.svelte
@@ -0,0 +1,15 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/04-event-forwarding/Outer.svelte b/site/content/examples/04-events/04-event-forwarding/Outer.svelte
new file mode 100644
index 000000000000..10c28f298a3a
--- /dev/null
+++ b/site/content/examples/04-events/04-event-forwarding/Outer.svelte
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/04-event-forwarding/meta.json b/site/content/examples/04-events/04-event-forwarding/meta.json
new file mode 100644
index 000000000000..3a8aa674b705
--- /dev/null
+++ b/site/content/examples/04-events/04-event-forwarding/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Event forwarding"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/05-dom-event-forwarding/App.svelte b/site/content/examples/04-events/05-dom-event-forwarding/App.svelte
new file mode 100644
index 000000000000..1429cae207d8
--- /dev/null
+++ b/site/content/examples/04-events/05-dom-event-forwarding/App.svelte
@@ -0,0 +1,9 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte b/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte
new file mode 100644
index 000000000000..75630ea99c08
--- /dev/null
+++ b/site/content/examples/04-events/05-dom-event-forwarding/FancyButton.svelte
@@ -0,0 +1,15 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/04-events/05-dom-event-forwarding/meta.json b/site/content/examples/04-events/05-dom-event-forwarding/meta.json
new file mode 100644
index 000000000000..9aa593808f04
--- /dev/null
+++ b/site/content/examples/04-events/05-dom-event-forwarding/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "DOM event forwarding"
+}
\ No newline at end of file
diff --git a/site/content/examples/04-events/meta.json b/site/content/examples/04-events/meta.json
new file mode 100644
index 000000000000..c5f088e20879
--- /dev/null
+++ b/site/content/examples/04-events/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Events"
+}
\ No newline at end of file
diff --git a/site/content/examples/binding-input-text/App.svelte b/site/content/examples/05-bindings/00-text-inputs/App.svelte
similarity index 71%
rename from site/content/examples/binding-input-text/App.svelte
rename to site/content/examples/05-bindings/00-text-inputs/App.svelte
index 5d81d1e564b6..5eab79764a6f 100644
--- a/site/content/examples/binding-input-text/App.svelte
+++ b/site/content/examples/05-bindings/00-text-inputs/App.svelte
@@ -1,2 +1,6 @@
+
+
Hello {name || 'stranger'}!
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/00-text-inputs/meta.json b/site/content/examples/05-bindings/00-text-inputs/meta.json
new file mode 100644
index 000000000000..45577af5be65
--- /dev/null
+++ b/site/content/examples/05-bindings/00-text-inputs/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Text inputs"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/01-numeric-inputs/App.svelte b/site/content/examples/05-bindings/01-numeric-inputs/App.svelte
new file mode 100644
index 000000000000..798d57e02192
--- /dev/null
+++ b/site/content/examples/05-bindings/01-numeric-inputs/App.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
{a} + {b} = {a + b}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/01-numeric-inputs/meta.json b/site/content/examples/05-bindings/01-numeric-inputs/meta.json
new file mode 100644
index 000000000000..72f8579704f0
--- /dev/null
+++ b/site/content/examples/05-bindings/01-numeric-inputs/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Numeric inputs"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/02-checkbox-inputs/App.svelte b/site/content/examples/05-bindings/02-checkbox-inputs/App.svelte
new file mode 100644
index 000000000000..b82d31e78317
--- /dev/null
+++ b/site/content/examples/05-bindings/02-checkbox-inputs/App.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+{#if yes}
+
Thank you. We will bombard your inbox and sell your personal details.
+{:else}
+
You must opt in to continue. If you're not paying, you're the product.
+{/if}
+
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/02-checkbox-inputs/meta.json b/site/content/examples/05-bindings/02-checkbox-inputs/meta.json
new file mode 100644
index 000000000000..723312a3d955
--- /dev/null
+++ b/site/content/examples/05-bindings/02-checkbox-inputs/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Checkbox inputs"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/03-group-inputs/App.svelte b/site/content/examples/05-bindings/03-group-inputs/App.svelte
new file mode 100644
index 000000000000..a46c61c7e786
--- /dev/null
+++ b/site/content/examples/05-bindings/03-group-inputs/App.svelte
@@ -0,0 +1,52 @@
+
+
+
Size
+
+
+
+
+
+
+
+
Flavours
+
+{#each menu as flavour}
+
+{/each}
+
+{#if flavours.length === 0}
+
Please select at least one flavour
+{:else if flavours.length > scoops}
+
Can't order more flavours than scoops!
+{:else}
+
+ You ordered {scoops} {scoops === 1 ? 'scoop' : 'scoops'}
+ of {join(flavours)}
+
+{/if}
diff --git a/site/content/examples/05-bindings/03-group-inputs/meta.json b/site/content/examples/05-bindings/03-group-inputs/meta.json
new file mode 100644
index 000000000000..2203d6e6fa6a
--- /dev/null
+++ b/site/content/examples/05-bindings/03-group-inputs/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Group inputs"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/04-textarea-inputs/App.svelte b/site/content/examples/05-bindings/04-textarea-inputs/App.svelte
new file mode 100644
index 000000000000..be338bf47fc1
--- /dev/null
+++ b/site/content/examples/05-bindings/04-textarea-inputs/App.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+{@html marked(value)}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/04-textarea-inputs/meta.json b/site/content/examples/05-bindings/04-textarea-inputs/meta.json
new file mode 100644
index 000000000000..01adf6b5cf3d
--- /dev/null
+++ b/site/content/examples/05-bindings/04-textarea-inputs/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Textarea inputs"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/05-select-bindings/App.svelte b/site/content/examples/05-bindings/05-select-bindings/App.svelte
new file mode 100644
index 000000000000..3f1e7fa7e1a8
--- /dev/null
+++ b/site/content/examples/05-bindings/05-select-bindings/App.svelte
@@ -0,0 +1,39 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/05-select-bindings/meta.json b/site/content/examples/05-bindings/05-select-bindings/meta.json
new file mode 100644
index 000000000000..fe170eb0fcb2
--- /dev/null
+++ b/site/content/examples/05-bindings/05-select-bindings/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Select bindings"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/06-multiple-select-bindings/App.svelte b/site/content/examples/05-bindings/06-multiple-select-bindings/App.svelte
new file mode 100644
index 000000000000..d808850158ea
--- /dev/null
+++ b/site/content/examples/05-bindings/06-multiple-select-bindings/App.svelte
@@ -0,0 +1,53 @@
+
+
+
Size
+
+
+
+
+
+
+
+
Flavours
+
+
+
+{#if flavours.length === 0}
+
Please select at least one flavour
+{:else if flavours.length > scoops}
+
Can't order more flavours than scoops!
+{:else}
+
+ You ordered {scoops} {scoops === 1 ? 'scoop' : 'scoops'}
+ of {join(flavours)}
+
+{/if}
diff --git a/site/content/examples/05-bindings/06-multiple-select-bindings/meta.json b/site/content/examples/05-bindings/06-multiple-select-bindings/meta.json
new file mode 100644
index 000000000000..abf763540798
--- /dev/null
+++ b/site/content/examples/05-bindings/06-multiple-select-bindings/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Select multiple"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/07-each-block-bindings/App.svelte b/site/content/examples/05-bindings/07-each-block-bindings/App.svelte
new file mode 100644
index 000000000000..92bdc7754f38
--- /dev/null
+++ b/site/content/examples/05-bindings/07-each-block-bindings/App.svelte
@@ -0,0 +1,39 @@
+
+
+
Todos
+
+{#each todos as todo}
+
+
+
+
+
+{/each}
+
+
+
+
diff --git a/site/content/examples/05-bindings/07-each-block-bindings/meta.json b/site/content/examples/05-bindings/07-each-block-bindings/meta.json
new file mode 100644
index 000000000000..2d27051b49fa
--- /dev/null
+++ b/site/content/examples/05-bindings/07-each-block-bindings/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Each block bindings"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/08-media-elements/App.svelte b/site/content/examples/05-bindings/08-media-elements/App.svelte
new file mode 100644
index 000000000000..2cf819fca0ea
--- /dev/null
+++ b/site/content/examples/05-bindings/08-media-elements/App.svelte
@@ -0,0 +1,130 @@
+
+
+
+
+
+ {format(time)}
+ click anywhere to {paused ? 'play' : 'pause'} / drag to seek
+ {format(duration)}
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/08-media-elements/meta.json b/site/content/examples/05-bindings/08-media-elements/meta.json
new file mode 100644
index 000000000000..4e40a6acee3a
--- /dev/null
+++ b/site/content/examples/05-bindings/08-media-elements/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Media elements"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/09-dimensions/App.svelte b/site/content/examples/05-bindings/09-dimensions/App.svelte
new file mode 100644
index 000000000000..ca992599c1d1
--- /dev/null
+++ b/site/content/examples/05-bindings/09-dimensions/App.svelte
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
size: {w}px x {h}px
+
+
+ {text}
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/09-dimensions/meta.json b/site/content/examples/05-bindings/09-dimensions/meta.json
new file mode 100644
index 000000000000..9f8b6602c7b3
--- /dev/null
+++ b/site/content/examples/05-bindings/09-dimensions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Dimensions"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/10-bind-this/App.svelte b/site/content/examples/05-bindings/10-bind-this/App.svelte
new file mode 100644
index 000000000000..eacd203629aa
--- /dev/null
+++ b/site/content/examples/05-bindings/10-bind-this/App.svelte
@@ -0,0 +1,59 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/10-bind-this/meta.json b/site/content/examples/05-bindings/10-bind-this/meta.json
new file mode 100644
index 000000000000..da5ce399ab39
--- /dev/null
+++ b/site/content/examples/05-bindings/10-bind-this/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "bind:this={canvas}"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/11-component-bindings/App.svelte b/site/content/examples/05-bindings/11-component-bindings/App.svelte
new file mode 100644
index 000000000000..67fec4a5ada9
--- /dev/null
+++ b/site/content/examples/05-bindings/11-component-bindings/App.svelte
@@ -0,0 +1,14 @@
+
+
+
{view}
+
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/11-component-bindings/Keypad.svelte b/site/content/examples/05-bindings/11-component-bindings/Keypad.svelte
new file mode 100644
index 000000000000..c457a15cb50e
--- /dev/null
+++ b/site/content/examples/05-bindings/11-component-bindings/Keypad.svelte
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/11-component-bindings/meta.json b/site/content/examples/05-bindings/11-component-bindings/meta.json
new file mode 100644
index 000000000000..4c921d0e8a77
--- /dev/null
+++ b/site/content/examples/05-bindings/11-component-bindings/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Component bindings"
+}
\ No newline at end of file
diff --git a/site/content/examples/05-bindings/meta.json b/site/content/examples/05-bindings/meta.json
new file mode 100644
index 000000000000..8bb0142eccc9
--- /dev/null
+++ b/site/content/examples/05-bindings/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Bindings"
+}
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/00-onmount/App.svelte b/site/content/examples/06-lifecycle/00-onmount/App.svelte
new file mode 100644
index 000000000000..1b83727627bd
--- /dev/null
+++ b/site/content/examples/06-lifecycle/00-onmount/App.svelte
@@ -0,0 +1,38 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/00-onmount/meta.json b/site/content/examples/06-lifecycle/00-onmount/meta.json
new file mode 100644
index 000000000000..3b2799c5bce3
--- /dev/null
+++ b/site/content/examples/06-lifecycle/00-onmount/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "onMount"
+}
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/01-ondestroy/App.svelte b/site/content/examples/06-lifecycle/01-ondestroy/App.svelte
new file mode 100644
index 000000000000..93a721ef4430
--- /dev/null
+++ b/site/content/examples/06-lifecycle/01-ondestroy/App.svelte
@@ -0,0 +1,11 @@
+
+
+
+ The page has been open for
+ {seconds} {seconds === 1 ? 'second' : 'seconds'}
+
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/01-ondestroy/meta.json b/site/content/examples/06-lifecycle/01-ondestroy/meta.json
new file mode 100644
index 000000000000..d87febd1a587
--- /dev/null
+++ b/site/content/examples/06-lifecycle/01-ondestroy/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "onDestroy"
+}
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/01-ondestroy/utils.js b/site/content/examples/06-lifecycle/01-ondestroy/utils.js
new file mode 100644
index 000000000000..0f75f29e2a51
--- /dev/null
+++ b/site/content/examples/06-lifecycle/01-ondestroy/utils.js
@@ -0,0 +1,9 @@
+import { onDestroy } from 'svelte';
+
+export function onInterval(callback, milliseconds) {
+ const interval = setInterval(callback, milliseconds);
+
+ onDestroy(() => {
+ clearInterval(interval);
+ });
+}
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/02-update/App.svelte b/site/content/examples/06-lifecycle/02-update/App.svelte
new file mode 100644
index 000000000000..373b6dcb6a8b
--- /dev/null
+++ b/site/content/examples/06-lifecycle/02-update/App.svelte
@@ -0,0 +1,106 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/02-update/meta.json b/site/content/examples/06-lifecycle/02-update/meta.json
new file mode 100644
index 000000000000..c92a6db8dcb4
--- /dev/null
+++ b/site/content/examples/06-lifecycle/02-update/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "beforeUpdate and afterUpdate"
+}
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/03-tick/App.svelte b/site/content/examples/06-lifecycle/03-tick/App.svelte
new file mode 100644
index 000000000000..c9cb6de42089
--- /dev/null
+++ b/site/content/examples/06-lifecycle/03-tick/App.svelte
@@ -0,0 +1,37 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/03-tick/meta.json b/site/content/examples/06-lifecycle/03-tick/meta.json
new file mode 100644
index 000000000000..0a406e13aa35
--- /dev/null
+++ b/site/content/examples/06-lifecycle/03-tick/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "tick"
+}
\ No newline at end of file
diff --git a/site/content/examples/06-lifecycle/meta.json b/site/content/examples/06-lifecycle/meta.json
new file mode 100644
index 000000000000..2f833e2a4aba
--- /dev/null
+++ b/site/content/examples/06-lifecycle/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Lifecycle"
+}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/00-writable-stores/App.svelte b/site/content/examples/07-stores/00-writable-stores/App.svelte
new file mode 100644
index 000000000000..ee542f789d19
--- /dev/null
+++ b/site/content/examples/07-stores/00-writable-stores/App.svelte
@@ -0,0 +1,18 @@
+
+
+
The count is {count_value}
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/00-writable-stores/Decrementer.svelte b/site/content/examples/07-stores/00-writable-stores/Decrementer.svelte
new file mode 100644
index 000000000000..043b795047b1
--- /dev/null
+++ b/site/content/examples/07-stores/00-writable-stores/Decrementer.svelte
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/homepage-demo-reactivity/App.svelte b/site/content/examples/07-stores/00-writable-stores/Incrementer.svelte
similarity index 55%
rename from site/content/examples/homepage-demo-reactivity/App.svelte
rename to site/content/examples/07-stores/00-writable-stores/Incrementer.svelte
index 9d1b2757c082..2b5763012b46 100644
--- a/site/content/examples/homepage-demo-reactivity/App.svelte
+++ b/site/content/examples/07-stores/00-writable-stores/Incrementer.svelte
@@ -1,11 +1,11 @@
\ No newline at end of file
diff --git a/site/content/examples/07-stores/00-writable-stores/Resetter.svelte b/site/content/examples/07-stores/00-writable-stores/Resetter.svelte
new file mode 100644
index 000000000000..4183421e517b
--- /dev/null
+++ b/site/content/examples/07-stores/00-writable-stores/Resetter.svelte
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/00-writable-stores/meta.json b/site/content/examples/07-stores/00-writable-stores/meta.json
new file mode 100644
index 000000000000..e0b2a6809d5c
--- /dev/null
+++ b/site/content/examples/07-stores/00-writable-stores/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Writable stores"
+}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/00-writable-stores/stores.js b/site/content/examples/07-stores/00-writable-stores/stores.js
new file mode 100644
index 000000000000..143e0c99f085
--- /dev/null
+++ b/site/content/examples/07-stores/00-writable-stores/stores.js
@@ -0,0 +1,3 @@
+import { writable } from 'svelte/store';
+
+export const count = writable(0);
\ No newline at end of file
diff --git a/site/content/examples/07-stores/01-auto-subscriptions/App.svelte b/site/content/examples/07-stores/01-auto-subscriptions/App.svelte
new file mode 100644
index 000000000000..10ebfb65bbde
--- /dev/null
+++ b/site/content/examples/07-stores/01-auto-subscriptions/App.svelte
@@ -0,0 +1,12 @@
+
+
+
The count is {$count}
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/01-auto-subscriptions/Decrementer.svelte b/site/content/examples/07-stores/01-auto-subscriptions/Decrementer.svelte
new file mode 100644
index 000000000000..043b795047b1
--- /dev/null
+++ b/site/content/examples/07-stores/01-auto-subscriptions/Decrementer.svelte
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/01-auto-subscriptions/Incrementer.svelte b/site/content/examples/07-stores/01-auto-subscriptions/Incrementer.svelte
new file mode 100644
index 000000000000..2b5763012b46
--- /dev/null
+++ b/site/content/examples/07-stores/01-auto-subscriptions/Incrementer.svelte
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/01-auto-subscriptions/Resetter.svelte b/site/content/examples/07-stores/01-auto-subscriptions/Resetter.svelte
new file mode 100644
index 000000000000..4183421e517b
--- /dev/null
+++ b/site/content/examples/07-stores/01-auto-subscriptions/Resetter.svelte
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/01-auto-subscriptions/meta.json b/site/content/examples/07-stores/01-auto-subscriptions/meta.json
new file mode 100644
index 000000000000..a7e4c5fefc21
--- /dev/null
+++ b/site/content/examples/07-stores/01-auto-subscriptions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Auto-subscriptions"
+}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/01-auto-subscriptions/stores.js b/site/content/examples/07-stores/01-auto-subscriptions/stores.js
new file mode 100644
index 000000000000..143e0c99f085
--- /dev/null
+++ b/site/content/examples/07-stores/01-auto-subscriptions/stores.js
@@ -0,0 +1,3 @@
+import { writable } from 'svelte/store';
+
+export const count = writable(0);
\ No newline at end of file
diff --git a/site/content/examples/07-stores/02-readable-stores/App.svelte b/site/content/examples/07-stores/02-readable-stores/App.svelte
new file mode 100644
index 000000000000..3ff0b0362f01
--- /dev/null
+++ b/site/content/examples/07-stores/02-readable-stores/App.svelte
@@ -0,0 +1,12 @@
+
+
+
The time is {formatter.format($time)}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/02-readable-stores/meta.json b/site/content/examples/07-stores/02-readable-stores/meta.json
new file mode 100644
index 000000000000..3f420cafd804
--- /dev/null
+++ b/site/content/examples/07-stores/02-readable-stores/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Readable stores"
+}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/02-readable-stores/stores.js b/site/content/examples/07-stores/02-readable-stores/stores.js
new file mode 100644
index 000000000000..015de5ad4532
--- /dev/null
+++ b/site/content/examples/07-stores/02-readable-stores/stores.js
@@ -0,0 +1,11 @@
+import { readable } from 'svelte/store';
+
+export const time = readable(function start(set) {
+ const interval = setInterval(() => {
+ set(new Date());
+ }, 1000);
+
+ return function stop() {
+ clearInterval(interval);
+ };
+}, new Date());
\ No newline at end of file
diff --git a/site/content/examples/07-stores/03-derived-stores/App.svelte b/site/content/examples/07-stores/03-derived-stores/App.svelte
new file mode 100644
index 000000000000..8182ecd671d4
--- /dev/null
+++ b/site/content/examples/07-stores/03-derived-stores/App.svelte
@@ -0,0 +1,17 @@
+
+
+
The time is {formatter.format($time)}
+
+
+ This page has been open for
+ {$elapsed} {$elapsed === 1 ? 'second' : 'seconds'}
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/03-derived-stores/meta.json b/site/content/examples/07-stores/03-derived-stores/meta.json
new file mode 100644
index 000000000000..23105b0bfa4d
--- /dev/null
+++ b/site/content/examples/07-stores/03-derived-stores/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Derived stores"
+}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/03-derived-stores/stores.js b/site/content/examples/07-stores/03-derived-stores/stores.js
new file mode 100644
index 000000000000..2f3af1247a1c
--- /dev/null
+++ b/site/content/examples/07-stores/03-derived-stores/stores.js
@@ -0,0 +1,18 @@
+import { readable, derive } from 'svelte/store';
+
+export const time = readable(function start(set) {
+ const interval = setInterval(() => {
+ set(new Date());
+ }, 1000);
+
+ return function stop() {
+ clearInterval(interval);
+ };
+}, new Date());
+
+const start = new Date();
+
+export const elapsed = derive(
+ time,
+ $time => Math.round(($time - start) / 1000)
+);
\ No newline at end of file
diff --git a/site/content/examples/07-stores/04-custom-stores/App.svelte b/site/content/examples/07-stores/04-custom-stores/App.svelte
new file mode 100644
index 000000000000..a320cc052ffd
--- /dev/null
+++ b/site/content/examples/07-stores/04-custom-stores/App.svelte
@@ -0,0 +1,9 @@
+
+
+
The count is {$count}
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/07-stores/04-custom-stores/meta.json b/site/content/examples/07-stores/04-custom-stores/meta.json
new file mode 100644
index 000000000000..7394c55f2832
--- /dev/null
+++ b/site/content/examples/07-stores/04-custom-stores/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Custom stores"
+}
\ No newline at end of file
diff --git a/site/content/examples/07-stores/04-custom-stores/stores.js b/site/content/examples/07-stores/04-custom-stores/stores.js
new file mode 100644
index 000000000000..5a26025b0312
--- /dev/null
+++ b/site/content/examples/07-stores/04-custom-stores/stores.js
@@ -0,0 +1,14 @@
+import { writable } from 'svelte/store';
+
+function createCount() {
+ const { subscribe, set, update } = writable(0);
+
+ return {
+ subscribe,
+ increment: () => update(n => n + 1),
+ decrement: () => update(n => n - 1),
+ reset: () => set(0)
+ };
+}
+
+export const count = createCount();
\ No newline at end of file
diff --git a/site/content/examples/07-stores/meta.json b/site/content/examples/07-stores/meta.json
new file mode 100644
index 000000000000..ad974de0d918
--- /dev/null
+++ b/site/content/examples/07-stores/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Stores"
+}
\ No newline at end of file
diff --git a/site/content/examples/08-motion/00-tweened/App.svelte b/site/content/examples/08-motion/00-tweened/App.svelte
new file mode 100644
index 000000000000..83f3b50a0474
--- /dev/null
+++ b/site/content/examples/08-motion/00-tweened/App.svelte
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/08-motion/00-tweened/meta.json b/site/content/examples/08-motion/00-tweened/meta.json
new file mode 100644
index 000000000000..39d3af7f38d9
--- /dev/null
+++ b/site/content/examples/08-motion/00-tweened/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Tweened"
+}
\ No newline at end of file
diff --git a/site/content/examples/motion-spring/App.svelte b/site/content/examples/08-motion/01-spring/App.svelte
similarity index 53%
rename from site/content/examples/motion-spring/App.svelte
rename to site/content/examples/08-motion/01-spring/App.svelte
index ae90d7cc8dd6..2cb0fd1eb78f 100644
--- a/site/content/examples/motion-spring/App.svelte
+++ b/site/content/examples/08-motion/01-spring/App.svelte
@@ -1,43 +1,20 @@
-
-
-
+
-
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/site/content/examples/08-motion/01-spring/meta.json b/site/content/examples/08-motion/01-spring/meta.json
new file mode 100644
index 000000000000..f871fea53e34
--- /dev/null
+++ b/site/content/examples/08-motion/01-spring/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Spring"
+}
\ No newline at end of file
diff --git a/site/content/examples/08-motion/meta.json b/site/content/examples/08-motion/meta.json
new file mode 100644
index 000000000000..e6fa83cd7f5e
--- /dev/null
+++ b/site/content/examples/08-motion/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Motion"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/00-transition/App.svelte b/site/content/examples/09-transitions/00-transition/App.svelte
new file mode 100644
index 000000000000..b7909fb86e8e
--- /dev/null
+++ b/site/content/examples/09-transitions/00-transition/App.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+{#if visible}
+
+ Fades in and out
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/00-transition/meta.json b/site/content/examples/09-transitions/00-transition/meta.json
new file mode 100644
index 000000000000..e07975554f59
--- /dev/null
+++ b/site/content/examples/09-transitions/00-transition/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "The transition directive"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/01-adding-parameters-to-transitions/App.svelte b/site/content/examples/09-transitions/01-adding-parameters-to-transitions/App.svelte
new file mode 100644
index 000000000000..01047f5e37ca
--- /dev/null
+++ b/site/content/examples/09-transitions/01-adding-parameters-to-transitions/App.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+{#if visible}
+
+ Flies in and out
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/01-adding-parameters-to-transitions/meta.json b/site/content/examples/09-transitions/01-adding-parameters-to-transitions/meta.json
new file mode 100644
index 000000000000..517bc54c3cac
--- /dev/null
+++ b/site/content/examples/09-transitions/01-adding-parameters-to-transitions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Adding parameters"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/02-in-and-out/App.svelte b/site/content/examples/09-transitions/02-in-and-out/App.svelte
new file mode 100644
index 000000000000..36d36664e6fc
--- /dev/null
+++ b/site/content/examples/09-transitions/02-in-and-out/App.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+{#if visible}
+
+ Flies in, fades out
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/02-in-and-out/meta.json b/site/content/examples/09-transitions/02-in-and-out/meta.json
new file mode 100644
index 000000000000..627f409fa478
--- /dev/null
+++ b/site/content/examples/09-transitions/02-in-and-out/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "In and out"
+}
\ No newline at end of file
diff --git a/site/content/examples/transitions-custom/App.svelte b/site/content/examples/09-transitions/03-custom-css-transitions/App.svelte
similarity index 62%
rename from site/content/examples/transitions-custom/App.svelte
rename to site/content/examples/09-transitions/03-custom-css-transitions/App.svelte
index bee159e4c576..6e8dfcaf081e 100644
--- a/site/content/examples/transitions-custom/App.svelte
+++ b/site/content/examples/09-transitions/03-custom-css-transitions/App.svelte
@@ -1,14 +1,14 @@
- visible
-
-{#if visible}
-
- wheeee!!!!!
-
-{/if}
-
+
+
+
+{#if visible}
+
+ transitions!
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/03-custom-css-transitions/meta.json b/site/content/examples/09-transitions/03-custom-css-transitions/meta.json
new file mode 100644
index 000000000000..8b70464ca8a5
--- /dev/null
+++ b/site/content/examples/09-transitions/03-custom-css-transitions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Custom CSS transitions"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte b/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte
new file mode 100644
index 000000000000..3b3fb94d1c89
--- /dev/null
+++ b/site/content/examples/09-transitions/04-custom-js-transitions/App.svelte
@@ -0,0 +1,36 @@
+
+
+
+
+{#if visible}
+
+ The quick brown fox jumps over the lazy dog
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/04-custom-js-transitions/meta.json b/site/content/examples/09-transitions/04-custom-js-transitions/meta.json
new file mode 100644
index 000000000000..1ec11d90f974
--- /dev/null
+++ b/site/content/examples/09-transitions/04-custom-js-transitions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Custom JS transitions"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/05-transition-events/App.svelte b/site/content/examples/09-transitions/05-transition-events/App.svelte
new file mode 100644
index 000000000000..da79897365eb
--- /dev/null
+++ b/site/content/examples/09-transitions/05-transition-events/App.svelte
@@ -0,0 +1,25 @@
+
+
+
status: {status}
+
+
+
+{#if visible}
+
+ Flies in and out
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/05-transition-events/meta.json b/site/content/examples/09-transitions/05-transition-events/meta.json
new file mode 100644
index 000000000000..b46e28feed27
--- /dev/null
+++ b/site/content/examples/09-transitions/05-transition-events/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Transition events"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/06-deferred-transitions/App.svelte b/site/content/examples/09-transitions/06-deferred-transitions/App.svelte
new file mode 100644
index 000000000000..c46096c20467
--- /dev/null
+++ b/site/content/examples/09-transitions/06-deferred-transitions/App.svelte
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
todo
+ {#each todos.filter(t => !t.done) as todo (todo.id)}
+
+ {/each}
+
+
+
+
done
+ {#each todos.filter(t => t.done) as todo (todo.id)}
+
+ {/each}
+
+
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/06-deferred-transitions/crossfade.js b/site/content/examples/09-transitions/06-deferred-transitions/crossfade.js
new file mode 100644
index 000000000000..e11e18b60eb8
--- /dev/null
+++ b/site/content/examples/09-transitions/06-deferred-transitions/crossfade.js
@@ -0,0 +1,65 @@
+import { quintOut } from 'svelte/easing';
+
+export default function crossfade({ send, receive, fallback }) {
+ let requested = new Map();
+ let provided = new Map();
+
+ function crossfade(from, node) {
+ const to = node.getBoundingClientRect();
+ const dx = from.left - to.left;
+ const dy = from.top - to.top;
+
+ const style = getComputedStyle(node);
+ const transform = style.transform === 'none' ? '' : style.transform;
+
+ return {
+ duration: 400,
+ easing: quintOut,
+ css: (t, u) => `
+ opacity: ${t};
+ transform: ${transform} translate(${u * dx}px,${u * dy}px);
+ `
+ };
+ }
+
+ return {
+ send(node, params) {
+ provided.set(params.key, {
+ rect: node.getBoundingClientRect()
+ });
+
+ return () => {
+ if (requested.has(params.key)) {
+ const { rect } = requested.get(params.key);
+ requested.delete(params.key);
+
+ return crossfade(rect, node);
+ }
+
+ // if the node is disappearing altogether
+ // (i.e. wasn't claimed by the other list)
+ // then we need to supply an outro
+ provided.delete(params.key);
+ return fallback(node, params);
+ };
+ },
+
+ receive(node, params) {
+ requested.set(params.key, {
+ rect: node.getBoundingClientRect()
+ });
+
+ return () => {
+ if (provided.has(params.key)) {
+ const { rect } = provided.get(params.key);
+ provided.delete(params.key);
+
+ return crossfade(rect, node);
+ }
+
+ requested.delete(params.key);
+ return fallback(node, params);
+ };
+ }
+ };
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/06-deferred-transitions/meta.json b/site/content/examples/09-transitions/06-deferred-transitions/meta.json
new file mode 100644
index 000000000000..b9fc7da8984d
--- /dev/null
+++ b/site/content/examples/09-transitions/06-deferred-transitions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Deferred transitions"
+}
\ No newline at end of file
diff --git a/site/content/examples/09-transitions/meta.json b/site/content/examples/09-transitions/meta.json
new file mode 100644
index 000000000000..cb9291d73f28
--- /dev/null
+++ b/site/content/examples/09-transitions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Transitions"
+}
\ No newline at end of file
diff --git a/site/content/examples/10-animations/00-animate/App.svelte b/site/content/examples/10-animations/00-animate/App.svelte
new file mode 100644
index 000000000000..c46096c20467
--- /dev/null
+++ b/site/content/examples/10-animations/00-animate/App.svelte
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
todo
+ {#each todos.filter(t => !t.done) as todo (todo.id)}
+
+ {/each}
+
+
+
+
done
+ {#each todos.filter(t => t.done) as todo (todo.id)}
+
+ {/each}
+
+
\ No newline at end of file
diff --git a/site/content/examples/10-animations/00-animate/crossfade.js b/site/content/examples/10-animations/00-animate/crossfade.js
new file mode 100644
index 000000000000..e11e18b60eb8
--- /dev/null
+++ b/site/content/examples/10-animations/00-animate/crossfade.js
@@ -0,0 +1,65 @@
+import { quintOut } from 'svelte/easing';
+
+export default function crossfade({ send, receive, fallback }) {
+ let requested = new Map();
+ let provided = new Map();
+
+ function crossfade(from, node) {
+ const to = node.getBoundingClientRect();
+ const dx = from.left - to.left;
+ const dy = from.top - to.top;
+
+ const style = getComputedStyle(node);
+ const transform = style.transform === 'none' ? '' : style.transform;
+
+ return {
+ duration: 400,
+ easing: quintOut,
+ css: (t, u) => `
+ opacity: ${t};
+ transform: ${transform} translate(${u * dx}px,${u * dy}px);
+ `
+ };
+ }
+
+ return {
+ send(node, params) {
+ provided.set(params.key, {
+ rect: node.getBoundingClientRect()
+ });
+
+ return () => {
+ if (requested.has(params.key)) {
+ const { rect } = requested.get(params.key);
+ requested.delete(params.key);
+
+ return crossfade(rect, node);
+ }
+
+ // if the node is disappearing altogether
+ // (i.e. wasn't claimed by the other list)
+ // then we need to supply an outro
+ provided.delete(params.key);
+ return fallback(node, params);
+ };
+ },
+
+ receive(node, params) {
+ requested.set(params.key, {
+ rect: node.getBoundingClientRect()
+ });
+
+ return () => {
+ if (provided.has(params.key)) {
+ const { rect } = provided.get(params.key);
+ provided.delete(params.key);
+
+ return crossfade(rect, node);
+ }
+
+ requested.delete(params.key);
+ return fallback(node, params);
+ };
+ }
+ };
+}
\ No newline at end of file
diff --git a/site/content/examples/10-animations/00-animate/meta.json b/site/content/examples/10-animations/00-animate/meta.json
new file mode 100644
index 000000000000..dd7e34544306
--- /dev/null
+++ b/site/content/examples/10-animations/00-animate/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "The animate directive"
+}
\ No newline at end of file
diff --git a/site/content/examples/10-animations/meta.json b/site/content/examples/10-animations/meta.json
new file mode 100644
index 000000000000..c71301495eef
--- /dev/null
+++ b/site/content/examples/10-animations/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Animations"
+}
\ No newline at end of file
diff --git a/site/content/examples/svg-clock/App.svelte b/site/content/examples/11-svg/01-clock/App.svelte
similarity index 98%
rename from site/content/examples/svg-clock/App.svelte
rename to site/content/examples/11-svg/01-clock/App.svelte
index b83da1c203e6..49d3a7f8093b 100644
--- a/site/content/examples/svg-clock/App.svelte
+++ b/site/content/examples/11-svg/01-clock/App.svelte
@@ -20,6 +20,44 @@
});
+
+
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/site/content/examples/11-svg/01-clock/meta.json b/site/content/examples/11-svg/01-clock/meta.json
new file mode 100644
index 000000000000..ec7137feb682
--- /dev/null
+++ b/site/content/examples/11-svg/01-clock/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Clock"
+}
\ No newline at end of file
diff --git a/site/content/examples/bar-chart/App.svelte b/site/content/examples/11-svg/02-bar-chart/App.svelte
similarity index 89%
rename from site/content/examples/bar-chart/App.svelte
rename to site/content/examples/11-svg/02-bar-chart/App.svelte
index a4b01f97ddb8..e0f27586c3dc 100644
--- a/site/content/examples/bar-chart/App.svelte
+++ b/site/content/examples/11-svg/02-bar-chart/App.svelte
@@ -1,7 +1,14 @@
-
-
Anscombe's quartet
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
Anscombe's quartet
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/scatterplot/Scatterplot.svelte b/site/content/examples/11-svg/04-scatterplot/Scatterplot.svelte
similarity index 100%
rename from site/content/examples/scatterplot/Scatterplot.svelte
rename to site/content/examples/11-svg/04-scatterplot/Scatterplot.svelte
diff --git a/site/content/examples/11-svg/04-scatterplot/data.js b/site/content/examples/11-svg/04-scatterplot/data.js
new file mode 100644
index 000000000000..0faeb976d90e
--- /dev/null
+++ b/site/content/examples/11-svg/04-scatterplot/data.js
@@ -0,0 +1,54 @@
+export default {
+ a: [
+ { x: 10, y: 8.04 },
+ { x: 8, y: 6.95 },
+ { x: 13, y: 7.58 },
+ { x: 9, y: 8.81 },
+ { x: 11, y: 8.33 },
+ { x: 14, y: 9.96 },
+ { x: 6, y: 7.24 },
+ { x: 4, y: 4.26 },
+ { x: 12, y: 10.84 },
+ { x: 7, y: 4.82 },
+ { x: 5, y: 5.68 }
+ ],
+ b: [
+ { x: 10, y: 9.14 },
+ { x: 8, y: 8.14 },
+ { x: 13, y: 8.74 },
+ { x: 9, y: 8.77 },
+ { x: 11, y: 9.26 },
+ { x: 14, y: 8.1 },
+ { x: 6, y: 6.13 },
+ { x: 4, y: 3.1 },
+ { x: 12, y: 9.13 },
+ { x: 7, y: 7.26 },
+ { x: 5, y: 4.74 }
+ ],
+ c: [
+ { x: 10, y: 7.46 },
+ { x: 8, y: 6.77 },
+ { x: 13, y: 12.74 },
+ { x: 9, y: 7.11 },
+ { x: 11, y: 7.81 },
+ { x: 14, y: 8.84 },
+ { x: 6, y: 6.08 },
+ { x: 4, y: 5.39 },
+ { x: 12, y: 8.15 },
+ { x: 7, y: 6.42 },
+ { x: 5, y: 5.73 }
+ ],
+ d: [
+ { x: 8, y: 6.58 },
+ { x: 8, y: 5.76 },
+ { x: 8, y: 7.71 },
+ { x: 8, y: 8.84 },
+ { x: 8, y: 8.47 },
+ { x: 8, y: 7.04 },
+ { x: 8, y: 5.25 },
+ { x: 19, y: 12.5 },
+ { x: 8, y: 5.56 },
+ { x: 8, y: 7.91 },
+ { x: 8, y: 6.89 }
+ ]
+};
\ No newline at end of file
diff --git a/site/content/examples/11-svg/04-scatterplot/meta.json b/site/content/examples/11-svg/04-scatterplot/meta.json
new file mode 100644
index 000000000000..52a4c119bcec
--- /dev/null
+++ b/site/content/examples/11-svg/04-scatterplot/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Scatterplot"
+}
\ No newline at end of file
diff --git a/site/content/examples/homepage-demo-transitions/App.svelte b/site/content/examples/11-svg/05-svg-transitions/App.svelte
similarity index 100%
rename from site/content/examples/homepage-demo-transitions/App.svelte
rename to site/content/examples/11-svg/05-svg-transitions/App.svelte
diff --git a/site/content/examples/homepage-demo-transitions/custom-transitions.js b/site/content/examples/11-svg/05-svg-transitions/custom-transitions.js
similarity index 100%
rename from site/content/examples/homepage-demo-transitions/custom-transitions.js
rename to site/content/examples/11-svg/05-svg-transitions/custom-transitions.js
diff --git a/site/content/examples/11-svg/05-svg-transitions/meta.json b/site/content/examples/11-svg/05-svg-transitions/meta.json
new file mode 100644
index 000000000000..aa14d1a3d475
--- /dev/null
+++ b/site/content/examples/11-svg/05-svg-transitions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "SVG transitions"
+}
\ No newline at end of file
diff --git a/site/content/examples/homepage-demo-transitions/shape.js b/site/content/examples/11-svg/05-svg-transitions/shape.js
similarity index 86%
rename from site/content/examples/homepage-demo-transitions/shape.js
rename to site/content/examples/11-svg/05-svg-transitions/shape.js
index 032a58bf24f4..9ed2128ebe8a 100644
--- a/site/content/examples/homepage-demo-transitions/shape.js
+++ b/site/content/examples/11-svg/05-svg-transitions/shape.js
@@ -1,5 +1,2 @@
export const inner = `M45.41,108.86A21.81,21.81,0,0,1,22,100.18,20.2,20.2,0,0,1,18.53,84.9a19,19,0,0,1,.65-2.57l.52-1.58,1.41,1a35.32,35.32,0,0,0,10.75,5.37l1,.31-.1,1a6.2,6.2,0,0,0,1.11,4.08A6.57,6.57,0,0,0,41,95.19a6,6,0,0,0,1.68-.74L70.11,76.94a5.76,5.76,0,0,0,2.59-3.83,6.09,6.09,0,0,0-1-4.6,6.58,6.58,0,0,0-7.06-2.62,6.21,6.21,0,0,0-1.69.74L52.43,73.31a19.88,19.88,0,0,1-5.58,2.45,21.82,21.82,0,0,1-23.43-8.68A20.2,20.2,0,0,1,20,51.8a19,19,0,0,1,8.56-12.7L56,21.59a19.88,19.88,0,0,1,5.58-2.45A21.81,21.81,0,0,1,85,27.82,20.2,20.2,0,0,1,88.47,43.1a19,19,0,0,1-.65,2.57l-.52,1.58-1.41-1a35.32,35.32,0,0,0-10.75-5.37l-1-.31.1-1a6.2,6.2,0,0,0-1.11-4.08,6.57,6.57,0,0,0-7.06-2.62,6,6,0,0,0-1.68.74L36.89,51.06a5.71,5.71,0,0,0-2.58,3.83,6,6,0,0,0,1,4.6,6.58,6.58,0,0,0,7.06,2.62,6.21,6.21,0,0,0,1.69-.74l10.48-6.68a19.88,19.88,0,0,1,5.58-2.45,21.82,21.82,0,0,1,23.43,8.68A20.2,20.2,0,0,1,87,76.2a19,19,0,0,1-8.56,12.7L51,106.41a19.88,19.88,0,0,1-5.58,2.45`;
-
-export const outer = `
- M65,34 L37,52 A1 1 0 0 0 44 60 L70.5,44.5 A1 1 0 0 0 65,34Z
- M64,67 L36,85 A1 1 0 0 0 42 94 L68,77.5 A1 1 0 0 0 64,67Z`;
\ No newline at end of file
+export const outer = `M65,34 L37,52 A1 1 0 0 0 44 60 L70.5,44.5 A1 1 0 0 0 65,34Z M64,67 L36,85 A1 1 0 0 0 42 94 L68,77.5 A1 1 0 0 0 64,67Z`;
\ No newline at end of file
diff --git a/site/content/examples/11-svg/meta.json b/site/content/examples/11-svg/meta.json
new file mode 100644
index 000000000000..a26780dfc815
--- /dev/null
+++ b/site/content/examples/11-svg/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "SVG"
+}
\ No newline at end of file
diff --git a/site/content/examples/12-actions/00-actions/App.svelte b/site/content/examples/12-actions/00-actions/App.svelte
new file mode 100644
index 000000000000..1324277bac6a
--- /dev/null
+++ b/site/content/examples/12-actions/00-actions/App.svelte
@@ -0,0 +1,49 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/12-actions/00-actions/meta.json b/site/content/examples/12-actions/00-actions/meta.json
new file mode 100644
index 000000000000..463fc963af69
--- /dev/null
+++ b/site/content/examples/12-actions/00-actions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "The use directive"
+}
\ No newline at end of file
diff --git a/site/content/examples/12-actions/00-actions/pannable.js b/site/content/examples/12-actions/00-actions/pannable.js
new file mode 100644
index 000000000000..f7d15328be51
--- /dev/null
+++ b/site/content/examples/12-actions/00-actions/pannable.js
@@ -0,0 +1,47 @@
+export function pannable(node) {
+ let x;
+ let y;
+
+ function handleMousedown(event) {
+ x = event.clientX;
+ y = event.clientY;
+
+ node.dispatchEvent(new CustomEvent('panstart', {
+ detail: { x, y }
+ }));
+
+ window.addEventListener('mousemove', handleMousemove);
+ window.addEventListener('mouseup', handleMouseup);
+ }
+
+ function handleMousemove(event) {
+ const dx = event.clientX - x;
+ const dy = event.clientY - y;
+ x = event.clientX;
+ y = event.clientY;
+
+ node.dispatchEvent(new CustomEvent('panmove', {
+ detail: { x, y, dx, dy }
+ }));
+ }
+
+ function handleMouseup(event) {
+ x = event.clientX;
+ y = event.clientY;
+
+ node.dispatchEvent(new CustomEvent('panend', {
+ detail: { x, y }
+ }));
+
+ window.removeEventListener('mousemove', handleMousemove);
+ window.removeEventListener('mouseup', handleMouseup);
+ }
+
+ node.addEventListener('mousedown', handleMousedown);
+
+ return {
+ destroy() {
+ node.removeEventListener('mousedown', handleMousedown);
+ }
+ };
+}
\ No newline at end of file
diff --git a/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte b/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte
new file mode 100644
index 000000000000..0bd9d56113fc
--- /dev/null
+++ b/site/content/examples/12-actions/01-adding-parameters-to-actions/App.svelte
@@ -0,0 +1,70 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json b/site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json
new file mode 100644
index 000000000000..517bc54c3cac
--- /dev/null
+++ b/site/content/examples/12-actions/01-adding-parameters-to-actions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Adding parameters"
+}
\ No newline at end of file
diff --git a/site/content/examples/12-actions/meta.json b/site/content/examples/12-actions/meta.json
new file mode 100644
index 000000000000..a15461028365
--- /dev/null
+++ b/site/content/examples/12-actions/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Actions"
+}
\ No newline at end of file
diff --git a/site/content/examples/13-classes/00-classes/App.svelte b/site/content/examples/13-classes/00-classes/App.svelte
new file mode 100644
index 000000000000..4da386991d5d
--- /dev/null
+++ b/site/content/examples/13-classes/00-classes/App.svelte
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/13-classes/00-classes/meta.json b/site/content/examples/13-classes/00-classes/meta.json
new file mode 100644
index 000000000000..7641cc6a5a87
--- /dev/null
+++ b/site/content/examples/13-classes/00-classes/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "The class directive"
+}
\ No newline at end of file
diff --git a/site/content/examples/13-classes/01-class-shorthand/App.svelte b/site/content/examples/13-classes/01-class-shorthand/App.svelte
new file mode 100644
index 000000000000..0f4e0d9f2438
--- /dev/null
+++ b/site/content/examples/13-classes/01-class-shorthand/App.svelte
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+ some {big ? 'big' : 'small'} text
+
\ No newline at end of file
diff --git a/site/content/examples/13-classes/01-class-shorthand/meta.json b/site/content/examples/13-classes/01-class-shorthand/meta.json
new file mode 100644
index 000000000000..72c51bd387ce
--- /dev/null
+++ b/site/content/examples/13-classes/01-class-shorthand/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Shorthand class directive"
+}
\ No newline at end of file
diff --git a/site/content/examples/13-classes/meta.json b/site/content/examples/13-classes/meta.json
new file mode 100644
index 000000000000..9c2b8a41f67b
--- /dev/null
+++ b/site/content/examples/13-classes/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Classes"
+}
\ No newline at end of file
diff --git a/site/content/examples/14-composition/00-slots/App.svelte b/site/content/examples/14-composition/00-slots/App.svelte
new file mode 100644
index 000000000000..cd0ebde93546
--- /dev/null
+++ b/site/content/examples/14-composition/00-slots/App.svelte
@@ -0,0 +1,8 @@
+
+
+
+
Hello!
+
This is a box. It can contain anything.
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/00-slots/Box.svelte b/site/content/examples/14-composition/00-slots/Box.svelte
new file mode 100644
index 000000000000..7ed13f386fe9
--- /dev/null
+++ b/site/content/examples/14-composition/00-slots/Box.svelte
@@ -0,0 +1,14 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/00-slots/meta.json b/site/content/examples/14-composition/00-slots/meta.json
new file mode 100644
index 000000000000..bd30c8935ac3
--- /dev/null
+++ b/site/content/examples/14-composition/00-slots/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Slots"
+}
\ No newline at end of file
diff --git a/site/content/examples/14-composition/01-slot-fallbacks/App.svelte b/site/content/examples/14-composition/01-slot-fallbacks/App.svelte
new file mode 100644
index 000000000000..e30be6d1fc2e
--- /dev/null
+++ b/site/content/examples/14-composition/01-slot-fallbacks/App.svelte
@@ -0,0 +1,10 @@
+
+
+
+
Hello!
+
This is a box. It can contain anything.
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/01-slot-fallbacks/Box.svelte b/site/content/examples/14-composition/01-slot-fallbacks/Box.svelte
new file mode 100644
index 000000000000..66c580632cc2
--- /dev/null
+++ b/site/content/examples/14-composition/01-slot-fallbacks/Box.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+ no content was provided
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/01-slot-fallbacks/meta.json b/site/content/examples/14-composition/01-slot-fallbacks/meta.json
new file mode 100644
index 000000000000..26e7fcfb9253
--- /dev/null
+++ b/site/content/examples/14-composition/01-slot-fallbacks/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Slot fallbacks"
+}
\ No newline at end of file
diff --git a/site/content/examples/14-composition/02-named-slots/App.svelte b/site/content/examples/14-composition/02-named-slots/App.svelte
new file mode 100644
index 000000000000..80478093590a
--- /dev/null
+++ b/site/content/examples/14-composition/02-named-slots/App.svelte
@@ -0,0 +1,14 @@
+
+
+
+
+ P. Sherman
+
+
+
+ 42 Wallaby Way
+ Sydney
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/02-named-slots/ContactCard.svelte b/site/content/examples/14-composition/02-named-slots/ContactCard.svelte
new file mode 100644
index 000000000000..1acf2909430f
--- /dev/null
+++ b/site/content/examples/14-composition/02-named-slots/ContactCard.svelte
@@ -0,0 +1,47 @@
+
+
+
+
+
+ Unknown name
+
+
+
+
+
+ Unknown address
+
+
+
+
+
+ Unknown email
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/02-named-slots/meta.json b/site/content/examples/14-composition/02-named-slots/meta.json
new file mode 100644
index 000000000000..60b82e991c11
--- /dev/null
+++ b/site/content/examples/14-composition/02-named-slots/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Named slots"
+}
\ No newline at end of file
diff --git a/site/content/examples/14-composition/03-slot-props/App.svelte b/site/content/examples/14-composition/03-slot-props/App.svelte
new file mode 100644
index 000000000000..36772a507749
--- /dev/null
+++ b/site/content/examples/14-composition/03-slot-props/App.svelte
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+ {#if active}
+
I am being hovered upon.
+ {:else}
+
Hover over me!
+ {/if}
+
+
+
+
+
+ {#if active}
+
I am being hovered upon.
+ {:else}
+
Hover over me!
+ {/if}
+
+
+
+
+
+ {#if active}
+
I am being hovered upon.
+ {:else}
+
Hover over me!
+ {/if}
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/03-slot-props/Hoverable.svelte b/site/content/examples/14-composition/03-slot-props/Hoverable.svelte
new file mode 100644
index 000000000000..69f2fc8ef6d9
--- /dev/null
+++ b/site/content/examples/14-composition/03-slot-props/Hoverable.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/14-composition/03-slot-props/meta.json b/site/content/examples/14-composition/03-slot-props/meta.json
new file mode 100644
index 000000000000..74e2ff197c45
--- /dev/null
+++ b/site/content/examples/14-composition/03-slot-props/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Slot props"
+}
\ No newline at end of file
diff --git a/site/content/examples/modal-with-slot/App.svelte b/site/content/examples/14-composition/04-modal/App.svelte
similarity index 97%
rename from site/content/examples/modal-with-slot/App.svelte
rename to site/content/examples/14-composition/04-modal/App.svelte
index 665a89554e8e..ac9d441f52b9 100644
--- a/site/content/examples/modal-with-slot/App.svelte
+++ b/site/content/examples/14-composition/04-modal/App.svelte
@@ -1,7 +1,7 @@
{#if showModal}
diff --git a/site/content/examples/modal-with-slot/Modal.svelte b/site/content/examples/14-composition/04-modal/Modal.svelte
similarity index 100%
rename from site/content/examples/modal-with-slot/Modal.svelte
rename to site/content/examples/14-composition/04-modal/Modal.svelte
index 87f1b022990c..5ffa5989a41d 100644
--- a/site/content/examples/modal-with-slot/Modal.svelte
+++ b/site/content/examples/14-composition/04-modal/Modal.svelte
@@ -4,17 +4,6 @@
const dispatch = createEventDispatcher();
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/site/content/examples/14-composition/04-modal/meta.json b/site/content/examples/14-composition/04-modal/meta.json
new file mode 100644
index 000000000000..c39791fcf601
--- /dev/null
+++ b/site/content/examples/14-composition/04-modal/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Modal"
+}
\ No newline at end of file
diff --git a/site/content/examples/14-composition/meta.json b/site/content/examples/14-composition/meta.json
new file mode 100644
index 000000000000..54cf2db82dfa
--- /dev/null
+++ b/site/content/examples/14-composition/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Component composition"
+}
\ No newline at end of file
diff --git a/site/content/examples/15-context/00-context-api/App.svelte b/site/content/examples/15-context/00-context-api/App.svelte
new file mode 100644
index 000000000000..ea1ba4c7ae7c
--- /dev/null
+++ b/site/content/examples/15-context/00-context-api/App.svelte
@@ -0,0 +1,13 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/15-context/00-context-api/Map.svelte b/site/content/examples/15-context/00-context-api/Map.svelte
new file mode 100644
index 000000000000..0282cbc31166
--- /dev/null
+++ b/site/content/examples/15-context/00-context-api/Map.svelte
@@ -0,0 +1,50 @@
+
+
+
+
+
+ {#if map}
+
+ {/if}
+
\ No newline at end of file
diff --git a/site/content/examples/15-context/00-context-api/MapMarker.svelte b/site/content/examples/15-context/00-context-api/MapMarker.svelte
new file mode 100644
index 000000000000..c9366525077f
--- /dev/null
+++ b/site/content/examples/15-context/00-context-api/MapMarker.svelte
@@ -0,0 +1,19 @@
+
\ No newline at end of file
diff --git a/site/content/examples/15-context/00-context-api/mapbox.js b/site/content/examples/15-context/00-context-api/mapbox.js
new file mode 100644
index 000000000000..55b4200038a4
--- /dev/null
+++ b/site/content/examples/15-context/00-context-api/mapbox.js
@@ -0,0 +1,8 @@
+import mapbox from 'mapbox-gl';
+
+// https://docs.mapbox.com/help/glossary/access-token/
+mapbox.accessToken = MAPBOX_ACCESS_TOKEN;
+
+const key = {};
+
+export { mapbox, key };
\ No newline at end of file
diff --git a/site/content/examples/15-context/00-context-api/meta.json b/site/content/examples/15-context/00-context-api/meta.json
new file mode 100644
index 000000000000..2601c87cae0e
--- /dev/null
+++ b/site/content/examples/15-context/00-context-api/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "setContext and getContext"
+}
\ No newline at end of file
diff --git a/site/content/examples/15-context/meta.json b/site/content/examples/15-context/meta.json
new file mode 100644
index 000000000000..d3bd862676a2
--- /dev/null
+++ b/site/content/examples/15-context/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Context API"
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/00-svelte-self/App.svelte b/site/content/examples/16-special-elements/00-svelte-self/App.svelte
new file mode 100644
index 000000000000..ff02fa6a42f9
--- /dev/null
+++ b/site/content/examples/16-special-elements/00-svelte-self/App.svelte
@@ -0,0 +1,41 @@
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/00-svelte-self/File.svelte b/site/content/examples/16-special-elements/00-svelte-self/File.svelte
new file mode 100644
index 000000000000..e34686101a82
--- /dev/null
+++ b/site/content/examples/16-special-elements/00-svelte-self/File.svelte
@@ -0,0 +1,14 @@
+
+
+
+
+{name}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/00-svelte-self/Folder.svelte b/site/content/examples/16-special-elements/00-svelte-self/Folder.svelte
new file mode 100644
index 000000000000..c25bb2a93dfe
--- /dev/null
+++ b/site/content/examples/16-special-elements/00-svelte-self/Folder.svelte
@@ -0,0 +1,52 @@
+
+
+
+
+{name}
+
+{#if expanded}
+
+{/if}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/00-svelte-self/meta.json b/site/content/examples/16-special-elements/00-svelte-self/meta.json
new file mode 100644
index 000000000000..14485d7cee00
--- /dev/null
+++ b/site/content/examples/16-special-elements/00-svelte-self/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": ""
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/01-svelte-component/App.svelte b/site/content/examples/16-special-elements/01-svelte-component/App.svelte
new file mode 100644
index 000000000000..a510fa8ad8b5
--- /dev/null
+++ b/site/content/examples/16-special-elements/01-svelte-component/App.svelte
@@ -0,0 +1,21 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte b/site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte
new file mode 100644
index 000000000000..f9130d9d653f
--- /dev/null
+++ b/site/content/examples/16-special-elements/01-svelte-component/BlueThing.svelte
@@ -0,0 +1,5 @@
+
+
+blue thing
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte b/site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte
new file mode 100644
index 000000000000..9cbee235d368
--- /dev/null
+++ b/site/content/examples/16-special-elements/01-svelte-component/GreenThing.svelte
@@ -0,0 +1,5 @@
+
+
+green thing
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte b/site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte
new file mode 100644
index 000000000000..42f5e4c6724d
--- /dev/null
+++ b/site/content/examples/16-special-elements/01-svelte-component/RedThing.svelte
@@ -0,0 +1,5 @@
+
+
+red thing
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/01-svelte-component/meta.json b/site/content/examples/16-special-elements/01-svelte-component/meta.json
new file mode 100644
index 000000000000..bb3675d5e5f3
--- /dev/null
+++ b/site/content/examples/16-special-elements/01-svelte-component/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": ""
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/02-svelte-window/App.svelte b/site/content/examples/16-special-elements/02-svelte-window/App.svelte
new file mode 100644
index 000000000000..845d666dffe0
--- /dev/null
+++ b/site/content/examples/16-special-elements/02-svelte-window/App.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+ {#if key}
+ {key === ' ' ? 'Space' : key}
+
{keyCode}
+ {:else}
+
Focus this window and press any key
+ {/if}
+
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/02-svelte-window/meta.json b/site/content/examples/16-special-elements/02-svelte-window/meta.json
new file mode 100644
index 000000000000..18357e9ef94c
--- /dev/null
+++ b/site/content/examples/16-special-elements/02-svelte-window/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": ""
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte b/site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte
new file mode 100644
index 000000000000..3dbfd43f218e
--- /dev/null
+++ b/site/content/examples/16-special-elements/03-svelte-window-bindings/App.svelte
@@ -0,0 +1,88 @@
+
+
+
+
+
+ {#each [0, 1, 2, 3, 4, 5, 6, 7, 8] as layer}
+
+ {/each}
+
+
+
+
+ scroll down
+
+
+
+ You have scrolled {y} pixels
+
+
+
+
diff --git a/site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json b/site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json
new file mode 100644
index 000000000000..9903a804bbf9
--- /dev/null
+++ b/site/content/examples/16-special-elements/03-svelte-window-bindings/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": " bindings"
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/04-svelte-body/App.svelte b/site/content/examples/16-special-elements/04-svelte-body/App.svelte
new file mode 100644
index 000000000000..ac946962ebe7
--- /dev/null
+++ b/site/content/examples/16-special-elements/04-svelte-body/App.svelte
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/04-svelte-body/meta.json b/site/content/examples/16-special-elements/04-svelte-body/meta.json
new file mode 100644
index 000000000000..a140d2c16854
--- /dev/null
+++ b/site/content/examples/16-special-elements/04-svelte-body/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": ""
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/05-svelte-head/App.svelte b/site/content/examples/16-special-elements/05-svelte-head/App.svelte
new file mode 100644
index 000000000000..38089c9fdd30
--- /dev/null
+++ b/site/content/examples/16-special-elements/05-svelte-head/App.svelte
@@ -0,0 +1,5 @@
+
+
+
+
+
Hello world!
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/05-svelte-head/meta.json b/site/content/examples/16-special-elements/05-svelte-head/meta.json
new file mode 100644
index 000000000000..d35a752d152d
--- /dev/null
+++ b/site/content/examples/16-special-elements/05-svelte-head/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": ""
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/06-svelte-options/App.svelte b/site/content/examples/16-special-elements/06-svelte-options/App.svelte
new file mode 100644
index 000000000000..e0051449eee1
--- /dev/null
+++ b/site/content/examples/16-special-elements/06-svelte-options/App.svelte
@@ -0,0 +1,14 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/06-svelte-options/Square.svelte b/site/content/examples/16-special-elements/06-svelte-options/Square.svelte
new file mode 100644
index 000000000000..38f26d1dbacb
--- /dev/null
+++ b/site/content/examples/16-special-elements/06-svelte-options/Square.svelte
@@ -0,0 +1,15 @@
+
+
+
+
+
diff --git a/site/content/examples/16-special-elements/06-svelte-options/meta.json b/site/content/examples/16-special-elements/06-svelte-options/meta.json
new file mode 100644
index 000000000000..242c00685069
--- /dev/null
+++ b/site/content/examples/16-special-elements/06-svelte-options/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": ""
+}
\ No newline at end of file
diff --git a/site/content/examples/16-special-elements/meta.json b/site/content/examples/16-special-elements/meta.json
new file mode 100644
index 000000000000..2718c14b5984
--- /dev/null
+++ b/site/content/examples/16-special-elements/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Special elements"
+}
\ No newline at end of file
diff --git a/site/content/examples/17-module-context/00-sharing-code/App.svelte b/site/content/examples/17-module-context/00-sharing-code/App.svelte
new file mode 100644
index 000000000000..3c0133350a4f
--- /dev/null
+++ b/site/content/examples/17-module-context/00-sharing-code/App.svelte
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/site/content/examples/17-module-context/00-sharing-code/AudioPlayer.svelte b/site/content/examples/17-module-context/00-sharing-code/AudioPlayer.svelte
new file mode 100644
index 000000000000..27dbe1993ba2
--- /dev/null
+++ b/site/content/examples/17-module-context/00-sharing-code/AudioPlayer.svelte
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
{title}
+
{composer} / performed by {performer}
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/17-module-context/00-sharing-code/meta.json b/site/content/examples/17-module-context/00-sharing-code/meta.json
new file mode 100644
index 000000000000..15c3725377e0
--- /dev/null
+++ b/site/content/examples/17-module-context/00-sharing-code/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Sharing code"
+}
\ No newline at end of file
diff --git a/site/content/examples/17-module-context/01-module-exports/App.svelte b/site/content/examples/17-module-context/01-module-exports/App.svelte
new file mode 100644
index 000000000000..cd5ab44b211f
--- /dev/null
+++ b/site/content/examples/17-module-context/01-module-exports/App.svelte
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte b/site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte
new file mode 100644
index 000000000000..4e3d191dbf69
--- /dev/null
+++ b/site/content/examples/17-module-context/01-module-exports/AudioPlayer.svelte
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
{title}
+
{composer} / performed by {performer}
+
+
+
\ No newline at end of file
diff --git a/site/content/examples/17-module-context/01-module-exports/meta.json b/site/content/examples/17-module-context/01-module-exports/meta.json
new file mode 100644
index 000000000000..82be49d1c75f
--- /dev/null
+++ b/site/content/examples/17-module-context/01-module-exports/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Exports"
+}
\ No newline at end of file
diff --git a/site/content/examples/17-module-context/meta.json b/site/content/examples/17-module-context/meta.json
new file mode 100644
index 000000000000..1a8720e2ce51
--- /dev/null
+++ b/site/content/examples/17-module-context/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Module context"
+}
\ No newline at end of file
diff --git a/site/content/examples/18-debugging/00-debug/App.svelte b/site/content/examples/18-debugging/00-debug/App.svelte
new file mode 100644
index 000000000000..1b91ac740b72
--- /dev/null
+++ b/site/content/examples/18-debugging/00-debug/App.svelte
@@ -0,0 +1,13 @@
+
+
+
+
+
+{@debug user}
+
+
Hello {user.firstname}!
\ No newline at end of file
diff --git a/site/content/examples/18-debugging/00-debug/meta.json b/site/content/examples/18-debugging/00-debug/meta.json
new file mode 100644
index 000000000000..44ad7690243c
--- /dev/null
+++ b/site/content/examples/18-debugging/00-debug/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "The @debug tag"
+}
\ No newline at end of file
diff --git a/site/content/examples/18-debugging/meta.json b/site/content/examples/18-debugging/meta.json
new file mode 100644
index 000000000000..5eeed281d38b
--- /dev/null
+++ b/site/content/examples/18-debugging/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Debugging"
+}
\ No newline at end of file
diff --git a/site/content/examples/7guis-counter/App.svelte b/site/content/examples/19-7guis/01-7guis-counter/App.svelte
similarity index 80%
rename from site/content/examples/7guis-counter/App.svelte
rename to site/content/examples/19-7guis/01-7guis-counter/App.svelte
index 385a3c97499c..11c5993901da 100644
--- a/site/content/examples/7guis-counter/App.svelte
+++ b/site/content/examples/19-7guis/01-7guis-counter/App.svelte
@@ -1,3 +1,7 @@
+
+
\ No newline at end of file
diff --git a/site/content/examples/19-7guis/01-7guis-counter/meta.json b/site/content/examples/19-7guis/01-7guis-counter/meta.json
new file mode 100644
index 000000000000..a3c3ba33c2b4
--- /dev/null
+++ b/site/content/examples/19-7guis/01-7guis-counter/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Counter"
+}
\ No newline at end of file
diff --git a/site/content/examples/7guis-temperature/App.svelte b/site/content/examples/19-7guis/02-7guis-temperature/App.svelte
similarity index 100%
rename from site/content/examples/7guis-temperature/App.svelte
rename to site/content/examples/19-7guis/02-7guis-temperature/App.svelte
diff --git a/site/content/examples/19-7guis/02-7guis-temperature/meta.json b/site/content/examples/19-7guis/02-7guis-temperature/meta.json
new file mode 100644
index 000000000000..3a578f388717
--- /dev/null
+++ b/site/content/examples/19-7guis/02-7guis-temperature/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Temperature Converter"
+}
\ No newline at end of file
diff --git a/site/content/examples/7guis-flight-booker/App.svelte b/site/content/examples/19-7guis/03-7guis-flight-booker/App.svelte
similarity index 100%
rename from site/content/examples/7guis-flight-booker/App.svelte
rename to site/content/examples/19-7guis/03-7guis-flight-booker/App.svelte
diff --git a/site/content/examples/19-7guis/03-7guis-flight-booker/meta.json b/site/content/examples/19-7guis/03-7guis-flight-booker/meta.json
new file mode 100644
index 000000000000..8f546a740cfa
--- /dev/null
+++ b/site/content/examples/19-7guis/03-7guis-flight-booker/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Flight booker"
+}
\ No newline at end of file
diff --git a/site/content/examples/7guis-timer/App.svelte b/site/content/examples/19-7guis/04-7guis-timer/App.svelte
similarity index 100%
rename from site/content/examples/7guis-timer/App.svelte
rename to site/content/examples/19-7guis/04-7guis-timer/App.svelte
diff --git a/site/content/examples/19-7guis/04-7guis-timer/meta.json b/site/content/examples/19-7guis/04-7guis-timer/meta.json
new file mode 100644
index 000000000000..516b8bc3c265
--- /dev/null
+++ b/site/content/examples/19-7guis/04-7guis-timer/meta.json
@@ -0,0 +1,3 @@
+{
+ "title": "Timer"
+}
\ No newline at end of file
diff --git a/site/content/examples/7guis-crud/App.svelte b/site/content/examples/19-7guis/05-7guis-crud/App.svelte
similarity index 91%
rename from site/content/examples/7guis-crud/App.svelte
rename to site/content/examples/19-7guis/05-7guis-crud/App.svelte
index 388a2f4ea3a7..ed53430eff40 100644
--- a/site/content/examples/7guis-crud/App.svelte
+++ b/site/content/examples/19-7guis/05-7guis-crud/App.svelte
@@ -1,7 +1,20 @@
-
-
-
-{#if promise}
- {#await promise}
-
\ No newline at end of file
diff --git a/site/content/examples/binding-input-checkbox-group/data.json5 b/site/content/examples/binding-input-checkbox-group/data.json5
deleted file mode 100644
index 2285e3abfa82..000000000000
--- a/site/content/examples/binding-input-checkbox-group/data.json5
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "selected": ["blue"]
-}
\ No newline at end of file
diff --git a/site/content/examples/binding-input-checkbox/App.svelte b/site/content/examples/binding-input-checkbox/App.svelte
deleted file mode 100644
index b8facdd53b58..000000000000
--- a/site/content/examples/binding-input-checkbox/App.svelte
+++ /dev/null
@@ -1,17 +0,0 @@
-{#each todos as todo}
-
-
-
-
-{/each}
-
-
\ No newline at end of file
diff --git a/site/content/examples/binding-input-checkbox/data.json5 b/site/content/examples/binding-input-checkbox/data.json5
deleted file mode 100644
index 4afee559a5d0..000000000000
--- a/site/content/examples/binding-input-checkbox/data.json5
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "todos": [
- {
- "description": "Buy some milk",
- "done": true
- },
- {
- "description": "Do the laundry",
- "done": true
- },
- {
- "description": "Find life's true purpose",
- "done": false
- }
- ]
-}
\ No newline at end of file
diff --git a/site/content/examples/binding-input-numeric/App.svelte b/site/content/examples/binding-input-numeric/App.svelte
deleted file mode 100644
index 566c16006c78..000000000000
--- a/site/content/examples/binding-input-numeric/App.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
{a} * {b} = {a * b}
-
-
\ No newline at end of file
diff --git a/site/content/examples/binding-input-numeric/data.json5 b/site/content/examples/binding-input-numeric/data.json5
deleted file mode 100644
index 1aa99a76cda8..000000000000
--- a/site/content/examples/binding-input-numeric/data.json5
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "a": 5,
- "b": 5
-}
\ No newline at end of file
diff --git a/site/content/examples/binding-input-radio/App.svelte b/site/content/examples/binding-input-radio/App.svelte
deleted file mode 100644
index f83813754ff1..000000000000
--- a/site/content/examples/binding-input-radio/App.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
selected {selected}
\ No newline at end of file
diff --git a/site/content/examples/binding-input-radio/data.json5 b/site/content/examples/binding-input-radio/data.json5
deleted file mode 100644
index 961184190e4d..000000000000
--- a/site/content/examples/binding-input-radio/data.json5
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "selected": "blue"
-}
\ No newline at end of file
diff --git a/site/content/examples/binding-input-text/data.json5 b/site/content/examples/binding-input-text/data.json5
deleted file mode 100644
index 393554903d00..000000000000
--- a/site/content/examples/binding-input-text/data.json5
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "name": ""
-}
\ No newline at end of file
diff --git a/site/content/examples/binding-media-elements/App.svelte b/site/content/examples/binding-media-elements/App.svelte
deleted file mode 100644
index fdfb4573d49a..000000000000
--- a/site/content/examples/binding-media-elements/App.svelte
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
THX Deep Note
-
-
- {format(t)}
- {format(d)}
-
-
-
-
THX Deep Note
-
-
- {format(t)}
- {format(d)}
-
-
-
-
diff --git a/site/content/examples/binding-media-elements/data.json5 b/site/content/examples/binding-media-elements/data.json5
deleted file mode 100644
index 9e26dfeeb6e6..000000000000
--- a/site/content/examples/binding-media-elements/data.json5
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/site/content/examples/binding-textarea/App.svelte b/site/content/examples/binding-textarea/App.svelte
deleted file mode 100644
index 4fd46f262566..000000000000
--- a/site/content/examples/binding-textarea/App.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
{@html marked(markdown)}
-
-
\ No newline at end of file
diff --git a/site/content/examples/binding-textarea/data.json5 b/site/content/examples/binding-textarea/data.json5
deleted file mode 100644
index 12268060fbd0..000000000000
--- a/site/content/examples/binding-textarea/data.json5
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "markdown": "# Markdown editor\n\nTODOs:\n\n* make a Svelte app\n* think of a third item for this list"
-}
\ No newline at end of file
diff --git a/site/content/examples/each-blocks/App.svelte b/site/content/examples/each-blocks/App.svelte
deleted file mode 100644
index b8ba07a5e92a..000000000000
--- a/site/content/examples/each-blocks/App.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
\ No newline at end of file
diff --git a/site/content/examples/self-references/data.json5 b/site/content/examples/self-references/data.json5
deleted file mode 100644
index de0cfbd19492..000000000000
--- a/site/content/examples/self-references/data.json5
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "node": {
- "name": "Fruit",
- "children": [
- {
- "name": "Red",
- "children": [
- {
- "name": "Cherry"
- },
- {
- "name": "Strawberry"
- }
- ]
- },
- {
- "name": "Green",
- "children": [
- {
- "name": "Apple"
- },
- {
- "name": "Pear"
- },
- {
- "name": "Lime"
- }
- ]
- }
- ]
- }
-}
\ No newline at end of file
diff --git a/site/content/examples/svg-clock/data.json5 b/site/content/examples/svg-clock/data.json5
deleted file mode 100644
index 9e26dfeeb6e6..000000000000
--- a/site/content/examples/svg-clock/data.json5
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/site/content/examples/transitions-custom/data.json5 b/site/content/examples/transitions-custom/data.json5
deleted file mode 100644
index 9e26dfeeb6e6..000000000000
--- a/site/content/examples/transitions-custom/data.json5
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/site/content/examples/transitions-fade/App.svelte b/site/content/examples/transitions-fade/App.svelte
deleted file mode 100644
index 528d495361de..000000000000
--- a/site/content/examples/transitions-fade/App.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- visible
-
-{#if visible}
-
fades in and out
-{/if}
diff --git a/site/content/examples/transitions-fade/data.json5 b/site/content/examples/transitions-fade/data.json5
deleted file mode 100644
index 9e26dfeeb6e6..000000000000
--- a/site/content/examples/transitions-fade/data.json5
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/site/content/examples/transitions-fly/App.svelte b/site/content/examples/transitions-fly/App.svelte
deleted file mode 100644
index 43e4a1dd2d26..000000000000
--- a/site/content/examples/transitions-fly/App.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- visible
-
-{#if visible}
-
flies 200 pixels up, slowly
-{/if}
diff --git a/site/content/examples/transitions-fly/data.json5 b/site/content/examples/transitions-fly/data.json5
deleted file mode 100644
index 9e26dfeeb6e6..000000000000
--- a/site/content/examples/transitions-fly/data.json5
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/site/content/examples/transitions-in-out/App.svelte b/site/content/examples/transitions-in-out/App.svelte
deleted file mode 100644
index 7b995bc04d3a..000000000000
--- a/site/content/examples/transitions-in-out/App.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- visible
-
-{#if visible}
-
flies up, fades out
-{/if}
diff --git a/site/content/examples/transitions-in-out/data.json5 b/site/content/examples/transitions-in-out/data.json5
deleted file mode 100644
index 9e26dfeeb6e6..000000000000
--- a/site/content/examples/transitions-in-out/data.json5
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/site/content/tutorial/06-bindings/01-text-inputs/app-a/App.svelte b/site/content/tutorial/06-bindings/01-text-inputs/app-a/App.svelte
index d3cf1a44ed15..f1c03071ed65 100644
--- a/site/content/tutorial/06-bindings/01-text-inputs/app-a/App.svelte
+++ b/site/content/tutorial/06-bindings/01-text-inputs/app-a/App.svelte
@@ -2,8 +2,6 @@
let name = 'world';
-
+
Hello {name}!
\ No newline at end of file
diff --git a/site/content/tutorial/06-bindings/01-text-inputs/app-b/App.svelte b/site/content/tutorial/06-bindings/01-text-inputs/app-b/App.svelte
index 662785bfcef8..89dd54a709ed 100644
--- a/site/content/tutorial/06-bindings/01-text-inputs/app-b/App.svelte
+++ b/site/content/tutorial/06-bindings/01-text-inputs/app-b/App.svelte
@@ -2,8 +2,6 @@
let name = 'world';
-
+