@momo-kits/native-kits 0.161.1-beta.15-debug → 0.161.2-beta.1-debug
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 +9 -3
- package/compose/build.gradle.kts.backup +8 -2
- package/compose/compose.podspec +1 -1
- package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +9 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +8 -14
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +324 -117
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +4 -3
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +4 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +5 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +5 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +19 -14
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +27 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +1 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +1 -28
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +63 -49
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +23 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +12 -4
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +33 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +18 -8
- package/gradle/libs.versions.toml +3 -1
- package/gradle.properties +1 -1
- package/ios/Application/ApplicationEnvironment.swift +2 -6
- package/ios/Input/Input.swift +50 -21
- package/ios/Input/InputPhoneNumber.swift +17 -17
- package/ios/StatusBarTap/StatusBarTap.h +13 -0
- package/ios/StatusBarTap/StatusBarTap.m +75 -0
- package/ios/Typography/Text.swift +19 -14
- package/ios/Typography/Typography.swift +22 -1
- package/ios/native-kits.podspec +2 -1
- package/package.json +1 -1
- package/settings.gradle.kts +15 -3
package/compose/build.gradle.kts
CHANGED
|
@@ -30,7 +30,7 @@ kotlin {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
val fwName = gitlabArtifactId
|
|
33
|
-
val iosTargets = listOf(
|
|
33
|
+
val iosTargets = listOf(iosArm64(), iosSimulatorArm64())
|
|
34
34
|
iosTargets.forEach {
|
|
35
35
|
it.binaries.framework {
|
|
36
36
|
baseName = fwName
|
|
@@ -40,7 +40,7 @@ kotlin {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
cocoapods {
|
|
43
|
-
version = "0.161.
|
|
43
|
+
version = "0.161.2-beta.1-debug"
|
|
44
44
|
summary = "IOS Shared module"
|
|
45
45
|
homepage = "https://momo.vn"
|
|
46
46
|
ios.deploymentTarget = "15.0"
|
|
@@ -73,6 +73,7 @@ kotlin {
|
|
|
73
73
|
implementation(libs.jetbrains.serialization.json)
|
|
74
74
|
implementation(libs.kotlinx.datetime)
|
|
75
75
|
api(libs.native.max.api)
|
|
76
|
+
implementation(libs.compottie)
|
|
76
77
|
}
|
|
77
78
|
androidMain.dependencies {
|
|
78
79
|
implementation(libs.ktor.client.okhttp)
|
|
@@ -108,12 +109,17 @@ repositories {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
mavenCentral()
|
|
112
|
+
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
|
111
113
|
maven {
|
|
112
114
|
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
113
115
|
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
114
116
|
}
|
|
115
117
|
maven {
|
|
116
|
-
url = uri("
|
|
118
|
+
url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
|
|
119
|
+
credentials {
|
|
120
|
+
username = "viewer"
|
|
121
|
+
password = "viewer"
|
|
122
|
+
}
|
|
117
123
|
isAllowInsecureProtocol = true
|
|
118
124
|
}
|
|
119
125
|
}
|
|
@@ -30,7 +30,7 @@ kotlin {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
val fwName = gitlabArtifactId
|
|
33
|
-
val iosTargets = listOf(
|
|
33
|
+
val iosTargets = listOf(iosArm64(), iosSimulatorArm64())
|
|
34
34
|
iosTargets.forEach {
|
|
35
35
|
it.binaries.framework {
|
|
36
36
|
baseName = fwName
|
|
@@ -73,6 +73,7 @@ kotlin {
|
|
|
73
73
|
implementation(libs.jetbrains.serialization.json)
|
|
74
74
|
implementation(libs.kotlinx.datetime)
|
|
75
75
|
api(libs.native.max.api)
|
|
76
|
+
implementation(libs.compottie)
|
|
76
77
|
}
|
|
77
78
|
androidMain.dependencies {
|
|
78
79
|
implementation(libs.ktor.client.okhttp)
|
|
@@ -108,12 +109,17 @@ repositories {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
mavenCentral()
|
|
112
|
+
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
|
111
113
|
maven {
|
|
112
114
|
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
113
115
|
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
114
116
|
}
|
|
115
117
|
maven {
|
|
116
|
-
url = uri("
|
|
118
|
+
url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
|
|
119
|
+
credentials {
|
|
120
|
+
username = "viewer"
|
|
121
|
+
password = "viewer"
|
|
122
|
+
}
|
|
117
123
|
isAllowInsecureProtocol = true
|
|
118
124
|
}
|
|
119
125
|
}
|
package/compose/compose.podspec
CHANGED
|
@@ -70,15 +70,22 @@ actual fun getScreenHeight(): Dp {
|
|
|
70
70
|
return getScreenDimensions().height.dp + if (getOSVersion() >= 35) 0.dp else AppStatusBar.current + AppNavigationBar.current
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
actual fun getOSVersion():
|
|
73
|
+
actual fun getOSVersion(): OSVersion = OSVersion.Android(sdk = Build.VERSION.SDK_INT)
|
|
74
74
|
|
|
75
75
|
@Composable
|
|
76
76
|
actual fun LottieAnimation(
|
|
77
77
|
path: String,
|
|
78
78
|
tintColor: Color?,
|
|
79
79
|
bgColor: Color?,
|
|
80
|
-
|
|
80
|
+
placedAsOverlay: Boolean,
|
|
81
|
+
modifier: Modifier,
|
|
82
|
+
useCompose: Boolean
|
|
81
83
|
) {
|
|
84
|
+
if (useCompose) {
|
|
85
|
+
ComposeLottieAnimation(path, tintColor, bgColor, modifier)
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
82
89
|
val json = readJson(path)
|
|
83
90
|
|
|
84
91
|
if (json.isEmpty()) {
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
package vn.momo.kits.application
|
|
2
2
|
|
|
3
3
|
import androidx.compose.runtime.Immutable
|
|
4
|
-
import androidx.compose.runtime.mutableStateOf
|
|
5
4
|
import androidx.compose.runtime.staticCompositionLocalOf
|
|
6
5
|
import vn.momo.kits.components.TrustBannerData
|
|
7
6
|
|
|
8
7
|
@Immutable
|
|
9
8
|
data class FeatureFlags(
|
|
10
|
-
val
|
|
11
|
-
val isWhiteList: Boolean? = false,
|
|
12
|
-
val allowFontScale: Boolean? = true,
|
|
9
|
+
val showBaseLineDebug: Boolean? = false,
|
|
13
10
|
)
|
|
14
11
|
|
|
15
12
|
@Immutable
|
|
@@ -31,6 +28,7 @@ data class MiniAppContext(
|
|
|
31
28
|
val providerId: String = "",
|
|
32
29
|
val permissions: List<Map<String, Any>>? = emptyList(),
|
|
33
30
|
val features: FeatureFlags? = null,
|
|
31
|
+
val scaleSizeMaxRate: Float? = null,
|
|
34
32
|
) {
|
|
35
33
|
companion object {
|
|
36
34
|
|
|
@@ -62,6 +60,7 @@ data class MiniAppContext(
|
|
|
62
60
|
providerId = parent.providerId.ifBlank { child.providerId },
|
|
63
61
|
permissions = if (!parent.permissions.isNullOrEmpty()) parent.permissions else child.permissions,
|
|
64
62
|
features = mergeFeatureFlags(parent.features, child.features),
|
|
63
|
+
scaleSizeMaxRate = parent.scaleSizeMaxRate ?: child.scaleSizeMaxRate,
|
|
65
64
|
)
|
|
66
65
|
}
|
|
67
66
|
|
|
@@ -75,7 +74,7 @@ data class MiniAppContext(
|
|
|
75
74
|
if (child == null) return parent
|
|
76
75
|
|
|
77
76
|
return FeatureFlags(
|
|
78
|
-
|
|
77
|
+
showBaseLineDebug = parent.showBaseLineDebug ?: child.showBaseLineDebug
|
|
79
78
|
)
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -89,19 +88,12 @@ data class ComponentInformation(
|
|
|
89
88
|
val action: String? = null
|
|
90
89
|
)
|
|
91
90
|
|
|
91
|
+
var IsShowBaseLineDebug = false
|
|
92
|
+
|
|
92
93
|
val ApplicationContext = staticCompositionLocalOf<MiniAppContext?> {
|
|
93
94
|
null
|
|
94
95
|
}
|
|
95
96
|
|
|
96
|
-
var IsShowBaseLineDebug = false
|
|
97
|
-
|
|
98
|
-
private val UseFontScaleSystemState = mutableStateOf(true)
|
|
99
|
-
var UseFontScaleSystem: Boolean
|
|
100
|
-
get() = UseFontScaleSystemState.value
|
|
101
|
-
set(value) {
|
|
102
|
-
UseFontScaleSystemState.value = value
|
|
103
|
-
}
|
|
104
|
-
|
|
105
97
|
val AppConfig = staticCompositionLocalOf<KitConfig?> {
|
|
106
98
|
null
|
|
107
99
|
}
|
|
@@ -113,3 +105,5 @@ val AppLanguage = staticCompositionLocalOf<String?> {
|
|
|
113
105
|
val LocalComponentInformation = staticCompositionLocalOf<ComponentInformation?> {
|
|
114
106
|
null
|
|
115
107
|
}
|
|
108
|
+
|
|
109
|
+
val ScaleSizeMaxRate = staticCompositionLocalOf<Float?> { null }
|