diff --git a/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/ScreenLifecycle.kt b/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/ScreenLifecycle.kt index b6c8bbe4..7252de29 100644 --- a/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/ScreenLifecycle.kt +++ b/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/ScreenLifecycle.kt @@ -30,7 +30,6 @@ public fun rememberScreenLifecycleOwner( } @Composable -@ExperimentalVoyagerApi @InternalVoyagerApi public fun getNavigatorScreenLifecycleProvider(screen: Screen): List { val navigatorScreenLifecycleProvider = LocalNavigatorScreenLifecycleProvider.current diff --git a/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/multipleScreenLifecycleOwnerUtil.kt b/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/multipleScreenLifecycleOwnerUtil.kt index f660786a..c21a3f7b 100644 --- a/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/multipleScreenLifecycleOwnerUtil.kt +++ b/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/multipleScreenLifecycleOwnerUtil.kt @@ -5,7 +5,6 @@ import androidx.compose.runtime.remember import cafe.adriel.voyager.core.annotation.ExperimentalVoyagerApi import cafe.adriel.voyager.core.annotation.InternalVoyagerApi -@ExperimentalVoyagerApi @InternalVoyagerApi @Composable public fun MultipleProvideBeforeScreenContent( diff --git a/voyager-hilt/src/main/java/cafe/adriel/voyager/hilt/ScreenModel.kt b/voyager-hilt/src/main/java/cafe/adriel/voyager/hilt/ScreenModel.kt index 26dce615..b912b800 100644 --- a/voyager-hilt/src/main/java/cafe/adriel/voyager/hilt/ScreenModel.kt +++ b/voyager-hilt/src/main/java/cafe/adriel/voyager/hilt/ScreenModel.kt @@ -66,7 +66,6 @@ public inline fun Scre * * @return A new instance of [ScreenModel] or the same instance remembered by the composition */ -@ExperimentalVoyagerApi @Composable public inline fun Navigator.getNavigatorScreenModel( tag: String? = null @@ -93,7 +92,6 @@ public inline fun Navigator.getNavigatorScreenModel( * @param factory A function that receives a [ScreenModelFactory] and returns a [ScreenModel] created by the custom factory * @return A new instance of [ScreenModel] or the same instance remembered by the composition */ -@ExperimentalVoyagerApi @Composable public inline fun Navigator.getNavigatorScreenModel( tag: String? = null, diff --git a/voyager-kodein/src/commonMain/kotlin/cafe/adriel/voyager/kodein/ScreenModel.kt b/voyager-kodein/src/commonMain/kotlin/cafe/adriel/voyager/kodein/ScreenModel.kt index a9057f79..55a1a861 100644 --- a/voyager-kodein/src/commonMain/kotlin/cafe/adriel/voyager/kodein/ScreenModel.kt +++ b/voyager-kodein/src/commonMain/kotlin/cafe/adriel/voyager/kodein/ScreenModel.kt @@ -26,7 +26,6 @@ public inline fun Screen.rememberScre rememberScreenModel(tag = tag?.toString()) { direct.provider(tag, arg)() } } -@ExperimentalVoyagerApi @Composable public inline fun Navigator.rememberNavigatorScreenModel( tag: Any? = null @@ -34,7 +33,6 @@ public inline fun Navigator.rememberNavigatorScreenMod rememberNavigatorScreenModel(tag = tag?.toString()) { direct.provider(tag)() } } -@ExperimentalVoyagerApi @Composable public inline fun Navigator.rememberNavigatorScreenModel( tag: Any? = null, diff --git a/voyager-koin/src/commonMain/kotlin/cafe/adriel/voyager/koin/ScreenModel.kt b/voyager-koin/src/commonMain/kotlin/cafe/adriel/voyager/koin/ScreenModel.kt index b01a3a9a..1c305433 100644 --- a/voyager-koin/src/commonMain/kotlin/cafe/adriel/voyager/koin/ScreenModel.kt +++ b/voyager-koin/src/commonMain/kotlin/cafe/adriel/voyager/koin/ScreenModel.kt @@ -20,7 +20,6 @@ public inline fun Screen.getScreenModel( return rememberScreenModel(tag = qualifier?.value) { koin.get(qualifier, parameters) } } -@ExperimentalVoyagerApi @Composable public inline fun Navigator.getNavigatorScreenModel( qualifier: Qualifier? = null, diff --git a/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorDisposable.kt b/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorDisposable.kt index e385c398..8a4314fb 100644 --- a/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorDisposable.kt +++ b/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorDisposable.kt @@ -3,7 +3,6 @@ package cafe.adriel.voyager.navigator.lifecycle import cafe.adriel.voyager.core.annotation.ExperimentalVoyagerApi import cafe.adriel.voyager.navigator.Navigator -@ExperimentalVoyagerApi public interface NavigatorDisposable { public fun onDispose(navigator: Navigator) } diff --git a/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorLifecycleStore.kt b/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorLifecycleStore.kt index 3b9022d2..e248151e 100644 --- a/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorLifecycleStore.kt +++ b/voyager-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/lifecycle/NavigatorLifecycleStore.kt @@ -8,7 +8,6 @@ import kotlin.reflect.typeOf public typealias NavigatorKey = String -@ExperimentalVoyagerApi public object NavigatorLifecycleStore { private val owners = ThreadSafeMap>() @@ -17,16 +16,15 @@ public object NavigatorLifecycleStore { * Register a NavigatorDisposable that will be called `onDispose` on the * [navigator] leaves the Composition. */ - @ExperimentalVoyagerApi - public inline fun register( + public inline fun get( navigator: Navigator, noinline factory: (NavigatorKey) -> T ): T { - return register(navigator, typeOf(), factory) as T + return get(navigator, typeOf(), factory) as T } @PublishedApi - internal fun register( + internal fun get( navigator: Navigator, screenDisposeListenerType: KType, factory: (NavigatorKey) -> T @@ -40,7 +38,6 @@ public object NavigatorLifecycleStore { } } - @ExperimentalVoyagerApi public fun remove(navigator: Navigator) { owners.remove(navigator.key)?.forEach { it.value.onDispose(navigator) } } diff --git a/voyager-screenmodel/src/commonMain/kotlin/cafe/adriel/voyager/core/model/NavigatorScreenModel.kt b/voyager-screenmodel/src/commonMain/kotlin/cafe/adriel/voyager/core/model/NavigatorScreenModel.kt index 7c43086d..5b6a5215 100644 --- a/voyager-screenmodel/src/commonMain/kotlin/cafe/adriel/voyager/core/model/NavigatorScreenModel.kt +++ b/voyager-screenmodel/src/commonMain/kotlin/cafe/adriel/voyager/core/model/NavigatorScreenModel.kt @@ -9,7 +9,6 @@ import cafe.adriel.voyager.navigator.Navigator import cafe.adriel.voyager.navigator.lifecycle.NavigatorDisposable import cafe.adriel.voyager.navigator.lifecycle.NavigatorLifecycleStore -@ExperimentalVoyagerApi @Composable public inline fun Navigator.rememberNavigatorScreenModel( tag: String? = null, @@ -17,7 +16,7 @@ public inline fun Navigator.rememberNavigatorScreenMod ): T { // register the navigator lifecycle listener if is not already registered remember(this) { - NavigatorLifecycleStore.register(this) { NavigatorScreenModelDisposer } + NavigatorLifecycleStore.get(this) { NavigatorScreenModelDisposer } } return remember(ScreenModelStore.getKey(this.key, tag)) { diff --git a/voyager-tab-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/tab/TabNavigator.kt b/voyager-tab-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/tab/TabNavigator.kt index 6de9b221..d5bb8c20 100644 --- a/voyager-tab-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/tab/TabNavigator.kt +++ b/voyager-tab-navigator/src/commonMain/kotlin/cafe/adriel/voyager/navigator/tab/TabNavigator.kt @@ -45,7 +45,6 @@ public fun TabNavigator( } } -@ExperimentalVoyagerApi @Composable public fun TabDisposable(navigator: TabNavigator, tabs: List) { DisposableEffectIgnoringConfiguration(Unit) {