diff --git a/documentation/docs/06-runtime/01-stores.md b/documentation/docs/06-runtime/01-stores.md index 12d5576b40..7cfaa7262e 100644 --- a/documentation/docs/06-runtime/01-stores.md +++ b/documentation/docs/06-runtime/01-stores.md @@ -1,5 +1,6 @@ --- title: Stores +use_cases: "reactive state management, cross-component state, async data streams, RxJS patterns" --- diff --git a/documentation/docs/07-misc/06-v4-migration-guide.md b/documentation/docs/07-misc/06-v4-migration-guide.md index 484931f20a..c19638c0d4 100644 --- a/documentation/docs/07-misc/06-v4-migration-guide.md +++ b/documentation/docs/07-misc/06-v4-migration-guide.md @@ -1,5 +1,6 @@ --- title: Svelte 4 migration guide +use_cases: "upgrading from Svelte 3, migration, breaking changes, version updates" --- This migration guide provides an overview of how to migrate from Svelte version 3 to 4. See the linked PRs for more details about each change. Use the migration script to migrate some of these automatically: `npx svelte-migrate@latest svelte-4` diff --git a/documentation/docs/07-misc/99-faq.md b/documentation/docs/07-misc/99-faq.md index cf98cdd3c3..777df0fb6c 100644 --- a/documentation/docs/07-misc/99-faq.md +++ b/documentation/docs/07-misc/99-faq.md @@ -1,5 +1,6 @@ --- title: Frequently asked questions +use_cases: "troubleshooting, best practices, common questions, learning resources" --- ## I'm new to Svelte. Where should I start? diff --git a/documentation/docs/07-misc/index.md b/documentation/docs/07-misc/index.md index d8c5963f7f..32a117db1d 100644 --- a/documentation/docs/07-misc/index.md +++ b/documentation/docs/07-misc/index.md @@ -1,3 +1,4 @@ --- title: Misc +use_cases: "additional resources, guides, troubleshooting" --- diff --git a/documentation/docs/98-reference/20-svelte.md b/documentation/docs/98-reference/20-svelte.md index 3295ab68de..84682c7a5a 100644 --- a/documentation/docs/98-reference/20-svelte.md +++ b/documentation/docs/98-reference/20-svelte.md @@ -1,5 +1,6 @@ --- title: svelte +use_cases: "always: main API reference, core functions, component utilities" --- > MODULE: svelte diff --git a/documentation/docs/98-reference/21-svelte-action.md b/documentation/docs/98-reference/21-svelte-action.md index ef3ebfbf70..510123f6f7 100644 --- a/documentation/docs/98-reference/21-svelte-action.md +++ b/documentation/docs/98-reference/21-svelte-action.md @@ -1,5 +1,6 @@ --- title: svelte/action +use_cases: "legacy actions, DOM manipulation, typing actions" --- This module provides types for [actions](use), which have been superseded by [attachments](@attach). diff --git a/documentation/docs/98-reference/21-svelte-animate.md b/documentation/docs/98-reference/21-svelte-animate.md index e8f135d07d..9747fb9d82 100644 --- a/documentation/docs/98-reference/21-svelte-animate.md +++ b/documentation/docs/98-reference/21-svelte-animate.md @@ -1,5 +1,6 @@ --- title: svelte/animate +use_cases: "flip animations, list transitions, keyed blocks" --- > MODULE: svelte/animate diff --git a/documentation/docs/98-reference/21-svelte-attachments.md b/documentation/docs/98-reference/21-svelte-attachments.md index e446bdddc2..c9d9dcc404 100644 --- a/documentation/docs/98-reference/21-svelte-attachments.md +++ b/documentation/docs/98-reference/21-svelte-attachments.md @@ -1,5 +1,6 @@ --- title: svelte/attachments +use_cases: "DOM manipulation, third-party libraries, modern alternative to actions" --- > MODULE: svelte/attachments diff --git a/documentation/docs/98-reference/21-svelte-compiler.md b/documentation/docs/98-reference/21-svelte-compiler.md index a6cc99d3b1..2a04dbf44a 100644 --- a/documentation/docs/98-reference/21-svelte-compiler.md +++ b/documentation/docs/98-reference/21-svelte-compiler.md @@ -1,5 +1,6 @@ --- title: svelte/compiler +use_cases: "build tools, preprocessors, custom compilation, bundler plugins" --- > MODULE: svelte/compiler diff --git a/documentation/docs/98-reference/21-svelte-easing.md b/documentation/docs/98-reference/21-svelte-easing.md index 3f47963cde..27135a5d28 100644 --- a/documentation/docs/98-reference/21-svelte-easing.md +++ b/documentation/docs/98-reference/21-svelte-easing.md @@ -1,5 +1,6 @@ --- title: svelte/easing +use_cases: "animation curves, transition timing, smooth animations" --- > MODULE: svelte/easing diff --git a/documentation/docs/98-reference/21-svelte-events.md b/documentation/docs/98-reference/21-svelte-events.md index 00c7a14ee2..82d30d8b83 100644 --- a/documentation/docs/98-reference/21-svelte-events.md +++ b/documentation/docs/98-reference/21-svelte-events.md @@ -1,5 +1,6 @@ --- title: svelte/events +use_cases: "event handling, event delegation, custom events" --- > MODULE: svelte/events diff --git a/documentation/docs/98-reference/21-svelte-legacy.md b/documentation/docs/98-reference/21-svelte-legacy.md index f313baca0b..7e05093fba 100644 --- a/documentation/docs/98-reference/21-svelte-legacy.md +++ b/documentation/docs/98-reference/21-svelte-legacy.md @@ -1,5 +1,6 @@ --- title: svelte/legacy +use_cases: "migration helpers, backwards compatibility, gradual migration" --- This module provides various functions for use during the migration, since some features can't be replaced one to one with new features. All imports are marked as deprecated and should be migrated away from over time. diff --git a/documentation/docs/98-reference/21-svelte-motion.md b/documentation/docs/98-reference/21-svelte-motion.md index f1d5a6ce57..ee4098a79f 100644 --- a/documentation/docs/98-reference/21-svelte-motion.md +++ b/documentation/docs/98-reference/21-svelte-motion.md @@ -1,5 +1,6 @@ --- title: svelte/motion +use_cases: "spring animations, tweened values, physics-based animations" --- > MODULE: svelte/motion diff --git a/documentation/docs/98-reference/21-svelte-reactivity-window.md b/documentation/docs/98-reference/21-svelte-reactivity-window.md index cc544dc5ba..6d772764d8 100644 --- a/documentation/docs/98-reference/21-svelte-reactivity-window.md +++ b/documentation/docs/98-reference/21-svelte-reactivity-window.md @@ -1,5 +1,6 @@ --- title: svelte/reactivity/window +use_cases: "window properties, reactive viewport dimensions, scroll position" --- This module exports reactive versions of various `window` values, each of which has a reactive `current` property that you can reference in reactive contexts (templates, [deriveds]($derived) and [effects]($effect)) without using [``](svelte-window) bindings or manually creating your own event listeners. diff --git a/documentation/docs/98-reference/21-svelte-reactivity.md b/documentation/docs/98-reference/21-svelte-reactivity.md index 8070331f48..d0f49e0a8c 100644 --- a/documentation/docs/98-reference/21-svelte-reactivity.md +++ b/documentation/docs/98-reference/21-svelte-reactivity.md @@ -1,5 +1,6 @@ --- title: svelte/reactivity +use_cases: "reactive collections, Map/Set alternatives, reactive URLs, reactive utilities" --- Svelte provides reactive versions of various built-ins like [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map), [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) and [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) that can be used just like their native counterparts, as well as a handful of additional utilities for handling reactivity. diff --git a/documentation/docs/98-reference/21-svelte-server.md b/documentation/docs/98-reference/21-svelte-server.md index 7a3fc3c6a2..c553c31562 100644 --- a/documentation/docs/98-reference/21-svelte-server.md +++ b/documentation/docs/98-reference/21-svelte-server.md @@ -1,5 +1,6 @@ --- title: svelte/server +use_cases: "SSR, server-side rendering, static generation" --- > MODULE: svelte/server diff --git a/documentation/docs/98-reference/21-svelte-store.md b/documentation/docs/98-reference/21-svelte-store.md index 23ff6c5e37..4e0992660b 100644 --- a/documentation/docs/98-reference/21-svelte-store.md +++ b/documentation/docs/98-reference/21-svelte-store.md @@ -1,5 +1,6 @@ --- title: svelte/store +use_cases: "writable stores, readable stores, derived stores, store contract" --- > MODULE: svelte/store diff --git a/documentation/docs/98-reference/21-svelte-transition.md b/documentation/docs/98-reference/21-svelte-transition.md index 396bc0aebf..21c196aca8 100644 --- a/documentation/docs/98-reference/21-svelte-transition.md +++ b/documentation/docs/98-reference/21-svelte-transition.md @@ -1,5 +1,6 @@ --- title: svelte/transition +use_cases: "fade, fly, slide, scale, draw transitions, crossfade" --- > MODULE: svelte/transition diff --git a/documentation/docs/98-reference/30-compiler-errors.md b/documentation/docs/98-reference/30-compiler-errors.md index ae22029155..d0847611b0 100644 --- a/documentation/docs/98-reference/30-compiler-errors.md +++ b/documentation/docs/98-reference/30-compiler-errors.md @@ -1,5 +1,6 @@ --- title: 'Compiler errors' +use_cases: "error reference, debugging, troubleshooting compilation" --- @include .generated/compile-errors.md diff --git a/documentation/docs/98-reference/30-compiler-warnings.md b/documentation/docs/98-reference/30-compiler-warnings.md index 43ba71250f..df429c579f 100644 --- a/documentation/docs/98-reference/30-compiler-warnings.md +++ b/documentation/docs/98-reference/30-compiler-warnings.md @@ -1,5 +1,6 @@ --- title: 'Compiler warnings' +use_cases: "warning reference, best practices, code quality" --- Svelte warns you at compile time if it catches potential mistakes, such as writing inaccessible markup. diff --git a/documentation/docs/98-reference/30-runtime-errors.md b/documentation/docs/98-reference/30-runtime-errors.md index 43ce989587..6963ef190f 100644 --- a/documentation/docs/98-reference/30-runtime-errors.md +++ b/documentation/docs/98-reference/30-runtime-errors.md @@ -1,5 +1,6 @@ --- title: 'Runtime errors' +use_cases: "error reference, debugging runtime issues, troubleshooting" --- ## Client errors diff --git a/documentation/docs/98-reference/30-runtime-warnings.md b/documentation/docs/98-reference/30-runtime-warnings.md index edc5890ac0..e853ceb5b6 100644 --- a/documentation/docs/98-reference/30-runtime-warnings.md +++ b/documentation/docs/98-reference/30-runtime-warnings.md @@ -1,5 +1,6 @@ --- title: 'Runtime warnings' +use_cases: "warning reference, performance optimization, best practices" --- ## Client warnings diff --git a/documentation/docs/98-reference/index.md b/documentation/docs/98-reference/index.md index b98302768e..1c0e0238bd 100644 --- a/documentation/docs/98-reference/index.md +++ b/documentation/docs/98-reference/index.md @@ -1,3 +1,4 @@ --- title: Reference +use_cases: "API reference, module documentation, error reference" --- diff --git a/documentation/docs/99-legacy/00-legacy-overview.md b/documentation/docs/99-legacy/00-legacy-overview.md index 638a77ec1a..31208d7cc3 100644 --- a/documentation/docs/99-legacy/00-legacy-overview.md +++ b/documentation/docs/99-legacy/00-legacy-overview.md @@ -1,5 +1,6 @@ --- title: Overview +use_cases: "Svelte 3/4 documentation, legacy syntax, migration reference" --- Svelte 5 introduced some significant changes to Svelte's API, including [runes](what-are-runes), [snippets](snippet) and event attributes. As a result, some Svelte 3/4 features are deprecated (though supported for now, unless otherwise specified) and will eventually be removed. We recommend that you incrementally [migrate your existing code](v5-migration-guide). diff --git a/documentation/docs/99-legacy/01-legacy-let.md b/documentation/docs/99-legacy/01-legacy-let.md index 0d1a0a72bf..025fd17843 100644 --- a/documentation/docs/99-legacy/01-legacy-let.md +++ b/documentation/docs/99-legacy/01-legacy-let.md @@ -1,5 +1,6 @@ --- title: Reactive let/var declarations +use_cases: "legacy: reactive variables, Svelte 3/4 state" --- In runes mode, reactive state is explicitly declared with the [`$state` rune]($state). diff --git a/documentation/docs/99-legacy/02-legacy-reactive-assignments.md b/documentation/docs/99-legacy/02-legacy-reactive-assignments.md index 5abd481bfc..a1240e8d0c 100644 --- a/documentation/docs/99-legacy/02-legacy-reactive-assignments.md +++ b/documentation/docs/99-legacy/02-legacy-reactive-assignments.md @@ -1,5 +1,6 @@ --- title: Reactive $: statements +use_cases: "legacy: reactive statements, derived values, side effects" --- In runes mode, reactions to state updates are handled with the [`$derived`]($derived) and [`$effect`]($effect) runes. diff --git a/documentation/docs/99-legacy/03-legacy-export-let.md b/documentation/docs/99-legacy/03-legacy-export-let.md index 877e105b1f..528baa4b0d 100644 --- a/documentation/docs/99-legacy/03-legacy-export-let.md +++ b/documentation/docs/99-legacy/03-legacy-export-let.md @@ -1,5 +1,6 @@ --- title: export let +use_cases: "legacy: component props, Svelte 3/4 props" --- In runes mode, [component props](basic-markup#Component-props) are declared with the [`$props`]($props) rune, allowing parent components to pass in data. diff --git a/documentation/docs/99-legacy/04-legacy-$$props-and-$$restProps.md b/documentation/docs/99-legacy/04-legacy-$$props-and-$$restProps.md index 33cac97035..744309e60f 100644 --- a/documentation/docs/99-legacy/04-legacy-$$props-and-$$restProps.md +++ b/documentation/docs/99-legacy/04-legacy-$$props-and-$$restProps.md @@ -1,5 +1,6 @@ --- -title: $$props and $$restProps +title: $props and $restProps +use_cases: "legacy: spread props, rest props, prop forwarding" --- In runes mode, getting an object containing all the props that were passed in is easy, using the [`$props`]($props) rune. diff --git a/documentation/docs/99-legacy/10-legacy-on.md b/documentation/docs/99-legacy/10-legacy-on.md index f2ee694cc1..3c9beb01c3 100644 --- a/documentation/docs/99-legacy/10-legacy-on.md +++ b/documentation/docs/99-legacy/10-legacy-on.md @@ -1,5 +1,6 @@ --- title: on: +use_cases: "legacy: event handling, event modifiers, component events" --- In runes mode, event handlers are just like any other attribute or prop. diff --git a/documentation/docs/99-legacy/20-legacy-slots.md b/documentation/docs/99-legacy/20-legacy-slots.md index 3474782e93..90c45e813f 100644 --- a/documentation/docs/99-legacy/20-legacy-slots.md +++ b/documentation/docs/99-legacy/20-legacy-slots.md @@ -1,5 +1,6 @@ --- title: +use_cases: "legacy: content projection, component composition, slot props" --- In Svelte 5, content can be passed to components in the form of [snippets](snippet) and rendered using [render tags](@render). diff --git a/documentation/docs/99-legacy/21-legacy-$$slots.md b/documentation/docs/99-legacy/21-legacy-$$slots.md index 7ca1cef844..9b7fb0d3c3 100644 --- a/documentation/docs/99-legacy/21-legacy-$$slots.md +++ b/documentation/docs/99-legacy/21-legacy-$$slots.md @@ -1,5 +1,6 @@ --- -title: $$slots +title: $slots +use_cases: "legacy: slot detection, conditional slots" --- In runes mode, we know which [snippets](snippet) were provided to a component, as they're just normal props. diff --git a/documentation/docs/99-legacy/22-legacy-svelte-fragment.md b/documentation/docs/99-legacy/22-legacy-svelte-fragment.md index 779931f947..7751cfcac1 100644 --- a/documentation/docs/99-legacy/22-legacy-svelte-fragment.md +++ b/documentation/docs/99-legacy/22-legacy-svelte-fragment.md @@ -1,5 +1,6 @@ --- title: +use_cases: "legacy: wrapper-free slots, multiple slot elements" --- The `` element allows you to place content in a [named slot](legacy-slots) without wrapping it in a container DOM element. This keeps the flow layout of your document intact. diff --git a/documentation/docs/99-legacy/30-legacy-svelte-component.md b/documentation/docs/99-legacy/30-legacy-svelte-component.md index a0407e58bf..ef38989c8f 100644 --- a/documentation/docs/99-legacy/30-legacy-svelte-component.md +++ b/documentation/docs/99-legacy/30-legacy-svelte-component.md @@ -1,5 +1,6 @@ --- title: +use_cases: "legacy: dynamic components, component switching" --- In runes mode, `` will re-render if the value of `MyComponent` changes. See the [Svelte 5 migration guide](/docs/svelte/v5-migration-guide#svelte:component-is-no-longer-necessary) for an example. diff --git a/documentation/docs/99-legacy/31-legacy-svelte-self.md b/documentation/docs/99-legacy/31-legacy-svelte-self.md index bfd140ac49..edc07b0bcb 100644 --- a/documentation/docs/99-legacy/31-legacy-svelte-self.md +++ b/documentation/docs/99-legacy/31-legacy-svelte-self.md @@ -1,5 +1,6 @@ --- title: +use_cases: "legacy: recursive components, self-referencing" --- The `` element allows a component to include itself, recursively.