You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/svelte.dev/content/docs/kit/98-reference/[email protected]
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,7 +184,7 @@ function text(
184
184
## Action
185
185
186
186
Shape of a form action method that is part of `export const actions = {..}` in `+page.server.js`.
187
-
See [form actions](https://svelte.dev/docs/kit/form-actions) for more information.
187
+
See [form actions](/docs/kit/form-actions) for more information.
188
188
189
189
<divclass="ts-block">
190
190
@@ -275,7 +275,7 @@ type ActionResult<
275
275
## Actions
276
276
277
277
Shape of the `export const actions = {..}` object in `+page.server.js`.
278
-
See [form actions](https://svelte.dev/docs/kit/form-actions) for more information.
278
+
See [form actions](/docs/kit/form-actions) for more information.
279
279
280
280
<divclass="ts-block">
281
281
@@ -296,7 +296,7 @@ type Actions<
296
296
297
297
## Adapter
298
298
299
-
[Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing.
299
+
[Adapters](/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing.
300
300
301
301
<divclass="ts-block">
302
302
@@ -384,7 +384,7 @@ during dev, build and prerendering
384
384
385
385
## AfterNavigate
386
386
387
-
The argument passed to [`afterNavigate`](https://svelte.dev/docs/kit/$app-navigation#afterNavigate) callbacks.
387
+
The argument passed to [`afterNavigate`](/docs/kit/$app-navigation#afterNavigate) callbacks.
388
388
389
389
<divclass="ts-block">
390
390
@@ -443,7 +443,7 @@ type AwaitedActions<
443
443
444
444
## BeforeNavigate
445
445
446
-
The argument passed to [`beforeNavigate`](https://svelte.dev/docs/kit/$app-navigation#beforeNavigate) callbacks.
446
+
The argument passed to [`beforeNavigate`](/docs/kit/$app-navigation#beforeNavigate) callbacks.
447
447
448
448
<divclass="ts-block">
449
449
@@ -955,8 +955,8 @@ and returns an `App.Platform` object
955
955
956
956
## Handle
957
957
958
-
The [`handle`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and
959
-
determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response).
958
+
The [`handle`](/docs/kit/hooks#Server-hooks-handle) hook runs every time the SvelteKit server receives a [request](/docs/kit/web-standards#Fetch-APIs-Request) and
959
+
determines the [response](/docs/kit/web-standards#Fetch-APIs-Response).
960
960
It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`.
961
961
This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example).
962
962
@@ -976,7 +976,7 @@ type Handle = (input: {
976
976
977
977
## HandleClientError
978
978
979
-
The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while navigating.
979
+
The client-side [`handleError`](/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while navigating.
980
980
981
981
If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event.
982
982
Make sure that this function _never_ throws an error.
@@ -996,7 +996,7 @@ type HandleClientError = (input: {
996
996
997
997
## HandleFetch
998
998
999
-
The [`handleFetch`](https://svelte.dev/docs/kit/hooks#Server-hooks-handleFetch) hook allows you to modify (or replace) a `fetch` request that happens inside a `load` function that runs on the server (or during pre-rendering)
999
+
The [`handleFetch`](/docs/kit/hooks#Server-hooks-handleFetch) hook allows you to modify (or replace) a `fetch` request that happens inside a `load` function that runs on the server (or during pre-rendering)
1000
1000
1001
1001
<divclass="ts-block">
1002
1002
@@ -1012,7 +1012,7 @@ type HandleFetch = (input: {
1012
1012
1013
1013
## HandleServerError
1014
1014
1015
-
The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while responding to a request.
1015
+
The server-side [`handleError`](/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while responding to a request.
1016
1016
1017
1017
If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event.
1018
1018
Make sure that this function _never_ throws an error.
@@ -1032,7 +1032,7 @@ type HandleServerError = (input: {
1032
1032
1033
1033
## HttpError
1034
1034
1035
-
The object returned by the [`error`](https://svelte.dev/docs/kit/@sveltejs-kit#error) function.
1035
+
The object returned by the [`error`](/docs/kit/@sveltejs-kit#error) function.
1036
1036
1037
1037
<divclass="ts-block">
1038
1038
@@ -1087,7 +1087,7 @@ type LessThan<
1087
1087
1088
1088
## Load
1089
1089
1090
-
The generic form of `PageLoad` and `LayoutLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types))
1090
+
The generic form of `PageLoad` and `LayoutLoad`. You should import those from `./$types` (see [generated types](/docs/kit/types#Generated-types))
1091
1091
rather than using `Load` directly.
1092
1092
1093
1093
<divclass="ts-block">
@@ -1119,7 +1119,7 @@ type Load<
1119
1119
1120
1120
## LoadEvent
1121
1121
1122
-
The generic form of `PageLoadEvent` and `LayoutLoadEvent`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types))
1122
+
The generic form of `PageLoadEvent` and `LayoutLoadEvent`. You should import those from `./$types` (see [generated types](/docs/kit/types#Generated-types))
1123
1123
rather than using `LoadEvent` directly.
1124
1124
1125
1125
<divclass="ts-block">
@@ -1559,7 +1559,7 @@ type NumericRange<
1559
1559
1560
1560
## OnNavigate
1561
1561
1562
-
The argument passed to [`onNavigate`](https://svelte.dev/docs/kit/$app-navigation#onNavigate) callbacks.
1562
+
The argument passed to [`onNavigate`](/docs/kit/$app-navigation#onNavigate) callbacks.
1563
1563
1564
1564
<divclass="ts-block">
1565
1565
@@ -1732,7 +1732,7 @@ Filled only after a form submission. See [form actions](https://svelte.dev/docs/
1732
1732
1733
1733
## ParamMatcher
1734
1734
1735
-
The shape of a param matcher. See [matching](https://svelte.dev/docs/kit/advanced-routing#Matching) for more info.
1735
+
The shape of a param matcher. See [matching](/docs/kit/advanced-routing#Matching) for more info.
1736
1736
1737
1737
<divclass="ts-block">
1738
1738
@@ -1754,7 +1754,7 @@ type PrerenderOption = boolean | 'auto';
1754
1754
1755
1755
## Redirect
1756
1756
1757
-
The object returned by the [`redirect`](https://svelte.dev/docs/kit/@sveltejs-kit#redirect) function
1757
+
The object returned by the [`redirect`](/docs/kit/@sveltejs-kit#redirect) function
1758
1758
1759
1759
<divclass="ts-block">
1760
1760
@@ -2003,7 +2003,7 @@ isSubRequest: boolean;
2003
2003
2004
2004
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.
2005
2005
2006
-
It receives `Params` as the first generic argument, which you can skip by using [generated types](https://svelte.dev/docs/kit/types#Generated-types) instead.
2006
+
It receives `Params` as the first generic argument, which you can skip by using [generated types](/docs/kit/types#Generated-types) instead.
2007
2007
2008
2008
<divclass="ts-block">
2009
2009
@@ -2022,7 +2022,7 @@ type RequestHandler<
2022
2022
2023
2023
## Reroute
2024
2024
2025
-
The [`reroute`](https://svelte.dev/docs/kit/hooks#Universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render.
2025
+
The [`reroute`](/docs/kit/hooks#Universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render.
2026
2026
2027
2027
<divclass="ts-block">
2028
2028
@@ -2359,7 +2359,7 @@ A function that turns an asset filename into a `ReadableStream`. Required for th
2359
2359
2360
2360
## ServerLoad
2361
2361
2362
-
The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types))
2362
+
The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](/docs/kit/types#Generated-types))
Copy file name to clipboardExpand all lines: apps/svelte.dev/content/docs/kit/98-reference/20-$app-navigation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,7 +227,7 @@ function preloadData(href: string): Promise<
227
227
228
228
## pushState
229
229
230
-
Programmatically create a new history entry with the given `$page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing).
230
+
Programmatically create a new history entry with the given `$page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](/docs/kit/shallow-routing).
231
231
232
232
<divclass="ts-block">
233
233
@@ -244,7 +244,7 @@ function pushState(
244
244
245
245
## replaceState
246
246
247
-
Programmatically replace the current history entry with the given `$page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing).
247
+
Programmatically replace the current history entry with the given `$page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](/docs/kit/shallow-routing).
An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths).
14
+
An absolute path that matches [`config.kit.paths.assets`](/docs/kit/configuration#paths).
15
15
16
16
> [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL.
17
17
@@ -31,7 +31,7 @@ let assets:
31
31
32
32
## base
33
33
34
-
A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths).
34
+
A string that matches [`config.kit.paths.base`](/docs/kit/configuration#paths).
35
35
36
36
Example usage: `<a href="{base}/your-page">Link</a>`
A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.
70
+
A readable store whose initial value is `false`. If [`version.pollInterval`](/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.
71
71
72
72
On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time.
Copy file name to clipboardExpand all lines: apps/svelte.dev/content/docs/kit/98-reference/27-$service-worker.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ const build: string[];
43
43
44
44
## files
45
45
46
-
An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration)
46
+
An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](/docs/kit/configuration)
47
47
48
48
<divclass="ts-block">
49
49
@@ -72,7 +72,7 @@ const prerendered: string[];
72
72
73
73
## version
74
74
75
-
See [`config.kit.version`](https://svelte.dev/docs/kit/configuration#version). It's useful for generating unique cache names inside your service worker, so that a later deployment of your app can invalidate old caches.
75
+
See [`config.kit.version`](/docs/kit/configuration#version). It's useful for generating unique cache names inside your service worker, so that a later deployment of your app can invalidate old caches.
Copy file name to clipboardExpand all lines: apps/svelte.dev/content/docs/kit/98-reference/54-types.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ message: string;
175
175
176
176
## Locals
177
177
178
-
The interface that defines `event.locals`, which can be accessed in server [hooks](https://svelte.dev/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files.
178
+
The interface that defines `event.locals`, which can be accessed in server [hooks](/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files.
179
179
180
180
<divclass="ts-block">
181
181
@@ -187,7 +187,7 @@ interface Locals {}
187
187
188
188
## PageData
189
189
190
-
Defines the common shape of the [$page.data store](https://svelte.dev/docs/kit/$app-stores#page) - that is, the data that is shared between all pages.
190
+
Defines the common shape of the [$page.data store](/docs/kit/$app-stores#page) - that is, the data that is shared between all pages.
191
191
The `Load` and `ServerLoad` functions in `./$types` will be narrowed accordingly.
192
192
Use optional properties for data that is only present on specific pages. Do not add an index signature (`[key: string]: any`).
193
193
@@ -201,7 +201,7 @@ interface PageData {}
201
201
202
202
## PageState
203
203
204
-
The shape of the `$page.state` object, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`.
204
+
The shape of the `$page.state` object, which can be manipulated using the [`pushState`](/docs/kit/$app-navigation#pushState) and [`replaceState`](/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`.
205
205
206
206
<divclass="ts-block">
207
207
@@ -213,7 +213,7 @@ interface PageState {}
213
213
214
214
## Platform
215
215
216
-
If your adapter provides [platform-specific context](https://svelte.dev/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here.
216
+
If your adapter provides [platform-specific context](/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here.
Copy file name to clipboardExpand all lines: apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-transition.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ function blur(
42
42
43
43
## crossfade
44
44
45
-
The `crossfade` function creates a pair of [transitions](https://svelte.dev/docs/svelte/transition) called `send` and `receive`. When an element is 'sent', it looks for a corresponding element being 'received', and generates a transition that transforms the element to its counterpart's position and fades it out. When an element is 'received', the reverse happens. If there is no counterpart, the `fallback` transition is used.
45
+
The `crossfade` function creates a pair of [transitions](/docs/svelte/transition) called `send` and `receive`. When an element is 'sent', it looks for a corresponding element being 'received', and generates a transition that transforms the element to its counterpart's position and fades it out. When an element is 'received', the reverse happens. If there is no counterpart, the `fallback` transition is used.
0 commit comments