@nuxt/docs-nightly 4.4.3-29594048.ac9e25b8 → 4.4.3-29618876.1bd346ee

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,10 @@ export default defineNuxtConfig({
32
32
  experimental: {
33
33
  defaults: {
34
34
  nuxtLink: {
35
- prefetchOn: 'interaction',
35
+ prefetchOn: {
36
+ interaction: true,
37
+ visibility: false,
38
+ },
36
39
  },
37
40
  },
38
41
  },
@@ -290,6 +290,25 @@ function setup () {
290
290
  ```
291
291
  ::
292
292
 
293
+ ## Add Route Middleware
294
+
295
+ ```ts
296
+ import { addRouteMiddleware, createResolver, defineNuxtModule } from '@nuxt/kit'
297
+
298
+ export default defineNuxtModule({
299
+ setup (options, nuxt) {
300
+ const resolver = createResolver(import.meta.url)
301
+
302
+ // example to add a global route middleware
303
+ addRouteMiddleware({
304
+ global: true,
305
+ name: 'name-of-your-middleware',
306
+ path: resolver.resolve('./runtime/middleware/name-of-your-middleware'),
307
+ })
308
+ },
309
+ })
310
+ ```
311
+
293
312
  ## Add Server Routes
294
313
 
295
314
  ```ts
@@ -9,7 +9,7 @@ links:
9
9
  ---
10
10
 
11
11
  ::important
12
- This component is available in Nuxt v3.17+.
12
+ This component is available in Nuxt v4.4.2+.
13
13
  ::
14
14
 
15
15
  ## Usage
@@ -9,7 +9,7 @@ links:
9
9
  ---
10
10
 
11
11
  ::important
12
- This composable is available in Nuxt v3.17+.
12
+ This composable is available in Nuxt v4.4.2+.
13
13
  ::
14
14
 
15
15
  ## Description
@@ -151,7 +151,7 @@ interface PageMeta {
151
151
 
152
152
  - **Type**: `boolean | (to: RouteLocationNormalized, from: RouteLocationNormalized) => boolean`
153
153
 
154
- Tell Nuxt to scroll to the top before rendering the page or not. If you want to overwrite the default scroll behavior of Nuxt, you can do so in `~/router.options.ts` (see [custom routing](/docs/4.x/guide/recipes/custom-routing#using-routeroptions)) for more info.
154
+ Tell Nuxt to scroll to the top before rendering the page or not. Navigation is independent from rendering, so scroll behavior is always triggered even when the page doesn't re-render (e.g. when using a fixed [`key`](/docs/4.x/api/utils/define-page-meta#key)). Set `scrollToTop: false` to disable scrolling in such cases. If you want to overwrite the default scroll behavior of Nuxt, you can do so in `~/router.options.ts` (see [custom routing](/docs/4.x/guide/recipes/custom-routing#using-routeroptions)) for more info.
155
155
 
156
156
  **`[key: string]`**
157
157
 
@@ -40,10 +40,8 @@ In addition to the Nuxt framework, there are modules that are vital for the ecos
40
40
 
41
41
  | Module | Status | Nuxt Support | Repository | Description |
42
42
  |----------------------------------------|--------------|--------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
43
- | [Scripts](https://scripts.nuxt.com) | Public Beta | 3.x, 4.x | [nuxt/scripts](https://github.com/nuxt/scripts) | Easy 3rd party script management. |
44
43
  | Auth Utils | Planned | 4.x, 5.x | `nuxt/auth-utils` to be announced | The temporary repository [atinux/nuxt-auth-utils](https://github.com/atinux/nuxt-auth-utils) is available while awaiting its official integration into Nuxt via RFC. |
45
44
  | [a11y](https://github.com/nuxt/a11y) | Public Alpha | 3.x, 4.x | [nuxt/a11y](https://github.com/nuxt/a11y). | Real-time accessibility feedback and automated testing in your browser during development (see [nuxt/nuxt#23255](https://github.com/nuxt/nuxt/issues/23255)). |
46
- | [Hints](https://github.com/nuxt/hints) | Public Alpha | 4.x, 5.x | [nuxt/hints](https://github.com/nuxt/hints) | Guidance and suggestions for enhancing development practices. |
47
45
 
48
46
  ## Release Cycle
49
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/docs-nightly",
3
- "version": "4.4.3-29594048.ac9e25b8",
3
+ "version": "4.4.3-29618876.1bd346ee",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",