arkivanov/Decompose (com.arkivanov.decompose:decompose)
### [`v3.1.0`](https://redirect.github.com/arkivanov/Decompose/releases/tag/3.1.0)
[Compare Source](https://redirect.github.com/arkivanov/Decompose/compare/3.0.0...3.1.0)
- Updated Kotlin to `2.0.0`, Compose to `1.6.10` and other dependencies ([#718](https://redirect.github.com/arkivanov/Decompose/issues/718))
- Add `onWebNavigation` callback to `WebHistoryController#attach` method to allow/deny navigation on browser forward/back button click ([#713](https://redirect.github.com/arkivanov/Decompose/issues/713) by [@gsteckman](https://redirect.github.com/gsteckman), [#724](https://redirect.github.com/arkivanov/Decompose/issues/724))
- Added `StackNavigator#popToFirst` extension function ([#722](https://redirect.github.com/arkivanov/Decompose/issues/722), [docs](https://arkivanov.github.io/Decompose/navigation/stack/navigation/#poptofirst))
#### Versions and dependencies
Kotlin: `2.0.0`
Essenty: `2.1.0`
kotlinx-serialization: `1.6.3`
Multiplatform Compose: `1.6.10`
### [`v3.0.0`](https://redirect.github.com/arkivanov/Decompose/releases/tag/3.0.0)
[Compare Source](https://redirect.github.com/arkivanov/Decompose/compare/2.2.3...3.0.0)
#### Changes since version 3.0.0-beta01
- Added `handleDeepLink` extension function ([#701](https://redirect.github.com/arkivanov/Decompose/issues/701), [#702](https://redirect.github.com/arkivanov/Decompose/issues/702))
- Promoted retainedComponent, onDecomposeError, pushNew, pushToFront and LifecycleController APIs to stable ([#704](https://redirect.github.com/arkivanov/Decompose/issues/704))
- Updated Essenty to 2.0.0 ([#703](https://redirect.github.com/arkivanov/Decompose/issues/703))
- Fixed a bug in MergedLifecycle when one of the lifecycles emits asynchronously ([#698](https://redirect.github.com/arkivanov/Decompose/issues/698))
#### Earlier changes since version 2.2.3
- Complete migration to `kotlinx-serialization` ([#553](https://redirect.github.com/arkivanov/Decompose/issues/553))
- Added support for the `wasmJs` target for browser ([#564](https://redirect.github.com/arkivanov/Decompose/issues/564))
- Renamed `extensions-compose-jetbrains` module to `extensions-compose` ([#559](https://redirect.github.com/arkivanov/Decompose/issues/559))
- Removed deprecated `Value#subscribe` and `Value#unsubscribe` methods ([#554](https://redirect.github.com/arkivanov/Decompose/issues/554))
- Renamed `predictiveBackAnimation` `animation` argument to `fallbackAnimation` ([#555](https://redirect.github.com/arkivanov/Decompose/issues/555))
- Added `STARTED` status to `ChildNavState` ([#557](https://redirect.github.com/arkivanov/Decompose/issues/557))
- Added API to discard saved state on Android ([#558](https://redirect.github.com/arkivanov/Decompose/issues/558))
- Support `WebHistoryController` on `wasmJs` by using serialization ([#569](https://redirect.github.com/arkivanov/Decompose/issues/569))
- Added `LocalStackAnimationProvider` for configuring a default stack animation ([#571](https://redirect.github.com/arkivanov/Decompose/issues/571) by [@LionZXY](https://redirect.github.com/LionZXY))
- Moved `PredictiveBackGestureOverlay` and `PredictiveBackGestureIcon` inside `predictiveback` package ([#614](https://redirect.github.com/arkivanov/Decompose/issues/614))
- Use `Cancellation` in `NavigationSource` ([#613](https://redirect.github.com/arkivanov/Decompose/issues/613))
- Added `discardSavedState` and `isStateSavingAllowed` arguments to `retainedComponent {}` function ([#594](https://redirect.github.com/arkivanov/Decompose/issues/594))
- Added `StackNavigator#pushToFront` extension function ([#593](https://redirect.github.com/arkivanov/Decompose/issues/593))
- Removed `StackNavigationSource`, `SlotNavigationSource` and `PagesNavigationSource` interfaces ([#626](https://redirect.github.com/arkivanov/Decompose/issues/626))
- Added `edgeWidth`, `startingOffsetThreshold` and `confirmationProgressThreshold` parameters for `PredictiveBackGestureOverlay` ([#622](https://redirect.github.com/arkivanov/Decompose/issues/622), see [#618](https://redirect.github.com/arkivanov/Decompose/issues/618))
- Animate predictive back gesture cancellation ([#620](https://redirect.github.com/arkivanov/Decompose/issues/620), see [#618](https://redirect.github.com/arkivanov/Decompose/issues/618))
- Removed `ApplicationLifecycle` and used the new one from Essenty ([#654](https://redirect.github.com/arkivanov/Decompose/issues/654))
- Added `androidPredictiveBackAnimatable` ([#652](https://redirect.github.com/arkivanov/Decompose/issues/652))
- Buffer navigation events during initialisation ([#645](https://redirect.github.com/arkivanov/Decompose/issues/645))
- Inlined the rest of navigation extensions with lambdas ([#648](https://redirect.github.com/arkivanov/Decompose/issues/648))
- Don't remove the first configuration on `popWhile` ([#646](https://redirect.github.com/arkivanov/Decompose/issues/646))
- Monitor window focused state in desktop `LifecycleController` ([#672](https://redirect.github.com/arkivanov/Decompose/issues/672), see [#671](https://redirect.github.com/arkivanov/Decompose/issues/671))
- Improved component context API for easier custom component contexts ([#670](https://redirect.github.com/arkivanov/Decompose/issues/670))
- Various bug fixes
#### Overall changes and improvements
##### The new `withDeepLink` extension function for Android
The new extensions function (`withDeepLink`) is now available for easier deep link handling on Android. Please see the [update docs](https://arkivanov.github.io/Decompose/navigation/stack/deeplinking/) for more information.
##### Migration to kotlinx-serialization
The migration to `kotlinx-serialization` is now completed, the support of Parcelable/Parcelize is removed. See the updated [docs](https://arkivanov.github.io/Decompose/component/state-preservation) for more information.
##### Changes in ChildNavState
The `ChildNavState.Status` enum (Generic Navigation) has changed and now includes `STARTED` variant. Please see the updated [docs](https://arkivanov.github.io/Decompose/navigation/children/overview/#childnavstate).
##### Removal of Value `subscribe` and `unsubscribe` methods
Previously deprecated methods `Value#subscribe` and `Value#unsubscribe` are removed. The `Value#observe` method returning `Cancellation` is renamed to `subscribe`. The `Value.observe(Lifecycle, ...)` method is also renamed to `subscribe`.
##### API to discard saved state on Android
##### New arguments in `defaultComponentContext` function
The `defaultComponentContext` function now accepts two new optional arguments:
- `discardSavedState` - a flag indicating whether any previously saved state should be discarded or not, default value is `false`. Can be useful for handling deep links in `onCreate`, so that the navigation state is not restored and initial state from the deep link is applied instead.
- `isStateSavingAllowed` - called before saving the state. When `true` then the state will be saved, otherwise it won't. Default value is `true`.
##### New arguments in `retainedComponent` function
The `retainedComponent {}` function got two new arguments with default values: `discardSavedState` and `isStateSavingAllowed`. The default behaviour is unchanged, though this change breaks binary compatibility.
##### Changes in Compose extensions
The `extensions-compose-jetpack` module is removed, the `extensions-compose-jetbrains` module is renamed to `extensions-compose`. Please update your dependencies accordingly and replace all `com.arkivanov.decompose.extensions.compose.jetbrains.*` imports with `com.arkivanov.decompose.extensions.compose.*`.
##### Compose for iOS, macOS and Web support
Now there is no need to use `-compose-experimental` version suffix. The support of Compose for iOS, macOS and Web is now published under the main version.
##### Compose for JS/Wasm
The new version supports Compose for Wasm (`wasmJs` target).
##### The new `StackNavigator#pushToFront` function
This release adds the new `StackNavigator#pushToFront` navigation function. See the [updated docs](https://arkivanov.github.io/Decompose/navigation/stack/navigation/#pushtofrontconfiguration) for details.
##### Using `Cancellation` in `NavigationSource`
The `NavigationSource#subscribe` method now returns `Cancellation`, the `NavigationSource#unsubscribe` method is removed. This is both source and binary incompatible change. Though, the source compatibility is only affected if there is a manual implementation of the `NavigationSource` interface.
##### Moved `PredictiveBackGestureOverlay` and `PredictiveBackGestureIcon`
`PredictiveBackGestureOverlay` and `PredictiveBackGestureIcon` are moved from `com.arkivanov.decompose.extensions.compose` package to `com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback`.
```diff
- import com.arkivanov.decompose.extensions.compose.PredictiveBackGestureOverlay
- import com.arkivanov.decompose.extensions.compose.PredictiveBackGestureIcon
+ import com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.PredictiveBackGestureOverlay
+ import com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.PredictiveBackGestureIcon
```
##### Changes in PredictiveBackAnimatable interface
The `PredictiveBackAnimatable` interface got the new method: `suspend fun cancel()`. This is required for animations when the predictive back gesture is cancelled.
##### Removed navigation source interfaces
The following interfaces were removed: `StackNavigationSource`, `SlotNavigationSource` and `PagesNavigationSource`. This change should be source compatible (meaning your project should still compile fine), unless you have custom implementations of those interfaces, in which case you have to implement the `NavigationSource` interface instead.
##### The improved ComponentContext API
This release brings improvements for the ComponentContext API. Please share your feedback or any issues you encounter. The idea is to make it easier to create and manage [custom component contexts](https://arkivanov.github.io/Decompose/component/custom-component-context/).
The change shouldn't break any source compatibility. However, if you have type parameters (generics) explicitly specified for functions `childStack`, `childSlot`, `childPages` or `children`, you will need to change your code in the following way. The rest should be compatible and require no changes in the code.
```diff
- val stack: Value> = childStack(...)
+ val stack: Value> = childStack<_, Config, Child>(...)
```
##### If you have a custom component context
Since this version you can now remove custom navigation extensions like `AppComponentContext.appChildStack`, `AppComponentContext.childAppContext`, etc. You will also need to update your custom component context definitions. Please see the updated [docs](https://arkivanov.github.io/Decompose/component/custom-component-context/).
##### Changes in `LifecycleController` for desktop (JVM)
The `LifecycleController` function now accepts an optional `WindowInfo` argument. If supplied, the `Lifecycle` will pause/resume when the window's focus state changes.
##### ApplicationLifecycle is moved to Essenty
`ApplicationLifecycle` for iOS and tvOS has been moved to Essenty.
If you are using `ApplicationLifecycle` in Kotlin, you will need to update imports.
```diff
- import com.arkivanov.decompose.lifecycle.ApplicationLifecycle
+ import com.arkivanov.essenty.lifecycle.ApplicationLifecycle
```
If you are using `ApplicationLifecycle` in Swift, you will need to export Essenty `lifecycle` module to iOS framework.
##### The new `androidPredictiveBackAnimatable` API
This release add a new predictive back animation style - the animation that is used e.g. in system settings on Pixel devices. See the updated [docs](https://arkivanov.github.io/Decompose/extensions/compose/#predefined-animations).
##### WebHistoryController on JS/Wasm
This release adds `WebHistoryController` for `wasmJs` target. It is shared with `js` target and now relies on `kotlinx-serialization`. The `WebHistoryController#attach` method got a new argument (`serializer: KSerializer`), which is a breaking change.
#### Versions and dependencies
Kotlin: `1.9.23`
Essenty: `2.0.0`
kotlinx-serialization: `1.6.2`
JetBrains Compose: `1.6.1`
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
2.2.3
->3.1.0
Release Notes
arkivanov/Decompose (com.arkivanov.decompose:decompose)
### [`v3.1.0`](https://redirect.github.com/arkivanov/Decompose/releases/tag/3.1.0) [Compare Source](https://redirect.github.com/arkivanov/Decompose/compare/3.0.0...3.1.0) - Updated Kotlin to `2.0.0`, Compose to `1.6.10` and other dependencies ([#718](https://redirect.github.com/arkivanov/Decompose/issues/718)) - Add `onWebNavigation` callback to `WebHistoryController#attach` method to allow/deny navigation on browser forward/back button click ([#713](https://redirect.github.com/arkivanov/Decompose/issues/713) by [@gsteckman](https://redirect.github.com/gsteckman), [#724](https://redirect.github.com/arkivanov/Decompose/issues/724)) - Added `StackNavigator#popToFirst` extension function ([#722](https://redirect.github.com/arkivanov/Decompose/issues/722), [docs](https://arkivanov.github.io/Decompose/navigation/stack/navigation/#poptofirst)) #### Versions and dependencies Kotlin: `2.0.0` Essenty: `2.1.0` kotlinx-serialization: `1.6.3` Multiplatform Compose: `1.6.10` ### [`v3.0.0`](https://redirect.github.com/arkivanov/Decompose/releases/tag/3.0.0) [Compare Source](https://redirect.github.com/arkivanov/Decompose/compare/2.2.3...3.0.0) #### Changes since version 3.0.0-beta01 - Added `handleDeepLink` extension function ([#701](https://redirect.github.com/arkivanov/Decompose/issues/701), [#702](https://redirect.github.com/arkivanov/Decompose/issues/702)) - Promoted retainedComponent, onDecomposeError, pushNew, pushToFront and LifecycleController APIs to stable ([#704](https://redirect.github.com/arkivanov/Decompose/issues/704)) - Updated Essenty to 2.0.0 ([#703](https://redirect.github.com/arkivanov/Decompose/issues/703)) - Fixed a bug in MergedLifecycle when one of the lifecycles emits asynchronously ([#698](https://redirect.github.com/arkivanov/Decompose/issues/698)) #### Earlier changes since version 2.2.3 - Complete migration to `kotlinx-serialization` ([#553](https://redirect.github.com/arkivanov/Decompose/issues/553)) - Added support for the `wasmJs` target for browser ([#564](https://redirect.github.com/arkivanov/Decompose/issues/564)) - Renamed `extensions-compose-jetbrains` module to `extensions-compose` ([#559](https://redirect.github.com/arkivanov/Decompose/issues/559)) - Removed deprecated `Value#subscribe` and `Value#unsubscribe` methods ([#554](https://redirect.github.com/arkivanov/Decompose/issues/554)) - Renamed `predictiveBackAnimation` `animation` argument to `fallbackAnimation` ([#555](https://redirect.github.com/arkivanov/Decompose/issues/555)) - Added `STARTED` status to `ChildNavState` ([#557](https://redirect.github.com/arkivanov/Decompose/issues/557)) - Added API to discard saved state on Android ([#558](https://redirect.github.com/arkivanov/Decompose/issues/558)) - Support `WebHistoryController` on `wasmJs` by using serialization ([#569](https://redirect.github.com/arkivanov/Decompose/issues/569)) - Added `LocalStackAnimationProvider` for configuring a default stack animation ([#571](https://redirect.github.com/arkivanov/Decompose/issues/571) by [@LionZXY](https://redirect.github.com/LionZXY)) - Moved `PredictiveBackGestureOverlay` and `PredictiveBackGestureIcon` inside `predictiveback` package ([#614](https://redirect.github.com/arkivanov/Decompose/issues/614)) - Use `Cancellation` in `NavigationSource` ([#613](https://redirect.github.com/arkivanov/Decompose/issues/613)) - Added `discardSavedState` and `isStateSavingAllowed` arguments to `retainedComponent {}` function ([#594](https://redirect.github.com/arkivanov/Decompose/issues/594)) - Added `StackNavigator#pushToFront` extension function ([#593](https://redirect.github.com/arkivanov/Decompose/issues/593)) - Removed `StackNavigationSource`, `SlotNavigationSource` and `PagesNavigationSource` interfaces ([#626](https://redirect.github.com/arkivanov/Decompose/issues/626)) - Added `edgeWidth`, `startingOffsetThreshold` and `confirmationProgressThreshold` parameters for `PredictiveBackGestureOverlay` ([#622](https://redirect.github.com/arkivanov/Decompose/issues/622), see [#618](https://redirect.github.com/arkivanov/Decompose/issues/618)) - Animate predictive back gesture cancellation ([#620](https://redirect.github.com/arkivanov/Decompose/issues/620), see [#618](https://redirect.github.com/arkivanov/Decompose/issues/618)) - Removed `ApplicationLifecycle` and used the new one from Essenty ([#654](https://redirect.github.com/arkivanov/Decompose/issues/654)) - Added `androidPredictiveBackAnimatable` ([#652](https://redirect.github.com/arkivanov/Decompose/issues/652)) - Buffer navigation events during initialisation ([#645](https://redirect.github.com/arkivanov/Decompose/issues/645)) - Inlined the rest of navigation extensions with lambdas ([#648](https://redirect.github.com/arkivanov/Decompose/issues/648)) - Don't remove the first configuration on `popWhile` ([#646](https://redirect.github.com/arkivanov/Decompose/issues/646)) - Monitor window focused state in desktop `LifecycleController` ([#672](https://redirect.github.com/arkivanov/Decompose/issues/672), see [#671](https://redirect.github.com/arkivanov/Decompose/issues/671)) - Improved component context API for easier custom component contexts ([#670](https://redirect.github.com/arkivanov/Decompose/issues/670)) - Various bug fixes #### Overall changes and improvements ##### The new `withDeepLink` extension function for Android The new extensions function (`withDeepLink`) is now available for easier deep link handling on Android. Please see the [update docs](https://arkivanov.github.io/Decompose/navigation/stack/deeplinking/) for more information. ##### Migration to kotlinx-serialization The migration to `kotlinx-serialization` is now completed, the support of Parcelable/Parcelize is removed. See the updated [docs](https://arkivanov.github.io/Decompose/component/state-preservation) for more information. ##### Changes in ChildNavState The `ChildNavState.Status` enum (Generic Navigation) has changed and now includes `STARTED` variant. Please see the updated [docs](https://arkivanov.github.io/Decompose/navigation/children/overview/#childnavstate). ##### Removal of Value `subscribe` and `unsubscribe` methods Previously deprecated methods `Value#subscribe` and `Value#unsubscribe` are removed. The `Value#observe` method returning `Cancellation` is renamed to `subscribe`. The `Value.observe(Lifecycle, ...)` method is also renamed to `subscribe`. ##### API to discard saved state on Android ##### New arguments in `defaultComponentContext` function The `defaultComponentContext` function now accepts two new optional arguments: - `discardSavedState` - a flag indicating whether any previously saved state should be discarded or not, default value is `false`. Can be useful for handling deep links in `onCreate`, so that the navigation state is not restored and initial state from the deep link is applied instead. - `isStateSavingAllowed` - called before saving the state. When `true` then the state will be saved, otherwise it won't. Default value is `true`. ##### New arguments in `retainedComponent` function The `retainedComponent {}` function got two new arguments with default values: `discardSavedState` and `isStateSavingAllowed`. The default behaviour is unchanged, though this change breaks binary compatibility. ##### Changes in Compose extensions The `extensions-compose-jetpack` module is removed, the `extensions-compose-jetbrains` module is renamed to `extensions-compose`. Please update your dependencies accordingly and replace all `com.arkivanov.decompose.extensions.compose.jetbrains.*` imports with `com.arkivanov.decompose.extensions.compose.*`. ##### Compose for iOS, macOS and Web support Now there is no need to use `-compose-experimental` version suffix. The support of Compose for iOS, macOS and Web is now published under the main version. ##### Compose for JS/Wasm The new version supports Compose for Wasm (`wasmJs` target). ##### The new `StackNavigator#pushToFront` function This release adds the new `StackNavigator#pushToFront` navigation function. See the [updated docs](https://arkivanov.github.io/Decompose/navigation/stack/navigation/#pushtofrontconfiguration) for details. ##### Using `Cancellation` in `NavigationSource` The `NavigationSource#subscribe` method now returns `Cancellation`, the `NavigationSource#unsubscribe` method is removed. This is both source and binary incompatible change. Though, the source compatibility is only affected if there is a manual implementation of the `NavigationSource` interface. ##### Moved `PredictiveBackGestureOverlay` and `PredictiveBackGestureIcon` `PredictiveBackGestureOverlay` and `PredictiveBackGestureIcon` are moved from `com.arkivanov.decompose.extensions.compose` package to `com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback`. ```diff - import com.arkivanov.decompose.extensions.compose.PredictiveBackGestureOverlay - import com.arkivanov.decompose.extensions.compose.PredictiveBackGestureIcon + import com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.PredictiveBackGestureOverlay + import com.arkivanov.decompose.extensions.compose.stack.animation.predictiveback.PredictiveBackGestureIcon ``` ##### Changes in PredictiveBackAnimatable interface The `PredictiveBackAnimatable` interface got the new method: `suspend fun cancel()`. This is required for animations when the predictive back gesture is cancelled. ##### Removed navigation source interfaces The following interfaces were removed: `StackNavigationSource`, `SlotNavigationSource` and `PagesNavigationSource`. This change should be source compatible (meaning your project should still compile fine), unless you have custom implementations of those interfaces, in which case you have to implement the `NavigationSource` interface instead. ##### The improved ComponentContext API This release brings improvements for the ComponentContext API. Please share your feedback or any issues you encounter. The idea is to make it easier to create and manage [custom component contexts](https://arkivanov.github.io/Decompose/component/custom-component-context/). The change shouldn't break any source compatibility. However, if you have type parameters (generics) explicitly specified for functions `childStack`, `childSlot`, `childPages` or `children`, you will need to change your code in the following way. The rest should be compatible and require no changes in the code. ```diff - val stack: ValueConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.