diff --git a/app-launcher/desktop/build.gradle.kts b/app-launcher/desktop/build.gradle.kts index fe94033f3..386715140 100644 --- a/app-launcher/desktop/build.gradle.kts +++ b/app-launcher/desktop/build.gradle.kts @@ -23,6 +23,7 @@ kotlin { commonMain.dependencies { implementation(projects.appLauncher.common) implementation(projects.httpClient) + implementation(projects.keyNavigation) implementation(projects.platformSupport) implementation(libs.ajalt.clikt) diff --git a/key-navigation/build.gradle.kts b/key-navigation/build.gradle.kts new file mode 100644 index 000000000..8e05bef35 --- /dev/null +++ b/key-navigation/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + id("io.ashdavies.compose") + id("io.ashdavies.kotlin") +} + +kotlin { + sourceSets.commonMain.dependencies { + implementation(libs.slack.circuit.foundation) + } +} diff --git a/app-launcher/desktop/src/commonMain/kotlin/io/ashdavies/playground/KeyNavigationDecoration.kt b/key-navigation/src/commonMain/kotlin/io/ashdavies/playground/KeyNavigationDecoration.kt similarity index 98% rename from app-launcher/desktop/src/commonMain/kotlin/io/ashdavies/playground/KeyNavigationDecoration.kt rename to key-navigation/src/commonMain/kotlin/io/ashdavies/playground/KeyNavigationDecoration.kt index 3822d9f44..d0e631bf3 100644 --- a/app-launcher/desktop/src/commonMain/kotlin/io/ashdavies/playground/KeyNavigationDecoration.kt +++ b/key-navigation/src/commonMain/kotlin/io/ashdavies/playground/KeyNavigationDecoration.kt @@ -16,7 +16,7 @@ import com.slack.circuit.backstack.NavDecoration import com.slack.circuit.foundation.NavigatorDefaults import kotlinx.collections.immutable.ImmutableList -internal class KeyNavigationDecoration( +public class KeyNavigationDecoration( private val decoration: NavDecoration = NavigatorDefaults.DefaultDecoration, private val predicate: (KeyEvent) -> Boolean = { it.key == Key.Escape }, private val onBackInvoked: () -> Unit, diff --git a/settings.gradle.kts b/settings.gradle.kts index f6002888a..5b38d6589 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -64,6 +64,7 @@ include( ":http-client", ":http-common", ":identity-manager", + ":key-navigation", ":kotlin-gb", ":map-routes", ":maps-routing",