Date: Thu, 4 Dec 2025 15:35:26 +0100
Subject: [PATCH 13/18] add a Deprecated imports sections
---
.../reference/modules/astro-transitions.mdx | 25 ++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/content/docs/en/reference/modules/astro-transitions.mdx b/src/content/docs/en/reference/modules/astro-transitions.mdx
index a93d04e3e0232..1d5cd6b4da125 100644
--- a/src/content/docs/en/reference/modules/astro-transitions.mdx
+++ b/src/content/docs/en/reference/modules/astro-transitions.mdx
@@ -114,12 +114,13 @@ import { slide } from 'astro:transitions';
```ts
import {
getFallback,
- isTransitionBeforePreparationEvent,
- isTransitionBeforeSwapEvent,
navigate,
supportsViewTransitions,
swapFunctions,
transitionEnabledOnThisPage,
+ /* The following are schedule for deprecation in v6: */
+ isTransitionBeforePreparationEvent,
+ isTransitionBeforeSwapEvent,
TRANSITION_AFTER_PREPARATION,
TRANSITION_AFTER_SWAP,
TRANSITION_BEFORE_PREPARATION,
@@ -300,7 +301,13 @@ Stores the element in focus on the current page and returns a function that when
Replaces the old body with the new body. Then, goes through every element in the old body that should be persisted and have a matching element in the new body and swaps the old element back in place.
-### `isTransitionBeforePreparationEvent`
+### Deprecated imports
+
+:::caution[Schedule for deprecation]
+The following imports are schedule for deprecation in v6. You can still use them in your project, but you may prefer to update your code now.
+:::
+
+#### `isTransitionBeforePreparationEvent()`
@@ -329,7 +336,7 @@ Determines whether the given value matches a [`TransitionBeforePreparationEvent`
```
-### `isTransitionBeforeSwapEvent`
+#### `isTransitionBeforeSwapEvent()`
@@ -358,7 +365,7 @@ Determines whether the given value matches a [`TransitionBeforeSwapEvent`](#tran
```
-### `TRANSITION_BEFORE_PREPARATION`
+#### `TRANSITION_BEFORE_PREPARATION`
@@ -381,7 +388,7 @@ A constant to avoid writing the `astro:before-preparation` event name in plain t
```
-### `TRANSITION_AFTER_PREPARATION`
+#### `TRANSITION_AFTER_PREPARATION`
@@ -404,7 +411,7 @@ A constant to avoid writing the `astro:after-preparation` event name in plain te
```
-### `TRANSITION_BEFORE_SWAP`
+#### `TRANSITION_BEFORE_SWAP`
@@ -427,7 +434,7 @@ A constant to avoid writing the `astro:before-swap` event name in plain text whe
```
-### `TRANSITION_AFTER_SWAP`
+#### `TRANSITION_AFTER_SWAP`
@@ -450,7 +457,7 @@ A constant to avoid writing the `astro:after-swap` event name in plain text when
```
-### `TRANSITION_PAGE_LOAD`
+#### `TRANSITION_PAGE_LOAD`
From 8da069d21ac6cde3e2590a40ea07dff6f3edbbd4 Mon Sep 17 00:00:00 2001
From: Armand Philippot
Date: Thu, 4 Dec 2025 15:51:00 +0100
Subject: [PATCH 14/18] fix links
---
src/content/docs/en/reference/modules/astro-transitions.mdx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/content/docs/en/reference/modules/astro-transitions.mdx b/src/content/docs/en/reference/modules/astro-transitions.mdx
index 1d5cd6b4da125..ee04d4197ef6b 100644
--- a/src/content/docs/en/reference/modules/astro-transitions.mdx
+++ b/src/content/docs/en/reference/modules/astro-transitions.mdx
@@ -538,7 +538,7 @@ A union of supported history navigation events.
-Represents an [`astro:before-preparation` event](#astrobefore-preparation). This can be useful to type the event received by a listener:
+Represents an [`astro:before-preparation` event](#astrobefore-preparation-event). This can be useful to type the event received by a listener:
```astro title="src/pages/index.astro" "TransitionBeforePreparationEvent"
---
@@ -566,7 +566,7 @@ Represents an [`astro:before-preparation` event](#astrobefore-preparation). This
-Represents an [`astro:before-swap` event](#astrobefore-swap). This can be useful to type the event received by a listener:
+Represents an [`astro:before-swap` event](#astrobefore-swap-event). This can be useful to type the event received by a listener:
```astro title="src/pages/index.astro" "TransitionBeforeSwapEvent"
---
From d82ce257b7fd9888ca3bdee178cc1e185d3f8c7a Mon Sep 17 00:00:00 2001
From: Armand Philippot
Date: Thu, 4 Dec 2025 16:14:11 +0100
Subject: [PATCH 15/18] hide the deprecated imports from the toc?
---
.../en/reference/modules/astro-transitions.mdx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/content/docs/en/reference/modules/astro-transitions.mdx b/src/content/docs/en/reference/modules/astro-transitions.mdx
index ee04d4197ef6b..c92c09d10c68e 100644
--- a/src/content/docs/en/reference/modules/astro-transitions.mdx
+++ b/src/content/docs/en/reference/modules/astro-transitions.mdx
@@ -307,7 +307,7 @@ Replaces the old body with the new body. Then, goes through every element in the
The following imports are schedule for deprecation in v6. You can still use them in your project, but you may prefer to update your code now.
:::
-#### `isTransitionBeforePreparationEvent()`
+`isTransitionBeforePreparationEvent()`
@@ -336,7 +336,7 @@ Determines whether the given value matches a [`TransitionBeforePreparationEvent`
```
-#### `isTransitionBeforeSwapEvent()`
+
`isTransitionBeforeSwapEvent()`
@@ -365,7 +365,7 @@ Determines whether the given value matches a [`TransitionBeforeSwapEvent`](#tran
```
-#### `TRANSITION_BEFORE_PREPARATION`
+
`TRANSITION_BEFORE_PREPARATION`
@@ -388,7 +388,7 @@ A constant to avoid writing the `astro:before-preparation` event name in plain t
```
-#### `TRANSITION_AFTER_PREPARATION`
+
`TRANSITION_AFTER_PREPARATION`
@@ -411,7 +411,7 @@ A constant to avoid writing the `astro:after-preparation` event name in plain te
```
-#### `TRANSITION_BEFORE_SWAP`
+
`TRANSITION_BEFORE_SWAP`
@@ -434,7 +434,7 @@ A constant to avoid writing the `astro:before-swap` event name in plain text whe
```
-#### `TRANSITION_AFTER_SWAP`
+
`TRANSITION_AFTER_SWAP`
@@ -457,7 +457,7 @@ A constant to avoid writing the `astro:after-swap` event name in plain text when
```
-#### `TRANSITION_PAGE_LOAD`
+
`TRANSITION_PAGE_LOAD`
From 794ecd12c88de20099fe0aff3845c3b1e3d48893 Mon Sep 17 00:00:00 2001
From: Armand Philippot
Date: Thu, 4 Dec 2025 22:28:31 +0100
Subject: [PATCH 16/18] Thanks Sarah
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
---
.../docs/en/reference/modules/astro-transitions.mdx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/content/docs/en/reference/modules/astro-transitions.mdx b/src/content/docs/en/reference/modules/astro-transitions.mdx
index c92c09d10c68e..5850436ce4a80 100644
--- a/src/content/docs/en/reference/modules/astro-transitions.mdx
+++ b/src/content/docs/en/reference/modules/astro-transitions.mdx
@@ -118,7 +118,7 @@ import {
supportsViewTransitions,
swapFunctions,
transitionEnabledOnThisPage,
- /* The following are schedule for deprecation in v6: */
+ /* The following are scheduled for deprecation in v6: */
isTransitionBeforePreparationEvent,
isTransitionBeforeSwapEvent,
TRANSITION_AFTER_PREPARATION,
@@ -233,10 +233,11 @@ Whether or not the current page has view transitions enabled for client-side nav
**Type:** () => Fallback
+**Default:** `animate`
-Returns the fallback strategy to use in browsers that do not support view transitions. This returns `animate` by default when the strategy has not been overridden.
+Returns the fallback strategy to use (`animate` by default) in browsers that do not support view transitions.
See the guide on [Fallback control](/en/guides/view-transitions/#fallback-control) for how to choose and configure the fallback behavior.
@@ -303,8 +304,8 @@ Replaces the old body with the new body. Then, goes through every element in the
### Deprecated imports
-:::caution[Schedule for deprecation]
-The following imports are schedule for deprecation in v6. You can still use them in your project, but you may prefer to update your code now.
+:::caution[Scheduled for deprecation]
+The following imports are scheduled for deprecation in v6. You can still use them in your project, but you may prefer to update your code now.
:::
`isTransitionBeforePreparationEvent()`
From f6580ac3c91363f8d947aaf1df591a8324ca07af Mon Sep 17 00:00:00 2001
From: Armand Philippot
Date: Thu, 4 Dec 2025 22:36:00 +0100
Subject: [PATCH 17/18] revert `formData` description changes
---
src/content/docs/en/reference/modules/astro-transitions.mdx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/content/docs/en/reference/modules/astro-transitions.mdx b/src/content/docs/en/reference/modules/astro-transitions.mdx
index 5850436ce4a80..8f71dbb47fa3f 100644
--- a/src/content/docs/en/reference/modules/astro-transitions.mdx
+++ b/src/content/docs/en/reference/modules/astro-transitions.mdx
@@ -168,7 +168,9 @@ This option follows the [`history` option](https://developer.mozilla.org/en-US/d
-When provided, the requests to the navigation target page will be sent as a `POST` request with the `FormData` object as the content.
+A `FormData` object for `POST` requests.
+
+When this option is provided, the requests to the navigation target page will be sent as a `POST` request with the form data object as the content.
Submitting an HTML form with view transitions enabled will use this method instead of the default navigation with page reload. Calling this method allows triggering the same behavior programmatically.
From 1ad0374af4d829761ea62342d5be3ba05a65d247 Mon Sep 17 00:00:00 2001
From: Armand Philippot
Date: Thu, 4 Dec 2025 22:38:43 +0100
Subject: [PATCH 18/18] add individual deprecation warnings
---
.../reference/modules/astro-transitions.mdx | 30 +++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/src/content/docs/en/reference/modules/astro-transitions.mdx b/src/content/docs/en/reference/modules/astro-transitions.mdx
index 8f71dbb47fa3f..8f5cdf417f372 100644
--- a/src/content/docs/en/reference/modules/astro-transitions.mdx
+++ b/src/content/docs/en/reference/modules/astro-transitions.mdx
@@ -306,9 +306,7 @@ Replaces the old body with the new body. Then, goes through every element in the
### Deprecated imports
-:::caution[Scheduled for deprecation]
The following imports are scheduled for deprecation in v6. You can still use them in your project, but you may prefer to update your code now.
-:::
`isTransitionBeforePreparationEvent()`
@@ -318,6 +316,10 @@ The following imports are scheduled for deprecation in v6. You can still use the
+:::caution[Scheduled for deprecation]
+This function is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
Determines whether the given value matches a [`TransitionBeforePreparationEvent`](#transitionbeforepreparationevent). This can be useful when you need to narrow the type of an event in an event listener.
```astro title="src/pages/index.astro" "isTransitionBeforePreparationEvent"
@@ -347,6 +349,10 @@ Determines whether the given value matches a [`TransitionBeforePreparationEvent`
+:::caution[Scheduled for deprecation]
+This function is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
Determines whether the given value matches a [`TransitionBeforeSwapEvent`](#transitionbeforeswapevent). This can be useful when you need to narrow the type of an event in an event listener.
```astro title="src/pages/index.astro" "isTransitionBeforeSwapEvent"
@@ -376,6 +382,10 @@ Determines whether the given value matches a [`TransitionBeforeSwapEvent`](#tran
+:::caution[Scheduled for deprecation]
+This constant is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
A constant to avoid writing the `astro:before-preparation` event name in plain text when you define an event.
```astro title="src/pages/index.astro" "TRANSITION_BEFORE_PREPARATION"
@@ -399,6 +409,10 @@ A constant to avoid writing the `astro:before-preparation` event name in plain t
+:::caution[Scheduled for deprecation]
+This constant is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
A constant to avoid writing the `astro:after-preparation` event name in plain text when you define an event.
```astro title="src/pages/index.astro" "TRANSITION_AFTER_PREPARATION"
@@ -422,6 +436,10 @@ A constant to avoid writing the `astro:after-preparation` event name in plain te
+:::caution[Scheduled for deprecation]
+This constant is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
A constant to avoid writing the `astro:before-swap` event name in plain text when you define an event.
```astro title="src/pages/index.astro" "TRANSITION_BEFORE_SWAP"
@@ -445,6 +463,10 @@ A constant to avoid writing the `astro:before-swap` event name in plain text whe
+:::caution[Scheduled for deprecation]
+This constant is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
A constant to avoid writing the `astro:after-swap` event name in plain text when you define an event.
```astro title="src/pages/index.astro" "TRANSITION_AFTER_SWAP"
@@ -468,6 +490,10 @@ A constant to avoid writing the `astro:after-swap` event name in plain text when
+:::caution[Scheduled for deprecation]
+This constant is scheduled for deprecation in v6. You can still use it in your project, but you may prefer to update your code now.
+:::
+
A constant to avoid writing the `astro:page-load` event name in plain text when you define an event.
```astro title="src/pages/index.astro" "TRANSITION_PAGE_LOAD"