Skip to content

Commit 2266990

Browse files
committed
chore: sync docs
1 parent 47bd88b commit 2266990

File tree

8 files changed

+25
-27
lines changed

8 files changed

+25
-27
lines changed

apps/svelte.dev/content/docs/kit/20-core-concepts/10-routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Pages can receive data from `load` functions via the `data` prop.
5050
<div>{@html data.content}</div>
5151
```
5252

53-
> [!LEGACY] In Svelte 4
53+
> [!LEGACY]
5454
> In Svelte 4, you'd use `export let data` instead
5555
5656
> [!NOTE] Note that SvelteKit uses `<a>` elements to navigate between routes, rather than a framework-specific `<Link>` component.

apps/svelte.dev/content/docs/svelte/01-introduction/02-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm run dev
1313

1414
Don't worry if you don't know Svelte yet! You can ignore all the nice features SvelteKit brings on top for now and dive into it later.
1515

16-
### Alternatives to SvelteKit
16+
## Alternatives to SvelteKit
1717

1818
You can also use Svelte directly with Vite by running `npm create vite@latest` and selecting the `svelte` option. With this, `npm run build` will generate HTML, JS and CSS files inside the `dist` directory using [vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte). In most cases, you will probably need to [choose a routing library](faq#Is-there-a-router) as well.
1919

apps/svelte.dev/content/docs/svelte/03-template-syntax/01-basic-markup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Timing-wise, event attributes always fire after events from bindings (e.g. `onin
109109

110110
When using `ontouchstart` and `ontouchmove` event attributes, the handlers are [passive](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#using_passive_listeners) for better performance. This greatly improves responsiveness by allowing the browser to scroll the document immediately, rather than waiting to see if the event handler calls `event.preventDefault()`.
111111

112-
In the very rare cases that you need to prevent these event defaults, you should use [`on`](https://svelte-5-preview.vercel.app/docs/imports#svelte-events) instead (for example inside an action).
112+
In the very rare cases that you need to prevent these event defaults, you should use [`on`](svelte-events#on) instead (for example inside an action).
113113

114114
### Event delegation
115115

apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ A component is attempting to bind to a non-bindable property `%key%` belonging t
1919
### component_api_changed
2020

2121
```
22-
%parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
22+
%parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
2323
```
2424

2525
### component_api_invalid_new
2626

2727
```
28-
Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
28+
Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
2929
```
3030

3131
### derived_references_self

apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Your `console.%method%` contained `$state` proxies. Consider using `$inspect(...
1616

1717
When logging a [proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy), browser devtools will log the proxy itself rather than the value it represents. In the case of Svelte, the 'target' of a `$state` proxy might not resemble its current value, which can be confusing.
1818

19-
The easiest way to log a value as it changes over time is to use the [`$inspect`](https://svelte-5-preview.vercel.app/docs/runes#$inspect) rune. Alternatively, to log things on a one-off basis (for example, inside an event handler) you can use [`$state.snapshot`](https://svelte-5-preview.vercel.app/docs/runes#$state-snapshot) to take a snapshot of the current value.
19+
The easiest way to log a value as it changes over time is to use the [`$inspect`](https://svelte.dev/docs/svelte/$inspect) rune. Alternatively, to log things on a one-off basis (for example, inside an event handler) you can use [`$state.snapshot`](https://svelte.dev/docs/svelte/$state#$state.snapshot) to take a snapshot of the current value.
2020

2121
### event_handler_invalid
2222

apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030

3131
<blockquote class="tag deprecated">
3232

33-
Use `$effect` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate
33+
Use `$effect` instead — see https://svelte.dev/docs/svelte/$effect
3434

3535
</blockquote>
3636

@@ -54,7 +54,7 @@ function afterUpdate(fn: () => void): void;
5454

5555
<blockquote class="tag deprecated">
5656

57-
Use `$effect.pre` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate
57+
Use `$effect.pre` instead — see https://svelte.dev/docs/svelte/$effect#$effect.pre
5858

5959
</blockquote>
6060

@@ -78,11 +78,11 @@ function beforeUpdate(fn: () => void): void;
7878

7979
<blockquote class="tag deprecated">
8080

81-
Use callback props and/or the `$host()` rune instead — see https://svelte-5-preview.vercel.app/docs/deprecations#createeventdispatcher
81+
Use callback props and/or the `$host()` rune instead — see https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events
8282

8383
</blockquote>
8484

85-
Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).
85+
Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).
8686
Event dispatchers are functions that can take two arguments: `name` and `detail`.
8787

8888
Component events created with `createEventDispatcher` create a
@@ -279,7 +279,7 @@ it can be called from an external module).
279279

280280
If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.
281281

282-
`onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).
282+
`onMount` does not run inside [server-side components](https://svelte.dev/docs/svelte/svelte-server#render).
283283

284284
<div class="ts-block">
285285

@@ -346,8 +346,6 @@ function unmount(component: Record<string, any>): void;
346346

347347
Use `untrack` to prevent something from being treated as an `$effect`/`$derived` dependency.
348348

349-
https://svelte-5-preview.vercel.app/docs/functions#untrack
350-
351349
<div class="ts-block">
352350

353351
```dts
@@ -401,13 +399,13 @@ interface Component<
401399
): {
402400
/**
403401
* @deprecated This method only exists when using one of the legacy compatibility helpers, which
404-
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
402+
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
405403
* for more info.
406404
*/
407405
$on?(type: string, callback: (e: any) => void): () => void;
408406
/**
409407
* @deprecated This method only exists when using one of the legacy compatibility helpers, which
410-
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
408+
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
411409
* for more info.
412410
*/
413411
$set?(props: Partial<Props>): void;
@@ -445,7 +443,7 @@ The custom element version of the component. Only present if compiled with the `
445443

446444
In Svelte 4, components are classes. In Svelte 5, they are functions.
447445
Use `mount` instead to instantiate components.
448-
See [breaking changes](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes)
446+
See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
449447
for more info.
450448

451449
</blockquote>
@@ -725,7 +723,7 @@ let { banner }: { banner: Snippet<[{ text: string }]> } = $props();
725723
```
726724
You can only call a snippet through the `{@render ...}` tag.
727725

728-
https://svelte-5-preview.vercel.app/docs/snippets
726+
https://svelte.dev/docs/svelte/snippet
729727

730728
<div class="ts-block">
731729

@@ -755,7 +753,7 @@ interface Snippet<Parameters extends unknown[] = []> {/*…*/}
755753
This was the base class for Svelte components in Svelte 4. Svelte 5+ components
756754
are completely different under the hood. For typing, use `Component` instead.
757755
To instantiate components, use `mount` instead`.
758-
See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more info.
756+
See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info.
759757

760758
<div class="ts-block">
761759

@@ -801,7 +799,7 @@ constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);
801799

802800
- <span class="tag deprecated">deprecated</span> This constructor only exists when using the `asClassComponent` compatibility helper, which
803801
is a stop-gap solution. Migrate towards using `mount` instead. See
804-
https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info.
802+
https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more info.
805803

806804
</div>
807805

@@ -819,7 +817,7 @@ $destroy(): void;
819817
<div class="ts-block-property-bullets">
820818

821819
- <span class="tag deprecated">deprecated</span> This method only exists when using one of the legacy compatibility helpers, which
822-
is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
820+
is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
823821
for more info.
824822

825823
</div>
@@ -841,7 +839,7 @@ $on<K extends Extract<keyof Events, string>>(
841839
<div class="ts-block-property-bullets">
842840

843841
- <span class="tag deprecated">deprecated</span> This method only exists when using one of the legacy compatibility helpers, which
844-
is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
842+
is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
845843
for more info.
846844

847845
</div>
@@ -860,7 +858,7 @@ $set(props: Partial<Props>): void;
860858
<div class="ts-block-property-bullets">
861859

862860
- <span class="tag deprecated">deprecated</span> This method only exists when using one of the legacy compatibility helpers, which
863-
is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes
861+
is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
864862
for more info.
865863

866864
</div>
@@ -872,7 +870,7 @@ for more info.
872870

873871
<blockquote class="tag deprecated">
874872

875-
Use `Component` instead. See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more information.
873+
Use `Component` instead. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more information.
876874

877875
</blockquote>
878876

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ A component is attempting to bind to a non-bindable property `%key%` belonging t
2525
### component_api_changed
2626

2727
```
28-
%parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
28+
%parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
2929
```
3030

3131
### component_api_invalid_new
3232

3333
```
34-
Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
34+
Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
3535
```
3636

3737
### derived_references_self

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-warnings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ A component is attempting to bind to a non-bindable property `%key%` belonging t
2525
### component_api_changed
2626

2727
```
28-
%parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
28+
%parent% called `%method%` on an instance of %component%, which is no longer valid in Svelte 5. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
2929
```
3030

3131
### component_api_invalid_new
3232

3333
```
34-
Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information
34+
Attempted to instantiate %component% with `new %name%`, which is no longer valid in Svelte 5. If this component is not under your control, set the `compatibility.componentApi` compiler option to `4` to keep it working. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information
3535
```
3636

3737
### derived_references_self

0 commit comments

Comments
 (0)