Releases: hoc081098/solivagant
0.5.0
Update dependencies
- KotlinX Coroutines
1.9.0-RC.2
. - AndroidX Lifecycle
2.8.4
. - AndroidX Compose Activity
1.9.1
. - AndroidX Annotation
1.8.2
.
Added
-
StackValidationMode: Introduced a new sealed interface
StackValidationMode
to handle
different stack validation modes in the navigation stack. This interface includes three
implementations:Strict
: Ensures the stack is always in a valid state and throws an exception if it transitions
to an invalid state.Lenient
: Ensures the stack is always in a valid state but takes no action if it transitions to
an invalid state.Warning
: Ensures the stack is always in a valid state and logs a warning if it transitions to
an invalid state.
-
NavHost: Added a new parameter
stackValidationMode: StackValidationMode
to theNavHost
composable.
Default value isStackValidationMode.Lenient
.NavHost( startRoute = LoginScreenRoute, destinations = AllDestinations, navEventNavigator = navigator, destinationChangedCallback = { currentRoute = it }, stackValidationMode = StackValidationMode.Warning.Debug, // <--- Set the stack validation mode )
Fixed
Lifecycle*Effect
completion is now idempotent (i.e., if theonStopOrDispose
was called because
of the Lifecycle being stopped, it won’t be called a second time upon disposal unless the
Lifecycle goes back up toSTARTED
again).
0.4.0
0.3.0
0.2.2
0.2.1
0.2.0
Update dependencies
Added
- New: Add support for Kotlin/Wasm (
wasmJs
target) 🎉. - New: Add
LenientLifecycleRegistry
, aLifecycleRegistry
without the state checking,
and hasmoveTo
method to move to a specific state. This is a flexible version ofLifecycleRegistry
. - New: Add
rememberWindowLifecycleOwner()
for Desktop (JVM) platform. - New: Add
SavedStateSupport.ProvideCompositionLocals
andSavedStateSupport.ClearOnDispose
for non-Android platforms.
Fixed
- Fixed: an issue where
LocalLifecycleOwner
provided the wrongLifecycleOwner
to the content ofNavHost
composable.
Sample
- New: Add Solivagant Wasm Sample.
You can open the web application by running the./gradlew :samples:solivagant-wasm-sample:wasmJsBrowserDevelopmentRun
Gradle task.
0.1.1
Fixed
- Add workaround for issue
JetBrains/compose-multiplatform #3147 - Kotlin/Native can't use T::class in inline function of @Composable for iOS.
Example, docs and tests
- Add Compose Multiplatform Todo solivagant Sample:
A KMP template of the Todo App using Compose multiplatform for Android, Desktop, iOS and Web.
Share everything including data, domain, presentation, and UI.
0.1.0
Update dependencies
Added
- New: Add optional
transitionAnimations
parameter toNavHost
@composable functions.
Animations can be overridden withNavHostDefaults.transitionAnimations
or disabled withNavHostTransitionAnimations.noAnimations
.
Default animations are the same as default animations in AndroidX'sNavHost
.
Changed
-
Breaking: Add a
Modifier
parameter tocontent
ofNavDestination
:@InternalNavigationApi public sealed interface ContentDestination<T : BaseRoute> : NavDestination { // other members... public val content: @Composable (route: T, modifier: Modifier) -> Unit }
This change effects
ScreenDestination
andOverlayDestination
as well.
Themodifier
parameter should be passed to thecontent
ofNavDestination
(a.k.a the root@Composable
of the destination), for example:@Immutable @Parcelize data class DetailScreenRoute(val id: String) : NavRoute @JvmField val DetailScreenDestination = ScreenDestination<DetailScreenRoute> { route, modifier -> DetailScreen(modifier = modifier, route = route) } @Composable internal fun DetailScreen(modifier: Modifier, route: DetailScreenRoute) { Scaffold( modifier = modifier, // <--- Pass the modifier to the root @Composable topBar = { /* ... */ }, ) { //* ... */ } }
0.0.1
-
Initial release of
solivagant
🔆.
Compose Multiplatform Navigation - 🌸 Pragmatic, type safety navigation for Compose Multiplatform.
Based on Freeletics Khonshu Navigation.
♥️ ViewModel, SavedStateHandle, Lifecycle, Multi-Backstacks, and more... -
Dependencies