diff --git a/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt b/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt index a33ad9010..73353b4fa 100644 --- a/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt +++ b/appyx-components/experimental/cards/android/src/main/kotlin/com/bumble/appyx/components/experimental/cards/android/DatingCards.kt @@ -12,12 +12,12 @@ import androidx.compose.ui.unit.dp import com.bumble.appyx.components.experimental.cards.Cards import com.bumble.appyx.components.experimental.cards.CardsModel import com.bumble.appyx.components.experimental.cards.ui.CardsVisualisation +import com.bumble.appyx.demos.common.profile.Profile +import com.bumble.appyx.demos.common.profile.ProfileCard import com.bumble.appyx.interactions.core.AppyxInteractionsContainer import com.bumble.appyx.interactions.core.gesture.GestureValidator.Companion.permissiveValidator import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup import com.bumble.appyx.interactions.theme.appyx_dark -import com.bumble.appyx.samples.common.profile.Profile -import com.bumble.appyx.samples.common.profile.ProfileCard import kotlin.math.roundToInt @Composable diff --git a/demos/appyx-interactions/desktop/src/desktopMain/kotlin/com/bumble/appyx/interactions/widgets/Widgets.kt b/demos/appyx-interactions/desktop/src/desktopMain/kotlin/com/bumble/appyx/interactions/widgets/Widgets.kt index 7714fc20b..64bfc2af3 100644 --- a/demos/appyx-interactions/desktop/src/desktopMain/kotlin/com/bumble/appyx/interactions/widgets/Widgets.kt +++ b/demos/appyx-interactions/desktop/src/desktopMain/kotlin/com/bumble/appyx/interactions/widgets/Widgets.kt @@ -18,15 +18,15 @@ import com.bumble.appyx.components.spotlight.SpotlightModel import com.bumble.appyx.components.spotlight.operation.next import com.bumble.appyx.components.spotlight.operation.previous import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider +import com.bumble.appyx.demos.common.widget.CalendarWidget +import com.bumble.appyx.demos.common.widget.TimerWidget +import com.bumble.appyx.demos.common.widget.WeatherWidget import com.bumble.appyx.interactions.Events import com.bumble.appyx.interactions.core.AppyxInteractionsContainer import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig import com.bumble.appyx.interactions.core.ui.helper.AppyxComponentSetup import com.bumble.appyx.interactions.core.ui.output.ElementUiModel import com.bumble.appyx.interactions.widgets.ui.WidgetsStack3D -import com.bumble.appyx.samples.common.widget.CalendarWidget -import com.bumble.appyx.samples.common.widget.TimerWidget -import com.bumble.appyx.samples.common.widget.WeatherWidget import kotlinx.coroutines.flow.Flow enum class WidgetsType { diff --git a/demos/appyx-navigation/android/src/main/AndroidManifest.xml b/demos/appyx-navigation/android/src/main/AndroidManifest.xml index 681bd756e..2bab77e25 100644 --- a/demos/appyx-navigation/android/src/main/AndroidManifest.xml +++ b/demos/appyx-navigation/android/src/main/AndroidManifest.xml @@ -8,7 +8,7 @@ android:supportsRtl="true" android:theme="@style/Theme.Appyx"> diff --git a/demos/appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/MainActivity.kt b/demos/appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/navigation/MainActivity.kt similarity index 92% rename from demos/appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/MainActivity.kt rename to demos/appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/navigation/MainActivity.kt index a0f1a6df9..7bb8504d5 100644 --- a/demos/appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/MainActivity.kt +++ b/demos/appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/navigation/MainActivity.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.navigation import android.content.Intent import android.net.Uri @@ -15,15 +15,16 @@ import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.ExperimentalUnitApi import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen +import com.bumble.appyx.demos.navigation.navigator.LocalNavigator +import com.bumble.appyx.demos.navigation.navigator.Navigator +import com.bumble.appyx.demos.navigation.node.root.RootNode +import com.bumble.appyx.demos.navigation.ui.AppyxSampleAppTheme +import com.bumble.appyx.navigation.BuildConfig import com.bumble.appyx.navigation.integration.NodeActivity import com.bumble.appyx.navigation.integration.NodeHost import com.bumble.appyx.navigation.modality.NodeContext -import com.bumble.appyx.navigation.navigator.LocalNavigator -import com.bumble.appyx.navigation.navigator.Navigator -import com.bumble.appyx.navigation.node.root.RootNode import com.bumble.appyx.navigation.platform.AndroidLifecycle import com.bumble.appyx.navigation.plugin.NodeReadyObserver -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme import com.google.android.material.snackbar.Snackbar @ExperimentalUnitApi diff --git a/demos/appyx-navigation/common/build.gradle.kts b/demos/appyx-navigation/common/build.gradle.kts index d4624f33b..54198efa0 100644 --- a/demos/appyx-navigation/common/build.gradle.kts +++ b/demos/appyx-navigation/common/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } appyx { - androidNamespace.set("com.bumble.appyx.navigation.demo") + androidNamespace.set("com.bumble.appyx.demos.navigation.common") } kotlin { diff --git a/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt new file mode 100644 index 000000000..76bf76553 --- /dev/null +++ b/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt @@ -0,0 +1,3 @@ +package com.bumble.appyx.demos.navigation.platform + +actual fun getPlatformName(): String = "Android" diff --git a/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt b/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt similarity index 91% rename from demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt rename to demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt index e176f954d..18338254f 100644 --- a/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt +++ b/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt deleted file mode 100644 index 6caee40c2..000000000 --- a/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.bumble.appyx.navigation.platform - -actual fun getPlatformName(): String = "Android" diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/Ext.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/Ext.kt new file mode 100644 index 000000000..49dbfb865 --- /dev/null +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/Ext.kt @@ -0,0 +1,35 @@ +package com.bumble.appyx.demos.navigation + +import com.bumble.appyx.demos.navigation.ui.atomic_tangerine +import com.bumble.appyx.demos.navigation.ui.manatee +import com.bumble.appyx.demos.navigation.ui.md_amber_500 +import com.bumble.appyx.demos.navigation.ui.md_blue_500 +import com.bumble.appyx.demos.navigation.ui.md_blue_grey_500 +import com.bumble.appyx.demos.navigation.ui.md_cyan_500 +import com.bumble.appyx.demos.navigation.ui.md_grey_500 +import com.bumble.appyx.demos.navigation.ui.md_indigo_500 +import com.bumble.appyx.demos.navigation.ui.md_light_blue_500 +import com.bumble.appyx.demos.navigation.ui.md_light_green_500 +import com.bumble.appyx.demos.navigation.ui.md_lime_500 +import com.bumble.appyx.demos.navigation.ui.md_pink_500 +import com.bumble.appyx.demos.navigation.ui.md_teal_500 +import com.bumble.appyx.demos.navigation.ui.silver_sand +import com.bumble.appyx.demos.navigation.ui.sizzling_red + +val colors = listOf( + manatee, + sizzling_red, + atomic_tangerine, + silver_sand, + md_pink_500, + md_indigo_500, + md_blue_500, + md_light_blue_500, + md_cyan_500, + md_teal_500, + md_light_green_500, + md_lime_500, + md_amber_500, + md_grey_500, + md_blue_grey_500 +) diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/ExitHeroModeStrategy.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/ExitHeroModeStrategy.kt similarity index 71% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/ExitHeroModeStrategy.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/ExitHeroModeStrategy.kt index 75f7bcfff..e1b2ba32e 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/ExitHeroModeStrategy.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/ExitHeroModeStrategy.kt @@ -1,12 +1,12 @@ -package com.bumble.appyx.navigation.component.spotlighthero +package com.bumble.appyx.demos.navigation.component.spotlighthero import androidx.compose.animation.core.AnimationSpec import com.bumble.appyx.interactions.core.model.backpresshandlerstrategies.BaseBackPressHandlerStrategy import com.bumble.appyx.mapState -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST -import com.bumble.appyx.navigation.component.spotlighthero.operation.SetHeroMode +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.SetHeroMode import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.StateFlow diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/SpotlightHero.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/SpotlightHero.kt similarity index 91% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/SpotlightHero.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/SpotlightHero.kt index da396f5b6..ae192e9d0 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/SpotlightHero.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/SpotlightHero.kt @@ -1,9 +1,11 @@ -package com.bumble.appyx.navigation.component.spotlighthero +package com.bumble.appyx.demos.navigation.component.spotlighthero import androidx.compose.animation.core.AnimationSpec import androidx.compose.animation.core.spring import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.State +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.SpotlightHeroVisualisation import com.bumble.appyx.interactions.core.model.BaseAppyxComponent import com.bumble.appyx.interactions.core.ui.Visualisation import com.bumble.appyx.interactions.core.ui.context.TransitionBounds @@ -11,8 +13,6 @@ import com.bumble.appyx.interactions.core.ui.context.UiContext import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig import com.bumble.appyx.mapState -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.State -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.SpotlightHeroVisualisation import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/SpotlightHeroModel.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/SpotlightHeroModel.kt similarity index 93% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/SpotlightHeroModel.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/SpotlightHeroModel.kt index 99af76138..7bef512b1 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/SpotlightHeroModel.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/SpotlightHeroModel.kt @@ -1,9 +1,9 @@ -package com.bumble.appyx.navigation.component.spotlighthero +package com.bumble.appyx.demos.navigation.component.spotlighthero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.State import com.bumble.appyx.interactions.core.Element import com.bumble.appyx.interactions.core.asElement import com.bumble.appyx.interactions.core.model.transition.BaseTransitionModel -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.State import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize import com.bumble.appyx.utils.multiplatform.RawValue diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Activate.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Activate.kt similarity index 83% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Activate.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Activate.kt index 1cbae47a9..64ea43a9e 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Activate.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Activate.kt @@ -1,10 +1,10 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero import com.bumble.appyx.utils.multiplatform.Parcelize @Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/First.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/First.kt similarity index 82% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/First.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/First.kt index 7be16906a..9ea297746 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/First.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/First.kt @@ -1,10 +1,10 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Last.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Last.kt similarity index 82% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Last.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Last.kt index c80b818e2..94ecf5cfe 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Last.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Last.kt @@ -1,10 +1,10 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Next.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Next.kt similarity index 82% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Next.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Next.kt index 471ef50fe..1c4757aaa 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Next.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Next.kt @@ -1,10 +1,10 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.utils.multiplatform.Parcelize @Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Previous.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Previous.kt similarity index 82% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Previous.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Previous.kt index e672bcd0f..a2e481bd0 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/Previous.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/Previous.kt @@ -1,10 +1,10 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/SetHeroMode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/SetHeroMode.kt similarity index 76% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/SetHeroMode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/SetHeroMode.kt index 5471cbcd9..c07882dad 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/SetHeroMode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/SetHeroMode.kt @@ -1,11 +1,11 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.State import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.State import com.bumble.appyx.utils.multiplatform.Parcelize @Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/ToggleHeroMode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/ToggleHeroMode.kt similarity index 71% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/ToggleHeroMode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/ToggleHeroMode.kt index 37d790049..fec63b3ef 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/operation/ToggleHeroMode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/operation/ToggleHeroMode.kt @@ -1,12 +1,12 @@ -package com.bumble.appyx.navigation.component.spotlighthero.operation +package com.bumble.appyx.demos.navigation.component.spotlighthero.operation import androidx.compose.animation.core.AnimationSpec +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.State import com.bumble.appyx.interactions.core.model.transition.BaseOperation import com.bumble.appyx.interactions.core.model.transition.Operation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.State import com.bumble.appyx.utils.multiplatform.Parcelize @Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/SpotlightHeroGestures.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/SpotlightHeroGestures.kt similarity index 72% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/SpotlightHeroGestures.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/SpotlightHeroGestures.kt index 1e103fae0..a36456390 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/SpotlightHeroGestures.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/SpotlightHeroGestures.kt @@ -1,18 +1,18 @@ -package com.bumble.appyx.navigation.component.spotlighthero.visualisation +package com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation import androidx.compose.ui.geometry.Offset import androidx.compose.ui.unit.Density +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.Next +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.Previous +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.SetHeroMode import com.bumble.appyx.interactions.core.ui.context.TransitionBounds import com.bumble.appyx.interactions.core.ui.gesture.Drag import com.bumble.appyx.interactions.core.ui.gesture.Gesture import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory import com.bumble.appyx.interactions.core.ui.gesture.dragDirection4 -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST -import com.bumble.appyx.navigation.component.spotlighthero.operation.Next -import com.bumble.appyx.navigation.component.spotlighthero.operation.Previous -import com.bumble.appyx.navigation.component.spotlighthero.operation.SetHeroMode class SpotlightHeroGestures( transitionBounds: TransitionBounds, diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/SpotlightHeroVisualisation.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/SpotlightHeroVisualisation.kt new file mode 100644 index 000000000..0bac9a32f --- /dev/null +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/SpotlightHeroVisualisation.kt @@ -0,0 +1,11 @@ +package com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation + +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.property.HeroProgress +import com.bumble.appyx.interactions.core.ui.Visualisation + +interface SpotlightHeroVisualisation : + Visualisation> { + + val heroProgress: HeroProgress +} diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/default/SpotlightHeroDefaultVisualisation.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/default/SpotlightHeroDefaultVisualisation.kt similarity index 89% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/default/SpotlightHeroDefaultVisualisation.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/default/SpotlightHeroDefaultVisualisation.kt index 1cde4ca54..6ed145c3c 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/default/SpotlightHeroDefaultVisualisation.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/default/SpotlightHeroDefaultVisualisation.kt @@ -1,7 +1,12 @@ -package com.bumble.appyx.navigation.component.spotlighthero.visualisation.default +package com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.default import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.State +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.SpotlightHeroVisualisation +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.property.HeroProgress import com.bumble.appyx.interactions.core.ui.context.UiContext import com.bumble.appyx.interactions.core.ui.property.impl.AspectRatio import com.bumble.appyx.interactions.core.ui.property.impl.GenericFloatProperty @@ -14,11 +19,6 @@ import com.bumble.appyx.interactions.core.ui.property.impl.position.BiasAlignmen import com.bumble.appyx.interactions.core.ui.property.impl.position.PositionAlignment import com.bumble.appyx.interactions.core.ui.property.impl.position.PositionOffset import com.bumble.appyx.interactions.core.ui.state.MatchedTargetUiState -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.State -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.SpotlightHeroVisualisation -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.property.HeroProgress import com.bumble.appyx.transitionmodel.BaseVisualisation class SpotlightHeroDefaultVisualisation( diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/default/TargetUiState.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/default/TargetUiState.kt similarity index 98% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/default/TargetUiState.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/default/TargetUiState.kt index f13f6527a..d2156dff5 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/default/TargetUiState.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/default/TargetUiState.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.component.spotlighthero.visualisation.default +package com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.default import androidx.compose.ui.unit.DpOffset import com.bumble.appyx.interactions.core.ui.context.UiContext diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/property/HeroProgress.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/property/HeroProgress.kt similarity index 83% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/property/HeroProgress.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/property/HeroProgress.kt index 7d0714b33..293fec66c 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/property/HeroProgress.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/component/spotlighthero/visualisation/property/HeroProgress.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.component.spotlighthero.visualisation.property +package com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.property import com.bumble.appyx.interactions.core.ui.property.impl.GenericFloatProperty import kotlinx.coroutines.CoroutineScope diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/navigator/Navigator.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/navigator/Navigator.kt similarity index 86% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/navigator/Navigator.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/navigator/Navigator.kt index 5dc1d3dec..e8d615eb8 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/navigator/Navigator.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/navigator/Navigator.kt @@ -1,9 +1,9 @@ -package com.bumble.appyx.navigation.navigator +package com.bumble.appyx.demos.navigation.navigator import androidx.compose.runtime.compositionLocalOf -import com.bumble.appyx.navigation.node.cakes.Cake -import com.bumble.appyx.navigation.node.profile.User -import com.bumble.appyx.navigation.node.root.RootNode +import com.bumble.appyx.demos.navigation.node.cakes.Cake +import com.bumble.appyx.demos.navigation.node.profile.User +import com.bumble.appyx.demos.navigation.node.root.RootNode import com.bumble.appyx.navigation.plugin.NodeReadyObserver import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/Cake.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/Cake.kt similarity index 96% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/Cake.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/Cake.kt index b5baba92b..bcf894815 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/Cake.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/Cake.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.cakes +package com.bumble.appyx.demos.navigation.node.cakes import androidx.compose.runtime.Immutable import com.bumble.appyx.utils.multiplatform.Parcelable diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeBackdropNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeBackdropNode.kt similarity index 91% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeBackdropNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeBackdropNode.kt index 292c85f43..2f11cba0c 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeBackdropNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeBackdropNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.cakes +package com.bumble.appyx.demos.navigation.node.cakes import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -13,11 +13,11 @@ import androidx.compose.ui.draw.alpha import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.property.HeroProgress import com.bumble.appyx.interactions.core.ui.math.smoothstep import com.bumble.appyx.interactions.core.ui.property.motionPropertyRenderValue import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.property.HeroProgress class CakeBackdropNode( nodeContext: NodeContext, diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeDetailsSheet.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeDetailsSheet.kt similarity index 97% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeDetailsSheet.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeDetailsSheet.kt index b1dc0c222..7a9bced24 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeDetailsSheet.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeDetailsSheet.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.cakes +package com.bumble.appyx.demos.navigation.node.cakes import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeImageNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeImageNode.kt similarity index 93% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeImageNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeImageNode.kt index 935a64f75..c6d6bf63c 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeImageNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeImageNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.cakes +package com.bumble.appyx.demos.navigation.node.cakes import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource @@ -13,9 +13,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex +import com.bumble.appyx.demos.navigation.ui.EmbeddableResourceImage import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.navigation.ui.EmbeddableResourceImage class CakeImageNode( nodeContext: NodeContext, diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeListNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeListNode.kt similarity index 82% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeListNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeListNode.kt index 9edebd6f2..219f1daec 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cakes/CakeListNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cakes/CakeListNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.cakes +package com.bumble.appyx.demos.navigation.node.cakes import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.Spring @@ -18,22 +18,22 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHero +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO +import com.bumble.appyx.demos.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.activate +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.setHeroMode +import com.bumble.appyx.demos.navigation.component.spotlighthero.operation.toggleHeroMode +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.SpotlightHeroGestures +import com.bumble.appyx.demos.navigation.component.spotlighthero.visualisation.default.SpotlightHeroDefaultVisualisation +import com.bumble.appyx.demos.navigation.node.cakes.CakeListNode.NavTarget +import com.bumble.appyx.demos.navigation.node.cart.Cart import com.bumble.appyx.interactions.core.ui.math.lerpFloat import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.cakes.CakeListNode.NavTarget -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHero -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.HERO -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel.Mode.LIST -import com.bumble.appyx.navigation.component.spotlighthero.operation.activate -import com.bumble.appyx.navigation.component.spotlighthero.operation.setHeroMode -import com.bumble.appyx.navigation.component.spotlighthero.operation.toggleHeroMode -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.SpotlightHeroGestures -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.default.SpotlightHeroDefaultVisualisation -import com.bumble.appyx.navigation.node.cart.Cart import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize import kotlinx.coroutines.delay diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cart/Cart.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cart/Cart.kt similarity index 90% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cart/Cart.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cart/Cart.kt index cb1161ef4..cc97c3a48 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/cart/Cart.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/cart/Cart.kt @@ -1,6 +1,6 @@ -package com.bumble.appyx.navigation.node.cart +package com.bumble.appyx.demos.navigation.node.cart -import com.bumble.appyx.navigation.node.cakes.Cake +import com.bumble.appyx.demos.navigation.node.cakes.Cake import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.update diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/AddressNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/AddressNode.kt similarity index 91% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/AddressNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/AddressNode.kt index 2c86f4fcf..b9583a816 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/AddressNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/AddressNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -20,12 +20,12 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.node.checkout.Address.AddressOne +import com.bumble.appyx.demos.navigation.node.checkout.Address.AddressThree +import com.bumble.appyx.demos.navigation.node.checkout.Address.AddressTwo import com.bumble.appyx.navigation.collections.toImmutableList import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.navigation.node.checkout.Address.AddressOne -import com.bumble.appyx.navigation.node.checkout.Address.AddressTwo -import com.bumble.appyx.navigation.node.checkout.Address.AddressThree sealed class Address(override val value: String): CheckoutFormField { object AddressOne : Address("Address one") diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CartContent.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CartContent.kt similarity index 97% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CartContent.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CartContent.kt index bc2f98a3f..78f8e7fcd 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CartContent.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CartContent.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background @@ -46,10 +46,10 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.node.cakes.Cake +import com.bumble.appyx.demos.navigation.ui.EmbeddableResourceImage +import com.bumble.appyx.demos.navigation.ui.md_red_200 import com.bumble.appyx.navigation.collections.ImmutableMap -import com.bumble.appyx.navigation.node.cakes.Cake -import com.bumble.appyx.navigation.ui.EmbeddableResourceImage -import com.bumble.appyx.navigation.ui.md_red_200 import kotlinx.coroutines.delay import kotlinx.coroutines.launch diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CartItemsNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CartItemsNode.kt similarity index 91% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CartItemsNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CartItemsNode.kt index d3a257291..8b334e5ae 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CartItemsNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CartItemsNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.animation.Crossfade import androidx.compose.foundation.layout.Arrangement @@ -16,13 +16,13 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.navigator.LocalNavigator +import com.bumble.appyx.demos.navigation.navigator.Navigator +import com.bumble.appyx.demos.navigation.node.cakes.Cake +import com.bumble.appyx.demos.navigation.node.cart.Cart import com.bumble.appyx.navigation.collections.toImmutableMap import com.bumble.appyx.navigation.modality.NodeContext -import com.bumble.appyx.navigation.navigator.LocalNavigator -import com.bumble.appyx.navigation.navigator.Navigator import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.navigation.node.cakes.Cake -import com.bumble.appyx.navigation.node.cart.Cart class CartItemsNode( nodeContext: NodeContext, diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CheckoutFormField.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CheckoutFormField.kt new file mode 100644 index 000000000..f2d3f4507 --- /dev/null +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CheckoutFormField.kt @@ -0,0 +1,5 @@ +package com.bumble.appyx.demos.navigation.node.checkout + +interface CheckoutFormField { + val value: String +} diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CheckoutNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CheckoutNode.kt similarity index 90% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CheckoutNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CheckoutNode.kt index bb8fef4f1..6097c0060 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CheckoutNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/CheckoutNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -8,15 +8,15 @@ import com.bumble.appyx.components.backstack.operation.newRoot import com.bumble.appyx.components.backstack.operation.push import com.bumble.appyx.components.backstack.ui.parallax.BackStackParallax import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider +import com.bumble.appyx.demos.navigation.node.cart.Cart +import com.bumble.appyx.demos.navigation.node.checkout.CheckoutNode.NavTarget +import com.bumble.appyx.demos.navigation.platform.IOS_PLATFORM_NAME +import com.bumble.appyx.demos.navigation.platform.getPlatformName import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.cart.Cart -import com.bumble.appyx.navigation.node.checkout.CheckoutNode.NavTarget -import com.bumble.appyx.navigation.platform.IOS_PLATFORM_NAME -import com.bumble.appyx.navigation.platform.getPlatformName import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/Options.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/Options.kt similarity index 96% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/Options.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/Options.kt index d5353960a..9e0152b62 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/Options.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/Options.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/OrderConfirmedNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/OrderConfirmedNode.kt similarity index 97% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/OrderConfirmedNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/OrderConfirmedNode.kt index 58e557d74..6deaadf22 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/OrderConfirmedNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/OrderConfirmedNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/PaymentNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/PaymentNode.kt similarity index 89% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/PaymentNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/PaymentNode.kt index 1c47767d1..a67d58d11 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/PaymentNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/PaymentNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -20,13 +20,13 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.node.checkout.PaymentOption.Card +import com.bumble.appyx.demos.navigation.node.checkout.PaymentOption.HugsHighFives +import com.bumble.appyx.demos.navigation.node.checkout.PaymentOption.Monopoly +import com.bumble.appyx.demos.navigation.node.checkout.PaymentOption.PiggyBank import com.bumble.appyx.navigation.collections.toImmutableList import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.navigation.node.checkout.PaymentOption.Card -import com.bumble.appyx.navigation.node.checkout.PaymentOption.HugsHighFives -import com.bumble.appyx.navigation.node.checkout.PaymentOption.Monopoly -import com.bumble.appyx.navigation.node.checkout.PaymentOption.PiggyBank sealed class PaymentOption(override val value: String) : CheckoutFormField { object Card : PaymentOption("Card") diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/ShippingDetailsNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/ShippingDetailsNode.kt similarity index 89% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/ShippingDetailsNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/ShippingDetailsNode.kt index c050eb22e..809d3e79c 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/ShippingDetailsNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/checkout/ShippingDetailsNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.checkout +package com.bumble.appyx.demos.navigation.node.checkout import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -20,13 +20,13 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.node.checkout.ShippingMethod.Pony +import com.bumble.appyx.demos.navigation.node.checkout.ShippingMethod.Rocket +import com.bumble.appyx.demos.navigation.node.checkout.ShippingMethod.Snail +import com.bumble.appyx.demos.navigation.node.checkout.ShippingMethod.Teleportation import com.bumble.appyx.navigation.collections.toImmutableList import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.navigation.node.checkout.ShippingMethod.Pony -import com.bumble.appyx.navigation.node.checkout.ShippingMethod.Rocket -import com.bumble.appyx.navigation.node.checkout.ShippingMethod.Snail -import com.bumble.appyx.navigation.node.checkout.ShippingMethod.Teleportation sealed class ShippingMethod(override val value: String): CheckoutFormField { object Pony : ShippingMethod("Pony express") diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/home/HomeNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/home/HomeNode.kt similarity index 93% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/home/HomeNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/home/HomeNode.kt index 00336e854..af6ce6393 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/home/HomeNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/home/HomeNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.home +package com.bumble.appyx.demos.navigation.node.home import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -14,8 +14,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.navigation.navigator.LocalNavigator import com.bumble.appyx.navigation.modality.NodeContext -import com.bumble.appyx.navigation.navigator.LocalNavigator import com.bumble.appyx.navigation.node.Node class HomeNode( diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/loggedout/LoggedOutNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/loggedout/LoggedOutNode.kt similarity index 93% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/loggedout/LoggedOutNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/loggedout/LoggedOutNode.kt index da14eacd9..3ae930f4e 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/loggedout/LoggedOutNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/loggedout/LoggedOutNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.loggedout +package com.bumble.appyx.demos.navigation.node.loggedout import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -23,16 +23,16 @@ import com.bumble.appyx.components.backstack.BackStackModel import com.bumble.appyx.components.backstack.operation.push import com.bumble.appyx.components.backstack.ui.parallax.BackStackParallax import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider +import com.bumble.appyx.demos.navigation.node.loggedout.LoggedOutNode.NavTarget +import com.bumble.appyx.demos.navigation.node.profile.User +import com.bumble.appyx.demos.navigation.platform.IOS_PLATFORM_NAME +import com.bumble.appyx.demos.navigation.platform.getPlatformName import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.loggedout.LoggedOutNode.NavTarget import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.profile.User -import com.bumble.appyx.navigation.platform.IOS_PLATFORM_NAME -import com.bumble.appyx.navigation.platform.getPlatformName import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/main/MainNavItem.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/main/MainNavItem.kt similarity index 84% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/main/MainNavItem.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/main/MainNavItem.kt index 0600265d6..6454ac711 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/main/MainNavItem.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/main/MainNavItem.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.main +package com.bumble.appyx.demos.navigation.node.main import androidx.compose.material.icons.Icons.Filled import androidx.compose.material.icons.Icons.Outlined @@ -10,12 +10,12 @@ import androidx.compose.material.icons.outlined.Cake import androidx.compose.material.icons.outlined.Home import androidx.compose.material.icons.outlined.Person import androidx.compose.material.icons.outlined.ShoppingCart -import com.bumble.appyx.navigation.node.cakes.CakeListNode -import com.bumble.appyx.navigation.node.cart.Cart -import com.bumble.appyx.navigation.node.checkout.CheckoutNode -import com.bumble.appyx.navigation.node.home.HomeNode -import com.bumble.appyx.navigation.node.profile.ProfileNode -import com.bumble.appyx.navigation.node.profile.User +import com.bumble.appyx.demos.navigation.node.cakes.CakeListNode +import com.bumble.appyx.demos.navigation.node.cart.Cart +import com.bumble.appyx.demos.navigation.node.checkout.CheckoutNode +import com.bumble.appyx.demos.navigation.node.home.HomeNode +import com.bumble.appyx.demos.navigation.node.profile.ProfileNode +import com.bumble.appyx.demos.navigation.node.profile.User import com.bumble.appyx.utils.material3.AppyxNavItem import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/main/MainNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/main/MainNode.kt similarity index 71% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/main/MainNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/main/MainNode.kt index f81f2ab1d..fb68f0bcb 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/main/MainNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/main/MainNode.kt @@ -1,16 +1,16 @@ -package com.bumble.appyx.navigation.node.main +package com.bumble.appyx.demos.navigation.node.main import com.bumble.appyx.components.spotlight.operation.activate +import com.bumble.appyx.demos.navigation.node.cakes.CakeListNode +import com.bumble.appyx.demos.navigation.node.cart.Cart +import com.bumble.appyx.demos.navigation.node.home.HomeNode +import com.bumble.appyx.demos.navigation.node.main.MainNavItem.CAKES +import com.bumble.appyx.demos.navigation.node.main.MainNavItem.HOME +import com.bumble.appyx.demos.navigation.node.main.MainNavItem.PROFILE +import com.bumble.appyx.demos.navigation.node.profile.ProfileNode +import com.bumble.appyx.demos.navigation.node.profile.User import com.bumble.appyx.interactions.core.plugin.Plugin import com.bumble.appyx.navigation.modality.NodeContext -import com.bumble.appyx.navigation.node.cakes.CakeListNode -import com.bumble.appyx.navigation.node.cart.Cart -import com.bumble.appyx.navigation.node.home.HomeNode -import com.bumble.appyx.navigation.node.main.MainNavItem.CAKES -import com.bumble.appyx.navigation.node.main.MainNavItem.HOME -import com.bumble.appyx.navigation.node.main.MainNavItem.PROFILE -import com.bumble.appyx.navigation.node.profile.ProfileNode -import com.bumble.appyx.navigation.node.profile.User import com.bumble.appyx.navigation.store.getRetainedInstance import com.bumble.appyx.utils.material3.AppyxMaterial3NavNode import kotlinx.coroutines.delay diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/profile/ProfileNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/profile/ProfileNode.kt similarity index 95% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/profile/ProfileNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/profile/ProfileNode.kt index eb261f911..009344dc2 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/profile/ProfileNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/profile/ProfileNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.profile +package com.bumble.appyx.demos.navigation.node.profile import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -15,12 +15,12 @@ import androidx.compose.ui.unit.dp import com.bumble.appyx.components.backstack.BackStack import com.bumble.appyx.components.backstack.BackStackModel import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider +import com.bumble.appyx.demos.navigation.node.profile.ProfileNode.NavTarget import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.profile.ProfileNode.NavTarget import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/profile/User.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/profile/User.kt similarity index 84% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/profile/User.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/profile/User.kt index c1f7e2387..d6b840272 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/profile/User.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/profile/User.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.profile +package com.bumble.appyx.demos.navigation.node.profile import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/root/RootNode.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/root/RootNode.kt similarity index 90% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/root/RootNode.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/root/RootNode.kt index edfc67d4b..6a78a825e 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/root/RootNode.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/node/root/RootNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.root +package com.bumble.appyx.demos.navigation.node.root import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -6,15 +6,15 @@ import com.bumble.appyx.components.backstack.BackStack import com.bumble.appyx.components.backstack.BackStackModel import com.bumble.appyx.components.backstack.operation.replace import com.bumble.appyx.components.backstack.ui.fader.BackStackFader +import com.bumble.appyx.demos.navigation.node.loggedout.LoggedOutNode +import com.bumble.appyx.demos.navigation.node.main.MainNode +import com.bumble.appyx.demos.navigation.node.profile.User +import com.bumble.appyx.demos.navigation.node.root.RootNode.NavTarget import com.bumble.appyx.interactions.core.plugin.Plugin import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.loggedout.LoggedOutNode -import com.bumble.appyx.navigation.node.main.MainNode -import com.bumble.appyx.navigation.node.profile.User -import com.bumble.appyx.navigation.node.root.RootNode.NavTarget import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/platform/Platform.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/platform/Platform.kt similarity index 59% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/platform/Platform.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/platform/Platform.kt index c4abd24df..f04f9ffbd 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/platform/Platform.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/platform/Platform.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.platform +package com.bumble.appyx.demos.navigation.platform expect fun getPlatformName(): String diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Color.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Color.kt similarity index 93% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Color.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Color.kt index bccf0e034..17485eef1 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Color.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Color.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.ui.graphics.Color diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt similarity index 86% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt index 872fb3dde..7114d4a47 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/MaterialColors.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/MaterialColors.kt similarity index 99% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/MaterialColors.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/MaterialColors.kt index 44e910c2e..5dc07a86f 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/MaterialColors.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/MaterialColors.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.ui.graphics.Color diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/PlaceholderScreen.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/PlaceholderScreen.kt similarity index 96% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/PlaceholderScreen.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/PlaceholderScreen.kt index 666129dfd..f29f3527f 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/PlaceholderScreen.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/PlaceholderScreen.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Shape.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Shape.kt similarity index 86% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Shape.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Shape.kt index cd4ccd260..23f9ecc61 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Shape.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Shape.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Shapes diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/TextButton.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/TextButton.kt similarity index 92% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/TextButton.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/TextButton.kt index 435dc60c3..fdccde09f 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/TextButton.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/TextButton.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Button diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Theme.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Theme.kt similarity index 94% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Theme.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Theme.kt index 9d9ae3e08..30724d93b 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Theme.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Theme.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Type.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Type.kt similarity index 95% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Type.kt rename to demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Type.kt index c2b1526a8..846cc8669 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Type.kt +++ b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/navigation/ui/Type.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Ext.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Ext.kt deleted file mode 100644 index 5b9974805..000000000 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Ext.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.bumble.appyx.navigation - -import com.bumble.appyx.navigation.ui.atomic_tangerine -import com.bumble.appyx.navigation.ui.manatee -import com.bumble.appyx.navigation.ui.md_amber_500 -import com.bumble.appyx.navigation.ui.md_blue_500 -import com.bumble.appyx.navigation.ui.md_blue_grey_500 -import com.bumble.appyx.navigation.ui.md_cyan_500 -import com.bumble.appyx.navigation.ui.md_grey_500 -import com.bumble.appyx.navigation.ui.md_indigo_500 -import com.bumble.appyx.navigation.ui.md_light_blue_500 -import com.bumble.appyx.navigation.ui.md_light_green_500 -import com.bumble.appyx.navigation.ui.md_lime_500 -import com.bumble.appyx.navigation.ui.md_pink_500 -import com.bumble.appyx.navigation.ui.md_teal_500 -import com.bumble.appyx.navigation.ui.silver_sand -import com.bumble.appyx.navigation.ui.sizzling_red - -val colors = listOf( - manatee, - sizzling_red, - atomic_tangerine, - silver_sand, - md_pink_500, - md_indigo_500, - md_blue_500, - md_light_blue_500, - md_cyan_500, - md_teal_500, - md_light_green_500, - md_lime_500, - md_amber_500, - md_grey_500, - md_blue_grey_500 -) diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/SpotlightHeroVisualisation.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/SpotlightHeroVisualisation.kt deleted file mode 100644 index 00452534d..000000000 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/component/spotlighthero/visualisation/SpotlightHeroVisualisation.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.bumble.appyx.navigation.component.spotlighthero.visualisation - -import com.bumble.appyx.interactions.core.ui.Visualisation -import com.bumble.appyx.navigation.component.spotlighthero.SpotlightHeroModel -import com.bumble.appyx.navigation.component.spotlighthero.visualisation.property.HeroProgress - -interface SpotlightHeroVisualisation : - Visualisation> { - - val heroProgress: HeroProgress -} diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CheckoutFormField.kt b/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CheckoutFormField.kt deleted file mode 100644 index 2fb301b3f..000000000 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/checkout/CheckoutFormField.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.bumble.appyx.navigation.node.checkout - -interface CheckoutFormField { - val value: String -} diff --git a/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt new file mode 100644 index 000000000..a4d50e835 --- /dev/null +++ b/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt @@ -0,0 +1,3 @@ +package com.bumble.appyx.demos.navigation.platform + +actual fun getPlatformName(): String = "Desktop" diff --git a/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt b/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt similarity index 91% rename from demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt rename to demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt index e176f954d..18338254f 100644 --- a/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt +++ b/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt deleted file mode 100644 index cd4c762c7..000000000 --- a/demos/appyx-navigation/common/src/desktopMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.bumble.appyx.navigation.platform - -actual fun getPlatformName(): String = "Desktop" diff --git a/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt new file mode 100644 index 000000000..1b7b5aeea --- /dev/null +++ b/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt @@ -0,0 +1,3 @@ +package com.bumble.appyx.demos.navigation.platform + +actual fun getPlatformName(): String = "iOS" diff --git a/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt b/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt similarity index 91% rename from demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt rename to demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt index e176f954d..18338254f 100644 --- a/demos/appyx-navigation/common/src/androidMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt +++ b/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt deleted file mode 100644 index 6a21468a1..000000000 --- a/demos/appyx-navigation/common/src/iosMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.bumble.appyx.navigation.platform - -actual fun getPlatformName(): String = "iOS" diff --git a/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt new file mode 100644 index 000000000..fee6fd754 --- /dev/null +++ b/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/demos/navigation/platform/PlatformName.kt @@ -0,0 +1,3 @@ +package com.bumble.appyx.demos.navigation.platform + +actual fun getPlatformName(): String = "Web" diff --git a/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt b/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt similarity index 93% rename from demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt rename to demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt index 1e7f44355..32c3edfc2 100644 --- a/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/navigation/ui/EmbeddableResourceImage.kt +++ b/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/demos/navigation/ui/EmbeddableResourceImage.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.navigation.ui import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier diff --git a/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt b/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt deleted file mode 100644 index 8bcec9ee5..000000000 --- a/demos/appyx-navigation/common/src/jsMain/kotlin/com/bumble/appyx/navigation/platform/PlatformName.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.bumble.appyx.navigation.platform - -actual fun getPlatformName(): String = "Web" diff --git a/demos/appyx-navigation/desktop/build.gradle.kts b/demos/appyx-navigation/desktop/build.gradle.kts index 42435f9d1..fdbc1e365 100644 --- a/demos/appyx-navigation/desktop/build.gradle.kts +++ b/demos/appyx-navigation/desktop/build.gradle.kts @@ -32,7 +32,7 @@ kotlin { compose.desktop { application { - mainClass = "com.bumble.appyx.navigation.MainKt" + mainClass = "com.bumble.appyx.demos.navigation.MainKt" nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "AppyxNavigationDesktop" diff --git a/demos/appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/navigation/Main.kt b/demos/appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/Main.kt similarity index 83% rename from demos/appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/navigation/Main.kt rename to demos/appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/Main.kt index a4c273157..fb5eb055a 100644 --- a/demos/appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/navigation/Main.kt +++ b/demos/appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/demos/navigation/Main.kt @@ -1,5 +1,5 @@ @file:Suppress("MatchingDeclarationName") -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.navigation import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -15,11 +15,12 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import androidx.compose.ui.window.rememberWindowState +import com.bumble.appyx.demos.navigation.Events.OnBackPressed import com.bumble.appyx.navigation.integration.DesktopNodeHost -import com.bumble.appyx.navigation.navigator.LocalNavigator -import com.bumble.appyx.navigation.navigator.Navigator -import com.bumble.appyx.navigation.node.root.RootNode -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme +import com.bumble.appyx.demos.navigation.navigator.LocalNavigator +import com.bumble.appyx.demos.navigation.navigator.Navigator +import com.bumble.appyx.demos.navigation.node.root.RootNode +import com.bumble.appyx.demos.navigation.ui.AppyxSampleAppTheme import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob @@ -50,7 +51,7 @@ fun main() = application { DesktopNodeHost( windowState = windowState, onBackPressedEvents = events.receiveAsFlow().mapNotNull { - if (it is Events.OnBackPressed) Unit else null + if (it is OnBackPressed) Unit else null } ) { nodeContext -> RootNode( @@ -71,7 +72,7 @@ private fun onKeyEvent( ): Boolean = when { keyEvent.type == KeyEventType.KeyDown && keyEvent.key == Key.Backspace -> { - coroutineScope.launch { events.send(Events.OnBackPressed) } + coroutineScope.launch { events.send(OnBackPressed) } true } diff --git a/demos/appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt b/demos/appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt index 58c8a0e12..e63a1ef35 100644 --- a/demos/appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt +++ b/demos/appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt @@ -6,12 +6,12 @@ import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.window.ComposeUIViewController +import com.bumble.appyx.demos.navigation.navigator.LocalNavigator +import com.bumble.appyx.demos.navigation.navigator.Navigator +import com.bumble.appyx.demos.navigation.node.root.RootNode +import com.bumble.appyx.demos.navigation.ui.AppyxSampleAppTheme import com.bumble.appyx.navigation.integration.IosNodeHost import com.bumble.appyx.navigation.integration.MainIntegrationPoint -import com.bumble.appyx.navigation.navigator.LocalNavigator -import com.bumble.appyx.navigation.navigator.Navigator -import com.bumble.appyx.navigation.node.root.RootNode -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme import kotlinx.coroutines.flow.flowOf import platform.Foundation.NSURL diff --git a/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt b/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt index 75f915b88..e43f5ab47 100644 --- a/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt +++ b/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt @@ -34,12 +34,12 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.window.CanvasBasedWindow import com.bumble.appyx.demos.appyxSample import com.bumble.appyx.demos.common.color_primary +import com.bumble.appyx.demos.navigation.navigator.LocalNavigator +import com.bumble.appyx.demos.navigation.navigator.Navigator +import com.bumble.appyx.demos.navigation.node.root.RootNode +import com.bumble.appyx.demos.navigation.ui.AppyxSampleAppTheme import com.bumble.appyx.navigation.integration.ScreenSize import com.bumble.appyx.navigation.integration.WebNodeHost -import com.bumble.appyx.navigation.navigator.LocalNavigator -import com.bumble.appyx.navigation.navigator.Navigator -import com.bumble.appyx.navigation.node.root.RootNode -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob diff --git a/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/WebTypography.kt b/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/WebTypography.kt index 82c0da1e5..833b55cac 100644 --- a/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/WebTypography.kt +++ b/demos/appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/WebTypography.kt @@ -2,7 +2,7 @@ package com.bumble.appyx.navigation import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.unit.sp -import com.bumble.appyx.navigation.ui.typography +import com.bumble.appyx.demos.navigation.ui.typography internal val webTypography = typography.copy( bodySmall = typography.bodySmall.copy( diff --git a/demos/common/build.gradle.kts b/demos/common/build.gradle.kts index ef575127a..abcbffc86 100644 --- a/demos/common/build.gradle.kts +++ b/demos/common/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } appyx { - androidNamespace.set("com.bumble.appyx.samples.common") + androidNamespace.set("com.bumble.appyx.demos.common") } kotlin { diff --git a/demos/common/src/androidMain/kotlin/com/bumble/appyx/samples/common/profile/Profile.kt b/demos/common/src/androidMain/kotlin/com/bumble/appyx/demos/common/profile/Profile.kt similarity index 96% rename from demos/common/src/androidMain/kotlin/com/bumble/appyx/samples/common/profile/Profile.kt rename to demos/common/src/androidMain/kotlin/com/bumble/appyx/demos/common/profile/Profile.kt index 7183f3f3e..a6fe86d08 100644 --- a/demos/common/src/androidMain/kotlin/com/bumble/appyx/samples/common/profile/Profile.kt +++ b/demos/common/src/androidMain/kotlin/com/bumble/appyx/demos/common/profile/Profile.kt @@ -1,9 +1,9 @@ -package com.bumble.appyx.samples.common.profile +package com.bumble.appyx.demos.common.profile import android.os.Parcelable import androidx.annotation.DrawableRes import androidx.compose.runtime.Immutable -import com.bumble.appyx.samples.common.R +import com.bumble.appyx.demos.common.R import kotlinx.parcelize.Parcelize import kotlin.random.Random diff --git a/demos/common/src/androidMain/kotlin/com/bumble/appyx/samples/common/profile/ProfileCardNode.kt b/demos/common/src/androidMain/kotlin/com/bumble/appyx/demos/common/profile/ProfileCardNode.kt similarity index 97% rename from demos/common/src/androidMain/kotlin/com/bumble/appyx/samples/common/profile/ProfileCardNode.kt rename to demos/common/src/androidMain/kotlin/com/bumble/appyx/demos/common/profile/ProfileCardNode.kt index c681e1f8f..4613c66bf 100644 --- a/demos/common/src/androidMain/kotlin/com/bumble/appyx/samples/common/profile/ProfileCardNode.kt +++ b/demos/common/src/androidMain/kotlin/com/bumble/appyx/demos/common/profile/ProfileCardNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.samples.common.profile +package com.bumble.appyx.demos.common.profile import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.Column diff --git a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/CalendarWidget.kt b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/CalendarWidget.kt similarity index 98% rename from demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/CalendarWidget.kt rename to demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/CalendarWidget.kt index 1451f56c0..8ad3f6c12 100644 --- a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/CalendarWidget.kt +++ b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/CalendarWidget.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.samples.common.widget +package com.bumble.appyx.demos.common.widget import androidx.compose.foundation.border import androidx.compose.foundation.layout.Arrangement diff --git a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/TimerWidget.kt b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/TimerWidget.kt similarity index 98% rename from demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/TimerWidget.kt rename to demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/TimerWidget.kt index 2bce2b149..c4e8bc9e5 100644 --- a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/TimerWidget.kt +++ b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/TimerWidget.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.samples.common.widget +package com.bumble.appyx.demos.common.widget import androidx.compose.foundation.Canvas import androidx.compose.foundation.layout.Box diff --git a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/WeatherWidget.kt b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/WeatherWidget.kt similarity index 97% rename from demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/WeatherWidget.kt rename to demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/WeatherWidget.kt index 0995c9d99..98d031a10 100644 --- a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/WeatherWidget.kt +++ b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/WeatherWidget.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.samples.common.widget +package com.bumble.appyx.demos.common.widget import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Arrangement diff --git a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/Widget.kt b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/Widget.kt similarity index 96% rename from demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/Widget.kt rename to demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/Widget.kt index b547a9eea..678a97b10 100644 --- a/demos/common/src/commonMain/kotlin/com/bumble/appyx/samples/common/widget/Widget.kt +++ b/demos/common/src/commonMain/kotlin/com/bumble/appyx/demos/common/widget/Widget.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.samples.common.widget +package com.bumble.appyx.demos.common.widget import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box diff --git a/demos/sandbox-appyx-navigation/android/src/main/AndroidManifest.xml b/demos/sandbox-appyx-navigation/android/src/main/AndroidManifest.xml index 690ed8641..dd9266458 100644 --- a/demos/sandbox-appyx-navigation/android/src/main/AndroidManifest.xml +++ b/demos/sandbox-appyx-navigation/android/src/main/AndroidManifest.xml @@ -8,7 +8,7 @@ android:supportsRtl="true" android:theme="@style/Theme.Appyx"> diff --git a/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/MainActivity.kt b/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/MainActivity.kt similarity index 90% rename from demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/MainActivity.kt rename to demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/MainActivity.kt index c2ff4d608..b0c9a772b 100644 --- a/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/MainActivity.kt +++ b/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/MainActivity.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.sandbox.navigation import android.os.Bundle import androidx.activity.compose.setContent @@ -12,12 +12,12 @@ import androidx.compose.ui.platform.LocalLifecycleOwner import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.ExperimentalUnitApi import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen +import com.bumble.appyx.demos.sandbox.navigation.node.container.MainNavNode +import com.bumble.appyx.demos.sandbox.navigation.ui.AppyxSampleAppTheme import com.bumble.appyx.navigation.integration.NodeActivity import com.bumble.appyx.navigation.integration.NodeHost import com.bumble.appyx.navigation.modality.NodeContext -import com.bumble.appyx.navigation.node.container.MainNavNode import com.bumble.appyx.navigation.platform.AndroidLifecycle -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme @ExperimentalUnitApi @ExperimentalAnimationApi diff --git a/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/datingcards/DatingCardsNode.kt b/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/datingcards/DatingCardsNode.kt similarity index 77% rename from demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/datingcards/DatingCardsNode.kt rename to demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/datingcards/DatingCardsNode.kt index fd4535005..0bfbdb3df 100644 --- a/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/datingcards/DatingCardsNode.kt +++ b/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/datingcards/DatingCardsNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.datingcards +package com.bumble.appyx.demos.sandbox.navigation.node.datingcards import androidx.compose.foundation.background import androidx.compose.foundation.layout.fillMaxSize @@ -9,14 +9,15 @@ import androidx.compose.ui.unit.dp import com.bumble.appyx.components.experimental.cards.Cards import com.bumble.appyx.components.experimental.cards.CardsModel import com.bumble.appyx.components.experimental.cards.ui.CardsVisualisation +import com.bumble.appyx.demos.common.profile.Profile +import com.bumble.appyx.demos.sandbox.navigation.node.datingcards.DatingCardsNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.node.datingcards.DatingCardsNode.NavTarget.ProfileCard +import com.bumble.appyx.demos.sandbox.navigation.node.profilecard.ProfileCardNode +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.datingcards.DatingCardsNode.NavTarget -import com.bumble.appyx.navigation.node.profilecard.ProfileCardNode -import com.bumble.appyx.navigation.ui.appyx_dark -import com.bumble.appyx.samples.common.profile.Profile import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize @@ -45,7 +46,7 @@ class DatingCardsNode( } override fun buildChildNode(navTarget: NavTarget, nodeContext: NodeContext): Node = - ProfileCardNode(nodeContext, (navTarget as NavTarget.ProfileCard).profile) + ProfileCardNode(nodeContext, (navTarget as ProfileCard).profile) @Composable override fun Content(modifier: Modifier) { diff --git a/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/profilecard/ProfileCardNode.kt b/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/profilecard/ProfileCardNode.kt similarity index 95% rename from demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/profilecard/ProfileCardNode.kt rename to demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/profilecard/ProfileCardNode.kt index 9e5aa1a08..31001165a 100644 --- a/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/navigation/node/profilecard/ProfileCardNode.kt +++ b/demos/sandbox-appyx-navigation/android/src/main/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/profilecard/ProfileCardNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.profilecard +package com.bumble.appyx.demos.sandbox.navigation.node.profilecard import androidx.compose.foundation.layout.BoxWithConstraints import androidx.compose.foundation.layout.Column @@ -19,9 +19,9 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import coil.compose.AsyncImage import coil.request.ImageRequest +import com.bumble.appyx.demos.common.profile.Profile import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node -import com.bumble.appyx.samples.common.profile.Profile class ProfileCardNode( nodeContext: NodeContext, diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Ext.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Ext.kt new file mode 100644 index 000000000..4d037d8ee --- /dev/null +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Ext.kt @@ -0,0 +1,35 @@ +package com.bumble.appyx.demos.sandbox.navigation + +import com.bumble.appyx.demos.sandbox.navigation.ui.atomic_tangerine +import com.bumble.appyx.demos.sandbox.navigation.ui.manatee +import com.bumble.appyx.demos.sandbox.navigation.ui.md_amber_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_blue_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_blue_grey_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_cyan_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_grey_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_indigo_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_light_blue_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_light_green_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_lime_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_pink_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.md_teal_500 +import com.bumble.appyx.demos.sandbox.navigation.ui.silver_sand +import com.bumble.appyx.demos.sandbox.navigation.ui.sizzling_red + +val colors = listOf( + manatee, + sizzling_red, + atomic_tangerine, + silver_sand, + md_pink_500, + md_indigo_500, + md_blue_500, + md_light_blue_500, + md_cyan_500, + md_teal_500, + md_light_green_500, + md_lime_500, + md_amber_500, + md_grey_500, + md_blue_grey_500 +) diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/MainNavItem.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/MainNavItem.kt similarity index 67% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/MainNavItem.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/MainNavItem.kt index 82192b3a8..de9328b2d 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/MainNavItem.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/MainNavItem.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.sandbox.navigation import androidx.compose.material.icons.Icons.Filled import androidx.compose.material.icons.Icons.Outlined @@ -9,10 +9,10 @@ import androidx.compose.material.icons.outlined.ViewCarousel import androidx.compose.material.icons.outlined.WebStories import androidx.compose.ui.Modifier import androidx.compose.ui.draw.rotate -import com.bumble.appyx.navigation.node.backstack.BackStackExamplesNode -import com.bumble.appyx.navigation.node.promoter.PromoterNode -import com.bumble.appyx.navigation.node.spotlight.SpotlightNode -import com.bumble.appyx.navigation.ui.icons.GridViewCustom +import com.bumble.appyx.demos.sandbox.navigation.node.backstack.BackStackExamplesNode +import com.bumble.appyx.demos.sandbox.navigation.node.promoter.PromoterNode +import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightNode +import com.bumble.appyx.demos.sandbox.navigation.ui.icons.GridViewCustom import com.bumble.appyx.utils.material3.AppyxNavItem import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize @@ -22,9 +22,9 @@ enum class MainNavItem : Parcelable { BACKSTACK, SPOTLIGHT, PROMOTER; companion object { - val resolver: (MainNavItem) -> AppyxNavItem = { navBarItem -> + val resolver: (com.bumble.appyx.demos.sandbox.navigation.MainNavItem) -> AppyxNavItem = { navBarItem -> when (navBarItem) { - BACKSTACK -> AppyxNavItem( + com.bumble.appyx.demos.sandbox.navigation.MainNavItem.BACKSTACK -> AppyxNavItem( text = "Back stack", unselectedIcon = Outlined.WebStories, selectedIcon = Filled.WebStories, @@ -32,14 +32,14 @@ enum class MainNavItem : Parcelable { node = { BackStackExamplesNode(it) } ) - SPOTLIGHT -> AppyxNavItem( + com.bumble.appyx.demos.sandbox.navigation.MainNavItem.SPOTLIGHT -> AppyxNavItem( text = "Spotlight", unselectedIcon = Outlined.ViewCarousel, selectedIcon = Filled.ViewCarousel, node = { SpotlightNode(it) } ) - PROMOTER -> AppyxNavItem( + com.bumble.appyx.demos.sandbox.navigation.MainNavItem.PROMOTER -> AppyxNavItem( text = "Promoter", unselectedIcon = Outlined.GridView, selectedIcon = Filled.GridViewCustom, diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Savers.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Savers.kt similarity index 90% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Savers.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Savers.kt index 97869ea70..27998bdd0 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Savers.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Savers.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.sandbox.navigation import androidx.compose.runtime.saveable.mapSaver import androidx.compose.ui.graphics.Color diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/KnobControl.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/composable/KnobControl.kt similarity index 96% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/KnobControl.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/composable/KnobControl.kt index eebb1b4bf..0c22cb34d 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/composable/KnobControl.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/composable/KnobControl.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.composable +package com.bumble.appyx.demos.sandbox.navigation.composable import androidx.compose.foundation.background import androidx.compose.foundation.gestures.Orientation @@ -27,7 +27,7 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.IntSize import androidx.compose.ui.unit.dp -import com.bumble.appyx.navigation.ui.appyx_yellow1 +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_yellow1 import com.bumble.appyx.utils.multiplatform.AppyxLogger import kotlin.math.roundToInt diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/BackStackExamplesNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/BackStackExamplesNode.kt similarity index 94% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/BackStackExamplesNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/BackStackExamplesNode.kt index 8930a7e69..5c2d6c54d 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/BackStackExamplesNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/BackStackExamplesNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.backstack +package com.bumble.appyx.demos.sandbox.navigation.node.backstack import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -20,15 +20,15 @@ import com.bumble.appyx.components.backstack.ui.fader.BackStackFader import com.bumble.appyx.components.backstack.ui.parallax.BackStackParallax import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider import com.bumble.appyx.components.backstack.ui.stack3d.BackStack3D +import com.bumble.appyx.demos.sandbox.navigation.node.backstack.BackStackExamplesNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.ui.TextButton +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.backstack.BackStackExamplesNode.NavTarget import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.ui.TextButton -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/BackStackNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/BackStackNode.kt similarity index 94% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/BackStackNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/BackStackNode.kt index 95ad9785d..41c8f8247 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/BackStackNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/BackStackNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.backstack +package com.bumble.appyx.demos.sandbox.navigation.node.backstack import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -25,21 +25,21 @@ import com.bumble.appyx.components.backstack.operation.newRoot import com.bumble.appyx.components.backstack.operation.pop import com.bumble.appyx.components.backstack.operation.push import com.bumble.appyx.components.backstack.operation.replace +import com.bumble.appyx.demos.sandbox.navigation.ColorSaver +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.ui.TextButton +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.interactions.core.ui.Visualisation import com.bumble.appyx.interactions.core.ui.context.TransitionBounds import com.bumble.appyx.interactions.core.ui.context.UiContext import com.bumble.appyx.interactions.core.ui.gesture.GestureFactory import com.bumble.appyx.interactions.core.ui.gesture.GestureSettleConfig import com.bumble.appyx.interactions.core.ui.helper.gestureModifier -import com.bumble.appyx.navigation.ColorSaver -import com.bumble.appyx.navigation.colors import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.ui.TextButton -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize import kotlin.random.Random diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/debug/BackstackDebugNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/debug/BackstackDebugNode.kt similarity index 91% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/debug/BackstackDebugNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/debug/BackstackDebugNode.kt index 68957dbd0..7e3f59b84 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/backstack/debug/BackstackDebugNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/backstack/debug/BackstackDebugNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.backstack.debug +package com.bumble.appyx.demos.sandbox.navigation.node.backstack.debug import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -24,15 +24,15 @@ import com.bumble.appyx.components.backstack.operation.pop import com.bumble.appyx.components.backstack.operation.push import com.bumble.appyx.components.backstack.operation.replace import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider -import com.bumble.appyx.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.composable.KnobControl +import com.bumble.appyx.demos.sandbox.navigation.node.backstack.debug.BackstackDebugNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.navigation.composable.AppyxNavigationContainer -import com.bumble.appyx.navigation.composable.KnobControl import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.backstack.debug.BackstackDebugNode.NavTarget import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/container/ContainerNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/container/ContainerNode.kt similarity index 85% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/container/ContainerNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/container/ContainerNode.kt index 31b0e294c..fff6626cd 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/container/ContainerNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/container/ContainerNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.container +package com.bumble.appyx.demos.sandbox.navigation.node.container import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -15,20 +15,20 @@ import com.bumble.appyx.components.backstack.BackStack import com.bumble.appyx.components.backstack.BackStackModel import com.bumble.appyx.components.backstack.operation.push import com.bumble.appyx.components.backstack.ui.slider.BackStackSlider +import com.bumble.appyx.demos.sandbox.navigation.node.backstack.BackStackExamplesNode +import com.bumble.appyx.demos.sandbox.navigation.node.backstack.debug.BackstackDebugNode +import com.bumble.appyx.demos.sandbox.navigation.node.container.ContainerNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.node.modal.ModalExamplesNode +import com.bumble.appyx.demos.sandbox.navigation.node.permanentchild.PermanentChildNode +import com.bumble.appyx.demos.sandbox.navigation.node.promoter.PromoterNode +import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightNode +import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightObserveTransitionsExampleNode +import com.bumble.appyx.demos.sandbox.navigation.ui.TextButton import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.backstack.BackStackExamplesNode -import com.bumble.appyx.navigation.node.backstack.debug.BackstackDebugNode -import com.bumble.appyx.navigation.node.container.ContainerNode.NavTarget -import com.bumble.appyx.navigation.node.modal.ModalExamplesNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.permanentchild.PermanentChildNode -import com.bumble.appyx.navigation.node.promoter.PromoterNode -import com.bumble.appyx.navigation.node.spotlight.SpotlightNode -import com.bumble.appyx.navigation.node.spotlight.SpotlightObserveTransitionsExampleNode -import com.bumble.appyx.navigation.ui.TextButton import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/container/MainNavNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/container/MainNavNode.kt similarity index 75% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/container/MainNavNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/container/MainNavNode.kt index 45c182e93..c15d373f9 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/container/MainNavNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/container/MainNavNode.kt @@ -1,6 +1,6 @@ -package com.bumble.appyx.navigation.node.container +package com.bumble.appyx.demos.sandbox.navigation.node.container -import com.bumble.appyx.navigation.MainNavItem +import com.bumble.appyx.demos.sandbox.navigation.MainNavItem import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.utils.material3.AppyxMaterial3NavNode diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/modal/ModalExamplesNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/modal/ModalExamplesNode.kt similarity index 93% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/modal/ModalExamplesNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/modal/ModalExamplesNode.kt index e798829a3..c35d47eed 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/modal/ModalExamplesNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/modal/ModalExamplesNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.modal +package com.bumble.appyx.demos.sandbox.navigation.node.modal import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -22,15 +22,15 @@ import com.bumble.appyx.components.modal.operation.fullScreen import com.bumble.appyx.components.modal.operation.revert import com.bumble.appyx.components.modal.operation.show import com.bumble.appyx.components.modal.ui.ModalVisualisation -import com.bumble.appyx.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.node.modal.ModalExamplesNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.ui.TextButton +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode -import com.bumble.appyx.navigation.node.modal.ModalExamplesNode.NavTarget import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.ui.TextButton -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize import kotlin.random.Random diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/permanentchild/PermanentChildNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/permanentchild/PermanentChildNode.kt similarity index 95% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/permanentchild/PermanentChildNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/permanentchild/PermanentChildNode.kt index c91cc3348..d35a14d19 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/permanentchild/PermanentChildNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/permanentchild/PermanentChildNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.permanentchild +package com.bumble.appyx.demos.sandbox.navigation.node.permanentchild import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -16,14 +16,14 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.interactions.permanent.PermanentAppyxComponent -import com.bumble.appyx.navigation.colors import com.bumble.appyx.navigation.composable.PermanentChild import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/promoter/PromoterNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/promoter/PromoterNode.kt similarity index 94% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/promoter/PromoterNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/promoter/PromoterNode.kt index 8c16456d5..e2b7d0673 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/promoter/PromoterNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/promoter/PromoterNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.promoter +package com.bumble.appyx.demos.sandbox.navigation.node.promoter import androidx.compose.animation.core.Spring import androidx.compose.animation.core.spring @@ -30,16 +30,16 @@ import com.bumble.appyx.components.experimental.promoter.Promoter import com.bumble.appyx.components.experimental.promoter.PromoterModel import com.bumble.appyx.components.experimental.promoter.operation.addFirst import com.bumble.appyx.components.experimental.promoter.ui.PromoterVisualisation +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.node.promoter.PromoterNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.node.promoter.PromoterNode.NavTarget.Child import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.IMMEDIATE import com.bumble.appyx.interactions.core.model.transition.Operation.Mode.KEYFRAME -import com.bumble.appyx.navigation.colors import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.promoter.PromoterNode.NavTarget -import com.bumble.appyx.navigation.node.promoter.PromoterNode.NavTarget.Child import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/SpotlightNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/SpotlightNode.kt similarity index 95% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/SpotlightNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/SpotlightNode.kt index 709d7e572..8cda73e19 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/SpotlightNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/SpotlightNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.spotlight +package com.bumble.appyx.demos.sandbox.navigation.node.spotlight import androidx.compose.animation.core.Spring import androidx.compose.animation.core.spring @@ -33,14 +33,14 @@ import com.bumble.appyx.components.spotlight.operation.next import com.bumble.appyx.components.spotlight.operation.previous import com.bumble.appyx.components.spotlight.operation.updateElements import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider -import com.bumble.appyx.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.spotlight.SpotlightNode.NavTarget -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/SpotlightObserveTransitionsExampleNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/SpotlightObserveTransitionsExampleNode.kt similarity index 95% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/SpotlightObserveTransitionsExampleNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/SpotlightObserveTransitionsExampleNode.kt index 2bf5d9c0f..f950ee289 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/SpotlightObserveTransitionsExampleNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/SpotlightObserveTransitionsExampleNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.spotlight +package com.bumble.appyx.demos.sandbox.navigation.node.spotlight import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -29,17 +29,17 @@ import com.bumble.appyx.components.spotlight.operation.previous import com.bumble.appyx.components.spotlight.operation.updateElements import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider import com.bumble.appyx.components.spotlight.ui.sliderrotation.SpotlightSliderRotation +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.SpotlightObserveTransitionsExampleNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.interactions.core.ui.property.impl.RotationY import com.bumble.appyx.interactions.core.ui.property.impl.position.PositionAlignment import com.bumble.appyx.interactions.core.ui.property.motionPropertyRenderValue -import com.bumble.appyx.navigation.colors import com.bumble.appyx.navigation.composable.AppyxNavigationContainer import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.spotlight.SpotlightObserveTransitionsExampleNode.NavTarget -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/debug/SpotlightDebugNode.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/debug/SpotlightDebugNode.kt similarity index 91% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/debug/SpotlightDebugNode.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/debug/SpotlightDebugNode.kt index eb626a6d3..5bc48854a 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/node/spotlight/debug/SpotlightDebugNode.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/node/spotlight/debug/SpotlightDebugNode.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.node.spotlight.debug +package com.bumble.appyx.demos.sandbox.navigation.node.spotlight.debug import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -24,15 +24,15 @@ import com.bumble.appyx.components.spotlight.operation.last import com.bumble.appyx.components.spotlight.operation.next import com.bumble.appyx.components.spotlight.operation.previous import com.bumble.appyx.components.spotlight.ui.slider.SpotlightSlider -import com.bumble.appyx.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.colors +import com.bumble.appyx.demos.sandbox.navigation.composable.KnobControl +import com.bumble.appyx.demos.sandbox.navigation.node.spotlight.debug.SpotlightDebugNode.NavTarget +import com.bumble.appyx.demos.sandbox.navigation.ui.appyx_dark import com.bumble.appyx.navigation.composable.AppyxNavigationContainer -import com.bumble.appyx.navigation.composable.KnobControl import com.bumble.appyx.navigation.modality.NodeContext import com.bumble.appyx.navigation.node.Node import com.bumble.appyx.navigation.node.ParentNode import com.bumble.appyx.navigation.node.node -import com.bumble.appyx.navigation.node.spotlight.debug.SpotlightDebugNode.NavTarget -import com.bumble.appyx.navigation.ui.appyx_dark import com.bumble.appyx.utils.multiplatform.Parcelable import com.bumble.appyx.utils.multiplatform.Parcelize diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Color.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Color.kt similarity index 92% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Color.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Color.kt index bccf0e034..7b9f74c4c 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Color.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Color.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.sandbox.navigation.ui import androidx.compose.ui.graphics.Color diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/MaterialColors.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/MaterialColors.kt similarity index 99% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/MaterialColors.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/MaterialColors.kt index 44e910c2e..16f0b2f06 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/MaterialColors.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/MaterialColors.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.sandbox.navigation.ui import androidx.compose.ui.graphics.Color diff --git a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Shape.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Shape.kt similarity index 83% rename from demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Shape.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Shape.kt index cd4ccd260..4774e5f94 100644 --- a/demos/appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Shape.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Shape.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.sandbox.navigation.ui import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Shapes diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/TextButton.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/TextButton.kt similarity index 91% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/TextButton.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/TextButton.kt index 435dc60c3..8261d3a63 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/TextButton.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/TextButton.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.sandbox.navigation.ui import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Button diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Theme.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Theme.kt similarity index 95% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Theme.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Theme.kt index 113948a00..5f88b3dae 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Theme.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Theme.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.sandbox.navigation.ui import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Type.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Type.kt similarity index 93% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Type.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Type.kt index f4aea8338..ceea831a1 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/Type.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/Type.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui +package com.bumble.appyx.demos.sandbox.navigation.ui import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/icons/GridViewCustom.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/icons/GridViewCustom.kt similarity index 97% rename from demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/icons/GridViewCustom.kt rename to demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/icons/GridViewCustom.kt index dc326236a..fadf0115e 100644 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/ui/icons/GridViewCustom.kt +++ b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/ui/icons/GridViewCustom.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation.ui.icons +package com.bumble.appyx.demos.sandbox.navigation.ui.icons import androidx.compose.material.icons.Icons import androidx.compose.material.icons.materialIcon diff --git a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Ext.kt b/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Ext.kt deleted file mode 100644 index 5b9974805..000000000 --- a/demos/sandbox-appyx-navigation/common/src/commonMain/kotlin/com/bumble/appyx/navigation/Ext.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.bumble.appyx.navigation - -import com.bumble.appyx.navigation.ui.atomic_tangerine -import com.bumble.appyx.navigation.ui.manatee -import com.bumble.appyx.navigation.ui.md_amber_500 -import com.bumble.appyx.navigation.ui.md_blue_500 -import com.bumble.appyx.navigation.ui.md_blue_grey_500 -import com.bumble.appyx.navigation.ui.md_cyan_500 -import com.bumble.appyx.navigation.ui.md_grey_500 -import com.bumble.appyx.navigation.ui.md_indigo_500 -import com.bumble.appyx.navigation.ui.md_light_blue_500 -import com.bumble.appyx.navigation.ui.md_light_green_500 -import com.bumble.appyx.navigation.ui.md_lime_500 -import com.bumble.appyx.navigation.ui.md_pink_500 -import com.bumble.appyx.navigation.ui.md_teal_500 -import com.bumble.appyx.navigation.ui.silver_sand -import com.bumble.appyx.navigation.ui.sizzling_red - -val colors = listOf( - manatee, - sizzling_red, - atomic_tangerine, - silver_sand, - md_pink_500, - md_indigo_500, - md_blue_500, - md_light_blue_500, - md_cyan_500, - md_teal_500, - md_light_green_500, - md_lime_500, - md_amber_500, - md_grey_500, - md_blue_grey_500 -) diff --git a/demos/sandbox-appyx-navigation/desktop/build.gradle.kts b/demos/sandbox-appyx-navigation/desktop/build.gradle.kts index 1df75b4bc..229f334bf 100644 --- a/demos/sandbox-appyx-navigation/desktop/build.gradle.kts +++ b/demos/sandbox-appyx-navigation/desktop/build.gradle.kts @@ -32,7 +32,7 @@ kotlin { compose.desktop { application { - mainClass = "com.bumble.appyx.navigation.MainKt" + mainClass = "com.bumble.appyx.demos.sandbox.navigation.MainKt" nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "AppyxNavigationDesktop" diff --git a/demos/sandbox-appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/navigation/Main.kt b/demos/sandbox-appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Main.kt similarity index 85% rename from demos/sandbox-appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/navigation/Main.kt rename to demos/sandbox-appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Main.kt index 7355ca9d1..46c762848 100644 --- a/demos/sandbox-appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/navigation/Main.kt +++ b/demos/sandbox-appyx-navigation/desktop/src/desktopMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Main.kt @@ -1,5 +1,5 @@ @file:Suppress("MatchingDeclarationName") -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.sandbox.navigation import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -15,9 +15,10 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Window import androidx.compose.ui.window.application import androidx.compose.ui.window.rememberWindowState +import com.bumble.appyx.demos.sandbox.navigation.Events.OnBackPressed +import com.bumble.appyx.demos.sandbox.navigation.node.container.MainNavNode +import com.bumble.appyx.demos.sandbox.navigation.ui.AppyxSampleAppTheme import com.bumble.appyx.navigation.integration.DesktopNodeHost -import com.bumble.appyx.navigation.node.container.MainNavNode -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob @@ -44,7 +45,7 @@ fun main() = application { DesktopNodeHost( windowState = windowState, onBackPressedEvents = events.receiveAsFlow().mapNotNull { - if (it is Events.OnBackPressed) Unit else null + if (it is OnBackPressed) Unit else null } ) { nodeContext -> MainNavNode( @@ -64,7 +65,7 @@ private fun onKeyEvent( ): Boolean = when { keyEvent.type == KeyEventType.KeyDown && keyEvent.key == Key.Backspace -> { - coroutineScope.launch { events.send(Events.OnBackPressed) } + coroutineScope.launch { events.send(OnBackPressed) } true } diff --git a/demos/sandbox-appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt b/demos/sandbox-appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt index c126e7674..455f80b97 100644 --- a/demos/sandbox-appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt +++ b/demos/sandbox-appyx-navigation/ios/src/iosMain/kotlin/main.ios.kt @@ -15,10 +15,10 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp import androidx.compose.ui.window.ComposeUIViewController import androidx.compose.ui.zIndex +import com.bumble.appyx.demos.sandbox.navigation.node.container.MainNavNode +import com.bumble.appyx.demos.sandbox.navigation.ui.AppyxSampleAppTheme import com.bumble.appyx.navigation.integration.IosNodeHost import com.bumble.appyx.navigation.integration.MainIntegrationPoint -import com.bumble.appyx.navigation.node.container.MainNavNode -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.receiveAsFlow diff --git a/demos/sandbox-appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt b/demos/sandbox-appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Main.kt similarity index 94% rename from demos/sandbox-appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt rename to demos/sandbox-appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Main.kt index 38e50e1c0..a138c466a 100644 --- a/demos/sandbox-appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/navigation/Main.kt +++ b/demos/sandbox-appyx-navigation/web/src/jsMain/kotlin/com/bumble/appyx/demos/sandbox/navigation/Main.kt @@ -1,4 +1,4 @@ -package com.bumble.appyx.navigation +package com.bumble.appyx.demos.sandbox.navigation import androidx.compose.foundation.focusable import androidx.compose.foundation.layout.fillMaxSize @@ -22,11 +22,11 @@ import androidx.compose.ui.input.key.onKeyEvent import androidx.compose.ui.input.key.type import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.unit.dp +import com.bumble.appyx.demos.sandbox.navigation.node.container.MainNavNode +import com.bumble.appyx.demos.sandbox.navigation.ui.AppyxSampleAppTheme import com.bumble.appyx.navigation.integration.BrowserViewportWindow import com.bumble.appyx.navigation.integration.ScreenSize import com.bumble.appyx.navigation.integration.WebNodeHost -import com.bumble.appyx.navigation.node.container.MainNavNode -import com.bumble.appyx.navigation.ui.AppyxSampleAppTheme import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob