diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8befa9eaa5..c27a805358 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,14 +6,14 @@ kotlin-coroutines = "1.7.3" javax-activation = "1.1.1" -korlibs = "4.0.10" +korlibs = "5.3.0" uuid = "0.8.2" ktor = "2.3.7" ksp = "1.9.22-1.0.16" kotlin-poet = "1.15.3" -microutils = "0.20.23" +microutils = "0.20.25" kslog = "1.3.1" versions = "0.50.0" @@ -41,11 +41,12 @@ ktor-server-host-common = { module = "io.ktor:ktor-server-host-common", version. javax-activation = { module = "javax.activation:activation", version.ref = "javax-activation" } -korlibs-klock = { module = "com.soywiz.korlibs.klock:klock", version.ref = "korlibs" } -korlibs-krypto = { module = "com.soywiz.korlibs.krypto:krypto", version.ref = "korlibs" } +korlibs-klock = { module = "com.soywiz.korge:korlibs-time", version.ref = "korlibs" } +korlibs-krypto = { module = "com.soywiz.korge:korlibs-crypto", version.ref = "korlibs" } uuid = { module = "com.benasher44:uuid", version.ref = "uuid" } +microutils-colors-common = { module = "dev.inmo:micro_utils.colors.common", version.ref = "microutils" } microutils-coroutines = { module = "dev.inmo:micro_utils.coroutines", version.ref = "microutils" } microutils-serialization-base64 = { module = "dev.inmo:micro_utils.serialization.base64", version.ref = "microutils" } microutils-serialization-encapsulator = { module = "dev.inmo:micro_utils.serialization.encapsulator", version.ref = "microutils" } diff --git a/tgbotapi.core/build.gradle b/tgbotapi.core/build.gradle index f0e60eaf0e..51ee82808d 100644 --- a/tgbotapi.core/build.gradle +++ b/tgbotapi.core/build.gradle @@ -22,6 +22,7 @@ kotlin { api libs.korlibs.krypto api libs.uuid + api libs.microutils.colors.common api libs.microutils.coroutines api libs.microutils.serialization.base64 api libs.microutils.serialization.encapsulator diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/colors/ColorId.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/colors/ColorId.kt new file mode 100644 index 0000000000..7f882e7491 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/colors/ColorId.kt @@ -0,0 +1,17 @@ +package dev.inmo.tgbotapi.types.colors + +import dev.inmo.micro_utils.colors.common.HEXAColor +import kotlinx.serialization.Serializable +import kotlin.jvm.JvmInline + +@Serializable +@JvmInline +value class ColorId( + val int: Int +) { + companion object { + val defaultAccentColors = mapOf( + ColorId(0) to HEXAColor(0xff0000ffu), + ) + } +} \ No newline at end of file diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/Colors.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/Color.kt similarity index 100% rename from tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/Colors.kt rename to tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/Color.kt