@momo-kits/native-kits 0.89.13 → 0.89.15-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compose/build.gradle.kts +1 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +3 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +3 -2
- package/gradle.properties +3 -3
- package/package.json +1 -1
- package/compose/src/commonMain/composeResources/drawable/test.jpg +0 -0
package/compose/build.gradle.kts
CHANGED
|
@@ -6,7 +6,7 @@ plugins {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
val libGroup = "vn.momo.kits"
|
|
9
|
-
val libVersion = "0.0.
|
|
9
|
+
val libVersion = "0.0.2"
|
|
10
10
|
|
|
11
11
|
kotlin {
|
|
12
12
|
androidTarget {
|
|
@@ -37,7 +37,6 @@ kotlin {
|
|
|
37
37
|
implementation(libs.ktor.client.core)
|
|
38
38
|
implementation("com.github.skydoves:landscapist-coil3:2.3.2")
|
|
39
39
|
implementation(compose.components.resources)
|
|
40
|
-
implementation("org.jetbrains.androidx.navigation:navigation-compose:2.7.0-alpha07")
|
|
41
40
|
|
|
42
41
|
implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion")
|
|
43
42
|
implementation("cafe.adriel.voyager:voyager-screenmodel:$voyagerVersion")
|
|
@@ -7,6 +7,7 @@ import androidx.compose.ui.text.font.FontFamily
|
|
|
7
7
|
import androidx.compose.ui.text.font.FontStyle
|
|
8
8
|
import androidx.compose.ui.text.font.FontWeight
|
|
9
9
|
import androidx.compose.ui.unit.sp
|
|
10
|
+
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
|
10
11
|
import org.jetbrains.compose.resources.Font
|
|
11
12
|
import org.jetbrains.compose.resources.FontResource
|
|
12
13
|
import org.jetbrains.compose.resources.InternalResourceApi
|
|
@@ -25,12 +26,12 @@ fun scaleSize(size: Float): Float {
|
|
|
25
26
|
return size
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
@OptIn(InternalResourceApi::class)
|
|
29
|
+
@OptIn(InternalResourceApi::class, ExperimentalResourceApi::class)
|
|
29
30
|
@Composable
|
|
30
31
|
fun getFont(font: String): FontFamily {
|
|
31
32
|
val fontResource = FontResource(
|
|
32
33
|
"font:${font}",
|
|
33
|
-
setOf(ResourceItem(setOf(), "font/${font}.ttf"
|
|
34
|
+
setOf(ResourceItem(setOf(), "font/${font}.ttf"))
|
|
34
35
|
)
|
|
35
36
|
return FontFamily(Font(fontResource))
|
|
36
37
|
}
|
|
@@ -38,9 +39,6 @@ fun getFont(font: String): FontFamily {
|
|
|
38
39
|
@Composable
|
|
39
40
|
fun getFontFamily(fontFamily: String, fontWeight: FontWeight? = FontWeight.Normal): FontFamily {
|
|
40
41
|
val key = "$fontFamily-${fontWeight?.weight}"
|
|
41
|
-
if (getPlatformName() == "iOS") {
|
|
42
|
-
return FontFamily.Default
|
|
43
|
-
}
|
|
44
42
|
val fontMap = mapOf(
|
|
45
43
|
"SFProText-100" to getFont("sfprotext_thin"),
|
|
46
44
|
"SFProText-200" to getFont("sfprotext_ultralight"),
|
|
@@ -2,14 +2,15 @@ package vn.momo.kits.utils
|
|
|
2
2
|
|
|
3
3
|
import androidx.compose.runtime.Composable
|
|
4
4
|
import org.jetbrains.compose.resources.DrawableResource
|
|
5
|
+
import org.jetbrains.compose.resources.ExperimentalResourceApi
|
|
5
6
|
import org.jetbrains.compose.resources.InternalResourceApi
|
|
6
7
|
import org.jetbrains.compose.resources.ResourceItem
|
|
7
8
|
|
|
8
|
-
@OptIn(InternalResourceApi::class)
|
|
9
|
+
@OptIn(InternalResourceApi::class, ExperimentalResourceApi::class)
|
|
9
10
|
@Composable
|
|
10
11
|
fun getResource(name: String): DrawableResource {
|
|
11
12
|
return DrawableResource(
|
|
12
13
|
"drawable:$name",
|
|
13
|
-
setOf(ResourceItem(setOf(), "drawable/$name"
|
|
14
|
+
setOf(ResourceItem(setOf(), "drawable/$name"))
|
|
14
15
|
)
|
|
15
16
|
}
|
package/gradle.properties
CHANGED
|
@@ -12,8 +12,8 @@ android.compileSdk=34
|
|
|
12
12
|
android.targetSdk=34
|
|
13
13
|
android.minSdk=24
|
|
14
14
|
#Versions
|
|
15
|
-
kotlin.version=1.9.
|
|
15
|
+
kotlin.version=1.9.23
|
|
16
16
|
agp.version=8.1.1
|
|
17
|
-
compose.version=1.6.
|
|
18
|
-
composeCompilerVersion = 1.5.
|
|
17
|
+
compose.version=1.6.2
|
|
18
|
+
composeCompilerVersion = 1.5.11
|
|
19
19
|
maven-publish.version=0.25.3
|
package/package.json
CHANGED
|
Binary file
|