-
-## error
-
-Throws an error with a HTTP status code and an optional message.
-When called during request handling, this will cause SvelteKit to
-return an error response without invoking `handleError`.
-Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
-
-
-
-## error
-
-Throws an error with a HTTP status code and an optional message.
-When called during request handling, this will cause SvelteKit to
-return an error response without invoking `handleError`.
-Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it.
-
-
-
-## redirect
-
-Redirect a request. When called during request handling, SvelteKit will return a redirect response.
-Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it.
-
-
-
-## Action
-
-Shape of a form action method that is part of `export const actions = {..}` in `+page.server.js`.
-See [form actions](https://kit.svelte.dev/docs/form-actions) for more information.
-
-
-
-```dts
-interface ActionFailure<
- T extends Record | undefined = undefined
-> {/*…*/}
-```
-
-
-
-```dts
-status: number;
-```
-
-
-
-
-
-
-```dts
-data: T;
-```
-
-
-
-
-
-
-```dts
-[uniqueSymbol]: true;
-```
-
-
-
-
-
-## ActionResult
-
-When calling a form action via fetch, the response will be one of these shapes.
-```svelte
-
` with a GET method
-- `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document
-- `link`: Navigation was triggered by a link click
-- `goto`: Navigation was triggered by a `goto(...)` call or a redirect
-- `popstate`: Navigation was triggered by back/forward navigation
-
-
-
-The type of navigation:
-- `form`: The user submitted a `
`
-- `link`: Navigation was triggered by a link click
-- `goto`: Navigation was triggered by a `goto(...)` call or a redirect
-- `popstate`: Navigation was triggered by back/forward navigation
-
-
-
-
-
-
-```dts
-willUnload: false;
-```
-
-
-
-Since `onNavigate` callbacks are called immediately before a client-side navigation, they will never be called with a navigation that unloads the page.
-
-
-
-The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object
-
-
-
-
-
-
-```dts
-route: {/*…*/}
-```
-
-
-
-Info about the current route
-
-
-
-```dts
-id: RouteId;
-```
-
-
-
-The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`
-
-
-
-
-
-
-
-
-
-```dts
-status: number;
-```
-
-
-
-Http status code of the current page
-
-
-
-
-
-
-```dts
-error: App.Error | null;
-```
-
-
-
-The error object of the current page, if any. Filled from the `handleError` hooks.
-
-
-
-
-
-
-```dts
-data: App.PageData & Record;
-```
-
-
-
-The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`.
-
-
-
-
-
-
-```dts
-state: App.PageState;
-```
-
-
-
-The page state, which can be manipulated using the [`pushState`](/docs/kit/reference/$app-navigation#pushstate) and [`replaceState`](/docs/kit/reference/$app-navigation#replacestate) functions from `$app/navigation`.
-
-
-
-
-
-
-```dts
-form: any;
-```
-
-
-
-Filled only after a form submission. See [form actions](https://kit.svelte.dev/docs/form-actions) for more info.
-
-
-
-
-
-## ParamMatcher
-
-The shape of a param matcher. See [matching](https://kit.svelte.dev/docs/advanced-routing#matching) for more info.
-
-
-
-Get or set cookies related to the current request
-
-
-
-
-
-
-```dts
-fetch: typeof fetch;
-```
-
-
-
-`fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features:
-
-- It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request.
-- It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context).
-- Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.
-- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://kit.svelte.dev/docs/hooks#server-hooks-handle)
-- During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request.
-
-You can learn more about making credentialed requests with cookies [here](https://kit.svelte.dev/docs/load#cookies)
-
-
-
-
-
-
-```dts
-getClientAddress(): string;
-```
-
-
-
-The client's IP address, set by the adapter.
-
-
-
-
-
-
-```dts
-locals: App.Locals;
-```
-
-
-
-Contains custom data that was added to the request within the [`handle hook`](https://kit.svelte.dev/docs/hooks#server-hooks-handle).
-
-
-
-
-
-
-```dts
-params: Params;
-```
-
-
-
-The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object
-
-
-
-If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example:
-
-```js
-// @errors: 7031
-/// file: src/routes/blog/+page.js
-export async function load({ fetch, setHeaders }) {
- const url = `https://cms.example.com/articles.json`;
- const response = await fetch(url);
-
- setHeaders({
- age: response.headers.get('age'),
- 'cache-control': response.headers.get('cache-control')
- });
-
- return response.json();
-}
-```
-
-Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once.
-
-You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](/docs/kit/reference/types#public-types-cookies) API instead.
-
-
-
-
-
-
-```dts
-url: URL;
-```
-
-
-
-The requested URL.
-
-
-
-
-
-
-```dts
-isDataRequest: boolean;
-```
-
-
-
-`true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information
-related to the data request in this case. Use this property instead if the distinction is important to you.
-
-
-
-
-
-
-```dts
-isSubRequest: boolean;
-```
-
-
-
-`true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server.
-
-
-
-
-
-## RequestHandler
-
-A `(event: RequestEvent) => Response` function exported from a `+server.js` file that corresponds to an HTTP verb (`GET`, `PUT`, `PATCH`, etc) and handles requests with that method.
-
-It receives `Params` as the first generic argument, which you can skip by using [generated types](/docs/kit/reference/types#generated-types) instead.
-
-
-
-## Reroute
-
-The [`reroute`](https://kit.svelte.dev/docs/hooks#universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render.
-
-
-
-- `input` the html chunk and the info if this is the last chunk
-
-
-
-Applies custom transforms to HTML. If `done` is true, it's the final chunk. Chunks are not guaranteed to be well-formed HTML
-(they could include an element's opening tag but not its closing tag, for example)
-but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components.
-
-
-
-- `name` header name
-- `value` header value
-
-
-
-Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`.
-By default, none will be included.
-
-
-
-A function that turns an asset filename into a `ReadableStream`. Required for the `read` export from `$app/server` to work
-
-
-
-
-
-## ServerLoad
-
-The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](/docs/kit/reference/types#generated-types))
-rather than using `ServerLoad` directly.
-
-
-
-`await parent()` returns data from parent `+layout.server.js` `load` functions.
-
-Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data.
-
-
-
-This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](/docs/kit/reference/$app-navigation#invalidate) to cause `load` to rerun.
-
-Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`.
-
-URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding).
-
-Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html).
-
-The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun.
-
-```js
-// @errors: 7031
-/// file: src/routes/+page.js
-let count = 0;
-export async function load({ depends }) {
- depends('increase:count');
-
- return { count: count++ };
-}
-```
-
-```html
-/// file: src/routes/+page.svelte
-
-
-
{data.count}
-
-```
-
-
-
-
-
-
-```dts
-untrack(fn: () => T): T;
-```
-
-
-
-Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example:
-
-```js
-// @errors: 7031
-/// file: src/routes/+page.js
-export async function load({ untrack, url }) {
- // Untrack url.pathname so that path changes don't trigger a rerun
- if (untrack(() => url.pathname === '/')) {
- return { message: 'Welcome!' };
- }
-}
-```
-
-
-
-
-
-## Snapshot
-
-The type of `export const snapshot` exported from a page or layout component.
-
-
-
-```dts
-type SubmitFunction<
- Success extends
- | Record
- | undefined = Record,
- Failure extends
- | Record
- | undefined = Record
-> = (input: {
- action: URL;
- formData: FormData;
- formElement: HTMLFormElement;
- controller: AbortController;
- submitter: HTMLElement | null;
- cancel(): void;
-}) => MaybePromise<
- | void
- | ((opts: {
- formData: FormData;
- formElement: HTMLFormElement;
- action: URL;
- result: ActionResult;
- /**
- * Call this to get the default behavior of a form submission response.
- * @param options Set `reset: false` if you don't want the `
` values to be reset after a successful submission.
- * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission.
- */
- update(options?: {
- reset?: boolean;
- invalidateAll?: boolean;
- }): Promise;
- }) => void)
->;
-```
-
-
-
-
-
-
-## Private types
-
-The following are referenced by the public types documented above, but cannot be imported directly:
-
-## AdapterEntry
-
-
-
-A string that uniquely identifies an HTTP service (e.g. serverless function) and is used for deduplication.
-For example, `/foo/a-[b]` and `/foo/[c]` are different routes, but would both
-be represented in a Netlify _redirects file as `/foo/:param`, so they share an ID
-
-
-
-A function that compares the candidate route with the current route to determine
-if it should be grouped with the current route.
-
-Use cases:
-- Fallback pages: `/foo/[c]` is a fallback for `/foo/a-[b]`, and `/[...catchall]` is a fallback for all routes
-- Grouping routes that share a common `config`: `/foo` should be deployed to the edge, `/bar` and `/baz` should be deployed to a serverless function
-
-
-
-A function that is invoked once the entry has been created. This is where you
-should write the function to the filesystem and generate redirect manifests.
-
-
-
-```dts
-pages: Map<
-string,
-{
- /** The location of the .html file relative to the output directory */
- file: string;
-}
->;
-```
-
-
-
-A map of `path` to `{ file }` objects, where a path like `/foo` corresponds to `foo.html` and a path like `/bar/` corresponds to `bar/index.html`.
-
-
-
-
-
-
-```dts
-assets: Map<
-string,
-{
- /** The MIME type of the asset */
- type: string;
-}
->;
-```
-
-
-
-
+@include kit/@sveltejs/kit/node/polyfills/index.md
diff --git a/apps/svelte.dev/content/docs/svelte/04-runtime/03-lifecycle-hooks.md b/apps/svelte.dev/content/docs/svelte/04-runtime/03-lifecycle-hooks.md
index 05aa38ccbb..8dd345f091 100644
--- a/apps/svelte.dev/content/docs/svelte/04-runtime/03-lifecycle-hooks.md
+++ b/apps/svelte.dev/content/docs/svelte/04-runtime/03-lifecycle-hooks.md
@@ -45,13 +45,7 @@ If a function is returned from `onMount`, it will be called when the component i
## `onDestroy`
-
+@include svelte/svelte/+exports/onDestroy.md
Schedules a callback to run immediately before the component is unmounted.
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md b/apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md
index 12d685434e..a5362266d8 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md
@@ -2,849 +2,4 @@
title: svelte
---
-
-
-```js
-// @noErrors
-import {
- afterUpdate,
- beforeUpdate,
- createEventDispatcher,
- createRawSnippet,
- flushSync,
- getAllContexts,
- getContext,
- hasContext,
- hydrate,
- mount,
- onDestroy,
- onMount,
- setContext,
- tick,
- unmount,
- untrack
-} from 'svelte';
-```
-
-## afterUpdate
-
-Schedules a callback to run immediately after the component has been updated.
-
-The first time the callback runs will be after the initial `onMount`.
-
-In runes mode use `$effect` instead.
-
-https://svelte.dev/docs/svelte#afterupdate
-
-
-
-## beforeUpdate
-
-Schedules a callback to run immediately before the component is updated after any state change.
-
-The first time the callback runs will be before the initial `onMount`.
-
-In runes mode use `$effect.pre` instead.
-
-https://svelte.dev/docs/svelte#beforeupdate
-
-
-
-## createEventDispatcher
-
-Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).
-Event dispatchers are functions that can take two arguments: `name` and `detail`.
-
-Component events created with `createEventDispatcher` create a
-[CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).
-These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).
-The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)
-property and can contain any type of data.
-
-The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:
-```ts
-const dispatch = createEventDispatcher<{
- loaded: never; // does not take a detail argument
- change: string; // takes a detail argument of type string, which is required
- optional: number | null; // takes an optional detail argument of type number
-}>();
-```
-
-https://svelte.dev/docs/svelte#createeventdispatcher
-
-
-
-```ts
-// @noErrors
-function createEventDispatcher<
- EventMap extends Record = any
->(): EventDispatcher;
-```
-
-
-
-## createRawSnippet
-
-Create a snippet programmatically
-
-
-
-## getAllContexts
-
-Retrieves the whole context map that belongs to the closest parent component.
-Must be called during component initialisation. Useful, for example, if you
-programmatically create a component and want to pass the existing context to it.
-
-https://svelte.dev/docs/svelte#getallcontexts
-
-
-
-## getContext
-
-Retrieves the context that belongs to the closest parent component with the specified `key`.
-Must be called during component initialisation.
-
-https://svelte.dev/docs/svelte#getcontext
-
-
-
-## hasContext
-
-Checks whether a given `key` has been set in the context of a parent component.
-Must be called during component initialisation.
-
-https://svelte.dev/docs/svelte#hascontext
-
-
-
-## hydrate
-
-Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
-
-
-
-## mount
-
-Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
-Transitions will play during the initial render unless the `intro` option is set to `false`.
-
-
-
-## onDestroy
-
-Schedules a callback to run immediately before the component is unmounted.
-
-Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
-only one that runs inside a server-side component.
-
-https://svelte.dev/docs/svelte#ondestroy
-
-
-
-## onMount
-
-The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
-It must be called during the component's initialisation (but doesn't need to live *inside* the component;
-it can be called from an external module).
-
-If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.
-
-`onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).
-
-https://svelte.dev/docs/svelte#onmount
-
-
-
-## setContext
-
-Associates an arbitrary `context` object with the current component and the specified `key`
-and returns that object. The context is then available to children of the component
-(including slotted content) with `getContext`.
-
-Like lifecycle functions, this must be called during component initialisation.
-
-https://svelte.dev/docs/svelte#setcontext
-
-
-
-## untrack
-
-Use `untrack` to prevent something from being treated as an `$effect`/`$derived` dependency.
-
-https://svelte-5-preview.vercel.app/docs/functions#untrack
-
-
-
-## Component
-
-Can be used to create strongly typed Svelte components.
-
-#### Example:
-
-You have component library on npm called `component-library`, from which
-you export a component called `MyComponent`. For Svelte+TypeScript users,
-you want to provide typings. Therefore you create a `index.d.ts`:
-```ts
-import type { Component } from 'svelte';
-export declare const MyComponent: Component<{ foo: string }> {}
-```
-Typing this makes it possible for IDEs like VS Code with the Svelte extension
-to provide intellisense and to use the component like this in a Svelte file
-with TypeScript:
-```svelte
-
-
-```
-
-
-
-```dts
-(
- this: void,
- internals: ComponentInternals,
- props: Props
-): {
- /**
- * @deprecated This method only exists when using one of the legacy compatibility helpers, which
- * is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
- * for more info.
- */
- $on?(type: string, callback: (e: any) => void): () => void;
- /**
- * @deprecated This method only exists when using one of the legacy compatibility helpers, which
- * is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
- * for more info.
- */
- $set?(props: Partial): void;
-} & Exports;
-```
-
-
-
-
-
-- `internal` An internal object used by Svelte. Do not use or modify.
-- `props` The props passed to the component.
-
-
-
-
-
-
-
-
-```dts
-element?: typeof HTMLElement;
-```
-
-
-
-The custom element version of the component. Only present if compiled with the `customElement` compiler option
-
-
-
-
-
-## ComponentConstructorOptions
-
-
-
-In Svelte 4, components are classes. In Svelte 5, they are functions.
-Use `mount` instead to instantiate components.
-See [breaking changes](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes)
-for more info.
-
-
-
-
-
-```dts
-interface ComponentConstructorOptions<
- Props extends Record = Record
-> {/*…*/}
-```
-
-
-
-## ComponentProps
-
-Convenience type to get the props the given component expects.
-
-Example: Ensure a variable contains the props expected by `MyComponent`:
-
-```ts
-import type { ComponentProps } from 'svelte';
-import MyComponent from './MyComponent.svelte';
-
-// Errors if these aren't the correct props expected by MyComponent.
-const props: ComponentProps = { foo: 'bar' };
-```
-
-Example: A generic function that accepts some component and infers the type of its props:
-
-```ts
-import type { Component, ComponentProps } from 'svelte';
-import MyComponent from './MyComponent.svelte';
-
-function withProps>(
- component: TComponent,
- props: ComponentProps
-) {};
-
-// Errors if the second argument is not the correct props expected by the component in the first argument.
-withProps(MyComponent, { foo: 'bar' });
-```
-
-
-
-## Snippet
-
-The type of a `#snippet` block. You can use it to (for example) express that your component expects a snippet of a certain type:
-```ts
-let { banner }: { banner: Snippet<[{ text: string }]> } = $props();
-```
-You can only call a snippet through the `{@render ...}` tag.
-
-https://svelte-5-preview.vercel.app/docs/snippets
-
-
-
-```dts
-interface Snippet {/*…*/}
-```
-
-
-
-```dts
-(
- this: void,
- // this conditional allows tuples but not arrays. Arrays would indicate a
- // rest parameter type, which is not supported. If rest parameters are added
- // in the future, the condition can be removed.
- ...args: number extends Parameters['length'] ? never : Parameters
-): {
- '{@render ...} must be called with a Snippet': "import type { Snippet } from 'svelte'";
-} & typeof SnippetReturn;
-```
-
-
-
-
-
-## SvelteComponent
-
-This was the base class for Svelte components in Svelte 4. Svelte 5+ components
-are completely different under the hood. For typing, use `Component` instead.
-To instantiate components, use `mount` instead`.
-See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more info.
-
-
-
-```dts
-class SvelteComponent<
- Props extends Record = Record,
- Events extends Record = any,
- Slots extends Record = any
-> {/*…*/}
-```
-
-
-
-- deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
-is a stop-gap solution. Migrate towards using `mount` instead. See
-https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info.
-
-
-
-
-
-
-
-
-```dts
-$destroy(): void;
-```
-
-
-
-
-
-- deprecated This method only exists when using one of the legacy compatibility helpers, which
-is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
-for more info.
-
-
-
-- deprecated This method only exists when using one of the legacy compatibility helpers, which
-is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
-for more info.
-
-
-
-
-
-
-
-
-```dts
-$set(props: Partial): void;
-```
-
-
-
-
-
-- deprecated This method only exists when using one of the legacy compatibility helpers, which
-is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
-for more info.
-
-
-
-
-
-
-
-## SvelteComponentTyped
-
-
-
-Use `Component` instead. See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more information.
-
-
-
-
-
-```dts
-class SvelteComponentTyped<
- Props extends Record = Record,
- Events extends Record = any,
- Slots extends Record = any
-> extends SvelteComponent {}
-```
-
-
-
-
-
+@include svelte/svelte/index.md
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-action.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-action.md
index 37ca65a283..542f70a565 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-action.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-action.md
@@ -2,109 +2,4 @@
title: svelte/action
---
-## Action
-
-Actions are functions that are called when an element is created.
-You can use this interface to type such actions.
-The following example defines an action that only works on `
` elements
-and optionally accepts a parameter which it has a default value for:
-```ts
-export const myAction: Action = (node, param = { someProperty: true }) => {
- // ...
-}
-```
-`Action` and `Action` both signal that the action accepts no parameters.
-
-You can return an object with methods `update` and `destroy` from the function and type which additional attributes and events it has.
-See interface `ActionReturn` for more details.
-
-Docs: https://svelte.dev/docs/svelte-action
-
-
-
-```dts
-interface Action<
- Element = HTMLElement,
- Parameter = undefined,
- Attributes extends Record = Record<
- never,
- any
- >
-> {/*…*/}
-```
-
-
-
-## ActionReturn
-
-Actions can return an object containing the two properties defined in this interface. Both are optional.
-- update: An action can have a parameter. This method will be called whenever that parameter changes,
- immediately after Svelte has applied updates to the markup. `ActionReturn` and `ActionReturn` both
- mean that the action accepts no parameters.
-- destroy: Method that is called after the element is unmounted
-
-Additionally, you can specify which additional attributes and events the action enables on the applied element.
-This applies to TypeScript typings only and has no effect at runtime.
-
-Example usage:
-```ts
-interface Attributes {
- newprop?: string;
- 'on:event': (e: CustomEvent) => void;
-}
-
-export function myAction(node: HTMLElement, parameter: Parameter): ActionReturn {
- // ...
- return {
- update: (updatedParameter) => {...},
- destroy: () => {...}
- };
-}
-```
-
-Docs: https://svelte.dev/docs/svelte-action
-
-
-
-
+@include svelte/svelte/action/index.md
diff --git a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-animate.md b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-animate.md
index 1760b94b3f..0c9e38e9b0 100644
--- a/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-animate.md
+++ b/apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-animate.md
@@ -2,127 +2,4 @@
title: svelte/animate
---
-
-
-```js
-// @noErrors
-import { flip } from 'svelte/animate';
-```
-
-## flip
-
-The flip function calculates the start and end position of an element and animates between them, translating the x and y values.
-`flip` stands for [First, Last, Invert, Play](https://aerotwist.com/blog/flip-your-animations/).
-
-https://svelte.dev/docs/svelte-animate#flip
-
-
-
-## compile
-
-`compile` converts your `.svelte` source code into a JavaScript module that exports a component
-
-https://svelte.dev/docs/svelte-compiler#svelte-compile
-
-
-
-## compileModule
-
-`compileModule` takes your JavaScript source code containing runes, and turns it into a JavaScript module.
-
-https://svelte.dev/docs/svelte-compiler#svelte-compile
-
-
-
-## migrate
-
-Does a best-effort migration of Svelte code towards using runes, event attributes and render tags.
-May throw an error if the code is too complex to migrate automatically.
-
-
-
-## parse
-
-The parse function parses a component, returning only its abstract syntax tree.
-
-The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST.
-`modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7.
-
-https://svelte.dev/docs/svelte-compiler#svelte-parse
-
-
-
-## parse
-
-The parse function parses a component, returning only its abstract syntax tree.
-
-The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST.
-`modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7.
-
-https://svelte.dev/docs/svelte-compiler#svelte-parse
-
-
-
-## preprocess
-
-The preprocess function provides convenient hooks for arbitrarily transforming component source code.
-For example, it can be used to convert a