@momo-kits/native-kits 0.159.1-beta.8-debug → 0.160.1-beta.2-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/.claude/settings.local.json +8 -0
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +4 -11
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +11 -8
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +6 -9
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +9 -21
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +6 -34
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +3 -3
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +1 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +2 -3
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +17 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +4 -1
- package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
- package/gradle/libs.versions.toml +1 -1
- package/gradle.properties +1 -1
- package/ios/Typography/Text.swift +1 -1
- package/local.properties +8 -0
- package/package.json +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -17
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |spec|
|
|
2
2
|
spec.name = 'compose'
|
|
3
|
-
spec.version = '0.
|
|
3
|
+
spec.version = '0.159.1-beta.7'
|
|
4
4
|
spec.homepage = 'https://momo.vn'
|
|
5
5
|
spec.source = { :http=> ''}
|
|
6
6
|
spec.authors = ''
|
|
@@ -10,27 +10,20 @@ Pod::Spec.new do |spec|
|
|
|
10
10
|
spec.libraries = 'c++'
|
|
11
11
|
spec.ios.deployment_target = '15.0'
|
|
12
12
|
spec.dependency 'lottie-ios', '4.4.3'
|
|
13
|
-
|
|
14
13
|
if !Dir.exist?('build/cocoapods/framework/kits.framework') || Dir.empty?('build/cocoapods/framework/kits.framework')
|
|
15
14
|
raise "
|
|
16
|
-
|
|
17
15
|
Kotlin framework 'kits' doesn't exist yet, so a proper Xcode project can't be generated.
|
|
18
16
|
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
|
|
19
|
-
|
|
20
17
|
./gradlew :compose:generateDummyFramework
|
|
21
|
-
|
|
22
18
|
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
|
|
23
19
|
end
|
|
24
|
-
|
|
25
20
|
spec.xcconfig = {
|
|
26
21
|
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
spec.pod_target_xcconfig = {
|
|
30
24
|
'KOTLIN_PROJECT_PATH' => ':compose',
|
|
31
25
|
'PRODUCT_MODULE_NAME' => 'kits',
|
|
32
26
|
}
|
|
33
|
-
|
|
34
27
|
spec.script_phases = [
|
|
35
28
|
{
|
|
36
29
|
:name => 'Build compose',
|
|
@@ -38,8 +31,8 @@ Pod::Spec.new do |spec|
|
|
|
38
31
|
:shell_path => '/bin/sh',
|
|
39
32
|
:script => <<-SCRIPT
|
|
40
33
|
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
|
|
35
|
+
exit 0
|
|
43
36
|
fi
|
|
44
37
|
set -ev
|
|
45
38
|
REPO_ROOT="$PODS_TARGET_SRCROOT"
|
|
@@ -51,4 +44,4 @@ Pod::Spec.new do |spec|
|
|
|
51
44
|
}
|
|
52
45
|
]
|
|
53
46
|
spec.resources = ['build/compose/cocoapods/compose-resources']
|
|
54
|
-
end
|
|
47
|
+
end
|
|
@@ -67,10 +67,10 @@ actual fun ProvideNavigationEventDispatcherOwner(content: @Composable () -> Unit
|
|
|
67
67
|
|
|
68
68
|
@Composable
|
|
69
69
|
actual fun getScreenHeight(): Dp {
|
|
70
|
-
return getScreenDimensions().height.dp + if (
|
|
70
|
+
return getScreenDimensions().height.dp + if (getOSVersion() >= 35) 0.dp else AppStatusBar.current + AppNavigationBar.current
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
actual fun
|
|
73
|
+
actual fun getOSVersion(): Int = Build.VERSION.SDK_INT
|
|
74
74
|
|
|
75
75
|
@Composable
|
|
76
76
|
actual fun LottieAnimation(
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
package vn.momo.kits.application
|
|
2
2
|
|
|
3
|
+
import androidx.compose.runtime.Composable
|
|
3
4
|
import androidx.compose.runtime.Immutable
|
|
5
|
+
import androidx.compose.runtime.ReadOnlyComposable
|
|
4
6
|
import androidx.compose.runtime.staticCompositionLocalOf
|
|
5
7
|
import vn.momo.kits.components.TrustBannerData
|
|
6
8
|
|
|
7
9
|
@Immutable
|
|
8
10
|
data class FeatureFlags(
|
|
9
|
-
val
|
|
11
|
+
val isBaselineEnabled: Boolean? = false,
|
|
12
|
+
val isWhiteList: Boolean? = false,
|
|
13
|
+
val allowFontScale: Boolean? = true,
|
|
10
14
|
)
|
|
11
15
|
|
|
12
16
|
@Immutable
|
|
@@ -28,7 +32,6 @@ data class MiniAppContext(
|
|
|
28
32
|
val providerId: String = "",
|
|
29
33
|
val permissions: List<Map<String, Any>>? = emptyList(),
|
|
30
34
|
val features: FeatureFlags? = null,
|
|
31
|
-
val scaleSizeMaxRate: Float? = null,
|
|
32
35
|
) {
|
|
33
36
|
companion object {
|
|
34
37
|
|
|
@@ -60,7 +63,6 @@ data class MiniAppContext(
|
|
|
60
63
|
providerId = parent.providerId.ifBlank { child.providerId },
|
|
61
64
|
permissions = if (!parent.permissions.isNullOrEmpty()) parent.permissions else child.permissions,
|
|
62
65
|
features = mergeFeatureFlags(parent.features, child.features),
|
|
63
|
-
scaleSizeMaxRate = parent.scaleSizeMaxRate ?: child.scaleSizeMaxRate,
|
|
64
66
|
)
|
|
65
67
|
}
|
|
66
68
|
|
|
@@ -74,7 +76,7 @@ data class MiniAppContext(
|
|
|
74
76
|
if (child == null) return parent
|
|
75
77
|
|
|
76
78
|
return FeatureFlags(
|
|
77
|
-
|
|
79
|
+
isBaselineEnabled = parent.isBaselineEnabled ?: child.isBaselineEnabled
|
|
78
80
|
)
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -88,12 +90,15 @@ data class ComponentInformation(
|
|
|
88
90
|
val action: String? = null
|
|
89
91
|
)
|
|
90
92
|
|
|
91
|
-
var IsShowBaseLineDebug = false
|
|
92
|
-
|
|
93
93
|
val ApplicationContext = staticCompositionLocalOf<MiniAppContext?> {
|
|
94
94
|
null
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
val IsShowBaseLineDebug: Boolean
|
|
98
|
+
@Composable
|
|
99
|
+
@ReadOnlyComposable
|
|
100
|
+
get() = ApplicationContext.current?.features?.isBaselineEnabled ?: false
|
|
101
|
+
|
|
97
102
|
val AppConfig = staticCompositionLocalOf<KitConfig?> {
|
|
98
103
|
null
|
|
99
104
|
}
|
|
@@ -105,5 +110,3 @@ val AppLanguage = staticCompositionLocalOf<String?> {
|
|
|
105
110
|
val LocalComponentInformation = staticCompositionLocalOf<ComponentInformation?> {
|
|
106
111
|
null
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
val ScaleSizeMaxRate = staticCompositionLocalOf<Float?> { null }
|
|
@@ -18,9 +18,9 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|
|
18
18
|
import androidx.compose.foundation.layout.height
|
|
19
19
|
import androidx.compose.foundation.layout.ime
|
|
20
20
|
import androidx.compose.foundation.layout.imePadding
|
|
21
|
+
import androidx.compose.foundation.layout.navigationBars
|
|
21
22
|
import androidx.compose.foundation.layout.offset
|
|
22
23
|
import androidx.compose.foundation.layout.padding
|
|
23
|
-
import androidx.compose.foundation.layout.systemBars
|
|
24
24
|
import androidx.compose.foundation.rememberScrollState
|
|
25
25
|
import androidx.compose.foundation.verticalScroll
|
|
26
26
|
import androidx.compose.runtime.Composable
|
|
@@ -43,7 +43,6 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
|
|
|
43
43
|
import androidx.compose.ui.unit.Dp
|
|
44
44
|
import androidx.compose.ui.unit.IntOffset
|
|
45
45
|
import androidx.compose.ui.unit.dp
|
|
46
|
-
import androidx.compose.ui.unit.min
|
|
47
46
|
import androidx.compose.ui.zIndex
|
|
48
47
|
import kotlinx.coroutines.CoroutineScope
|
|
49
48
|
import kotlinx.coroutines.Dispatchers
|
|
@@ -60,7 +59,7 @@ import vn.momo.kits.modifier.DeprecatedModifier
|
|
|
60
59
|
import vn.momo.kits.modifier.conditional
|
|
61
60
|
import vn.momo.kits.modifier.shadow
|
|
62
61
|
import vn.momo.kits.navigation.component.SnackBar
|
|
63
|
-
import vn.momo.kits.platform.
|
|
62
|
+
import vn.momo.kits.platform.getOSVersion
|
|
64
63
|
import vn.momo.kits.utils.getAppStatusBarHeight
|
|
65
64
|
|
|
66
65
|
enum class HeaderType {
|
|
@@ -103,8 +102,8 @@ fun Screen(
|
|
|
103
102
|
val keyboardController = LocalSoftwareKeyboardController.current
|
|
104
103
|
|
|
105
104
|
val isKeyboardVisible = isKeyboardVisible()
|
|
106
|
-
val indicator =
|
|
107
|
-
val bottomPadding =
|
|
105
|
+
val indicator = getAppStatusBarHeight()
|
|
106
|
+
val bottomPadding = if (isKeyboardVisible) 0.dp else indicator
|
|
108
107
|
|
|
109
108
|
val headerHeight = if (animatedHeader !== null)
|
|
110
109
|
with(LocalDensity.current) { layoutOffset.roundToPx() }
|
|
@@ -135,7 +134,7 @@ fun Screen(
|
|
|
135
134
|
Box(
|
|
136
135
|
Modifier.fillMaxSize()
|
|
137
136
|
.background(backgroundColor ?: AppTheme.current.colors.background.default)
|
|
138
|
-
.conditional(useAvoidKeyboard &&
|
|
137
|
+
.conditional(useAvoidKeyboard && getOSVersion() > 29) {
|
|
139
138
|
imePadding()
|
|
140
139
|
}.then(DeprecatedModifier())
|
|
141
140
|
) {
|
|
@@ -343,7 +342,7 @@ fun ScreenSnackBarHost(footerHeightPx: Int) {
|
|
|
343
342
|
footerHeightPx
|
|
344
343
|
} else {
|
|
345
344
|
with(density) {
|
|
346
|
-
|
|
345
|
+
navigationBar.toPx()
|
|
347
346
|
}
|
|
348
347
|
}.toInt()
|
|
349
348
|
|
|
@@ -401,5 +400,3 @@ fun ScreenSnackBarHost(footerHeightPx: Int) {
|
|
|
401
400
|
|
|
402
401
|
|
|
403
402
|
|
|
404
|
-
|
|
405
|
-
|
|
@@ -21,10 +21,6 @@ import androidx.compose.ui.graphics.Color
|
|
|
21
21
|
import androidx.compose.ui.graphics.PathEffect
|
|
22
22
|
import androidx.compose.ui.graphics.StrokeCap
|
|
23
23
|
import androidx.compose.ui.unit.dp
|
|
24
|
-
import io.ktor.util.Platform
|
|
25
|
-
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
26
|
-
import vn.momo.kits.const.Colors
|
|
27
|
-
import vn.momo.kits.modifier.conditional
|
|
28
24
|
import vn.momo.kits.platform.getPlatformName
|
|
29
25
|
import vn.momo.kits.platform.getStatusBarHeight
|
|
30
26
|
|
|
@@ -15,7 +15,7 @@ import androidx.compose.ui.unit.sp
|
|
|
15
15
|
import org.jetbrains.compose.resources.Font
|
|
16
16
|
import org.jetbrains.compose.resources.FontResource
|
|
17
17
|
import org.jetbrains.compose.resources.InternalResourceApi
|
|
18
|
-
import vn.momo.kits.application.
|
|
18
|
+
import vn.momo.kits.application.ApplicationContext
|
|
19
19
|
import vn.momo.kits.platform.getScreenDimensions
|
|
20
20
|
import vn.momo.uikits.resources.Res
|
|
21
21
|
import vn.momo.uikits.resources.momosignature
|
|
@@ -34,33 +34,21 @@ import kotlin.math.min
|
|
|
34
34
|
|
|
35
35
|
const val DEFAULT_SCREEN_SIZE = 375f
|
|
36
36
|
const val MAX_FONT_SCALE = 1.2f
|
|
37
|
-
const val MAX_DEVICE_SCALE = 5
|
|
38
37
|
|
|
39
38
|
@Composable
|
|
40
39
|
fun scaleSize(size: Float): Float {
|
|
41
|
-
val
|
|
40
|
+
val allowFontScale = ApplicationContext.current?.features?.allowFontScale ?: true
|
|
41
|
+
if (!allowFontScale) return size
|
|
42
|
+
|
|
42
43
|
val deviceWidth = getScreenDimensions().width
|
|
43
44
|
val deviceScale = deviceWidth / DEFAULT_SCREEN_SIZE
|
|
45
|
+
val fontScale = LocalDensity.current.fontScale
|
|
44
46
|
|
|
45
|
-
val
|
|
46
|
-
val
|
|
47
|
-
|
|
48
|
-
var fontSizeScaleDevice = size
|
|
49
|
-
var fontSizeScaleOS = size
|
|
47
|
+
val maxSize = size * MAX_FONT_SCALE
|
|
48
|
+
val fontSizeScaleDevice = if (deviceScale > 1) deviceScale * size else size
|
|
49
|
+
val fontSizeScaleOS = if (fontScale > 1) fontScale * size else size
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
fontSizeScaleDevice =
|
|
53
|
-
min(deviceScale * fontSizeScaleDevice, fontSizeScaleDevice + MAX_DEVICE_SCALE)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (fontScale > 1) {
|
|
57
|
-
fontSizeScaleOS = min(fontScale * fontSizeScaleOS, fontSizeScaleOS * scaleSizeMaxRate)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return max(
|
|
61
|
-
fontSizeScaleDevice,
|
|
62
|
-
fontSizeScaleOS
|
|
63
|
-
)
|
|
51
|
+
return min(max(fontSizeScaleDevice, fontSizeScaleOS), maxSize)
|
|
64
52
|
}
|
|
65
53
|
|
|
66
54
|
@Composable
|
|
@@ -1,41 +1,18 @@
|
|
|
1
1
|
package vn.momo.kits.navigation
|
|
2
2
|
|
|
3
|
+
import androidx.compose.animation.*
|
|
3
4
|
import androidx.compose.animation.core.tween
|
|
4
|
-
import androidx.compose.
|
|
5
|
-
import androidx.compose.animation.slideInHorizontally
|
|
6
|
-
import androidx.compose.animation.slideInVertically
|
|
7
|
-
import androidx.compose.animation.slideOutHorizontally
|
|
8
|
-
import androidx.compose.animation.slideOutVertically
|
|
9
|
-
import androidx.compose.foundation.layout.WindowInsets
|
|
10
|
-
import androidx.compose.foundation.layout.asPaddingValues
|
|
11
|
-
import androidx.compose.foundation.layout.systemBars
|
|
12
|
-
import androidx.compose.runtime.Composable
|
|
13
|
-
import androidx.compose.runtime.CompositionLocalProvider
|
|
14
|
-
import androidx.compose.runtime.DisposableEffect
|
|
15
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
16
|
-
import androidx.compose.runtime.mutableStateOf
|
|
17
|
-
import androidx.compose.runtime.remember
|
|
18
|
-
import androidx.compose.runtime.staticCompositionLocalOf
|
|
5
|
+
import androidx.compose.runtime.*
|
|
19
6
|
import androidx.compose.ui.unit.Dp
|
|
20
|
-
import androidx.compose.ui.unit.dp
|
|
21
7
|
import androidx.navigation.compose.NavHost
|
|
22
8
|
import androidx.navigation.compose.composable
|
|
23
9
|
import androidx.navigation.compose.rememberNavController
|
|
24
10
|
import androidx.navigation.toRoute
|
|
25
|
-
import vn.momo.kits.application
|
|
26
|
-
import vn.momo.kits.
|
|
27
|
-
import vn.momo.kits.application.ApplicationContext
|
|
28
|
-
import vn.momo.kits.application.KitConfig
|
|
29
|
-
import vn.momo.kits.application.MiniAppContext
|
|
30
|
-
import vn.momo.kits.application.ScaleSizeMaxRate
|
|
31
|
-
import vn.momo.kits.const.AppNavigationBar
|
|
32
|
-
import vn.momo.kits.const.AppStatusBar
|
|
33
|
-
import vn.momo.kits.const.AppTheme
|
|
34
|
-
import vn.momo.kits.const.Theme
|
|
35
|
-
import vn.momo.kits.const.ThemeAssets
|
|
36
|
-
import vn.momo.kits.const.defaultTheme
|
|
11
|
+
import vn.momo.kits.application.*
|
|
12
|
+
import vn.momo.kits.const.*
|
|
37
13
|
import vn.momo.kits.platform.ProvideNavigationEventDispatcherOwner
|
|
38
14
|
import vn.momo.kits.utils.getAppStatusBarHeight
|
|
15
|
+
import vn.momo.kits.utils.getNavigationBarHeight
|
|
39
16
|
import vn.momo.maxapi.IMaxApi
|
|
40
17
|
|
|
41
18
|
@Composable
|
|
@@ -54,11 +31,7 @@ fun NavigationContainer(
|
|
|
54
31
|
val navController = rememberNavController()
|
|
55
32
|
val navigator = remember { Navigator(navController = navController, maxApi = maxApi) }
|
|
56
33
|
val statusBarHeight = statusBarHeight ?: getAppStatusBarHeight()
|
|
57
|
-
val navigationBarHeight =
|
|
58
|
-
WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
|
|
59
|
-
} else {
|
|
60
|
-
AppNavigationBar.current
|
|
61
|
-
}
|
|
34
|
+
val navigationBarHeight = getNavigationBarHeight()
|
|
62
35
|
|
|
63
36
|
val parentContext = ApplicationContext.current
|
|
64
37
|
val mergedContext = MiniAppContext.merge(parentContext, applicationContext)
|
|
@@ -88,7 +61,6 @@ fun NavigationContainer(
|
|
|
88
61
|
ApplicationContext provides mergedContext,
|
|
89
62
|
AppConfig provides config,
|
|
90
63
|
AppLanguage provides language,
|
|
91
|
-
ScaleSizeMaxRate provides mergedContext?.scaleSizeMaxRate,
|
|
92
64
|
) {
|
|
93
65
|
LaunchedEffect(Unit) {
|
|
94
66
|
setNavigator?.invoke(navigator)
|
|
@@ -62,7 +62,7 @@ import vn.momo.kits.navigation.component.HeaderRight
|
|
|
62
62
|
import vn.momo.kits.navigation.component.HeaderType
|
|
63
63
|
import vn.momo.kits.navigation.component.InputSearchType
|
|
64
64
|
import vn.momo.kits.platform.BackHandler
|
|
65
|
-
import vn.momo.kits.platform.
|
|
65
|
+
import vn.momo.kits.platform.getOSVersion
|
|
66
66
|
import vn.momo.kits.navigation.tracking.ScreenTracker
|
|
67
67
|
import vn.momo.kits.navigation.tracking.ScreenTrackingState
|
|
68
68
|
import kotlinx.coroutines.delay
|
|
@@ -166,7 +166,7 @@ internal fun StackScreen(
|
|
|
166
166
|
.conditional(options.keyboardOptions.keyboardShouldPersistTaps) {
|
|
167
167
|
hideKeyboardOnTap()
|
|
168
168
|
}
|
|
169
|
-
.conditional(options.keyboardOptions.useAvoidKeyboard &&
|
|
169
|
+
.conditional(options.keyboardOptions.useAvoidKeyboard && getOSVersion() > 29) {
|
|
170
170
|
imePadding()
|
|
171
171
|
}
|
|
172
172
|
) {
|
|
@@ -289,7 +289,7 @@ fun FooterContent(){
|
|
|
289
289
|
val imeBottom = ime.getBottom(density)
|
|
290
290
|
val thresholdPx = with(density) { 50.dp.toPx() }
|
|
291
291
|
val isKeyboardVisible = imeBottom > thresholdPx
|
|
292
|
-
val bottomPadding =
|
|
292
|
+
val bottomPadding = if (isKeyboardVisible) 0.dp else AppNavigationBar.current
|
|
293
293
|
Footer(footerComponent = options.footerComponent, bottomPadding = bottomPadding)
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -18,7 +18,6 @@ import androidx.compose.runtime.LaunchedEffect
|
|
|
18
18
|
import androidx.compose.ui.Alignment
|
|
19
19
|
import androidx.compose.ui.Modifier
|
|
20
20
|
import androidx.compose.ui.unit.dp
|
|
21
|
-
import androidx.compose.ui.unit.min
|
|
22
21
|
import androidx.navigation.compose.NavHost
|
|
23
22
|
import androidx.navigation.compose.composable
|
|
24
23
|
import androidx.navigation.compose.rememberNavController
|
|
@@ -139,7 +138,7 @@ fun BottomTab(
|
|
|
139
138
|
}
|
|
140
139
|
}
|
|
141
140
|
)
|
|
142
|
-
Spacer(modifier = Modifier.fillMaxWidth().height(
|
|
141
|
+
Spacer(modifier = Modifier.fillMaxWidth().height(AppNavigationBar.current + Spacing.S).background(AppTheme.current.colors.background.surface))
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
}
|
|
@@ -19,7 +19,6 @@ import androidx.compose.ui.layout.onGloballyPositioned
|
|
|
19
19
|
import androidx.compose.ui.platform.LocalDensity
|
|
20
20
|
import androidx.compose.ui.unit.IntOffset
|
|
21
21
|
import androidx.compose.ui.unit.dp
|
|
22
|
-
import androidx.compose.ui.unit.min
|
|
23
22
|
import kotlinx.coroutines.delay
|
|
24
23
|
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
25
24
|
import vn.momo.kits.const.Colors
|
|
@@ -56,7 +55,7 @@ fun SnackBar(
|
|
|
56
55
|
val footerHeight = if (options.footerComponent != null) {
|
|
57
56
|
footerHeightPxState.value
|
|
58
57
|
} else {
|
|
59
|
-
with(density){
|
|
58
|
+
with(density){ navigationBar.toPx() }
|
|
60
59
|
}.toInt()
|
|
61
60
|
|
|
62
61
|
var startPosition by remember { mutableStateOf(Float.MAX_VALUE) }
|
|
@@ -129,4 +128,4 @@ fun SnackBar(
|
|
|
129
128
|
is SnackBar.Toast -> {}
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
|
-
}
|
|
131
|
+
}
|
|
@@ -30,7 +30,7 @@ expect fun ProvideNavigationEventDispatcherOwner(content: @Composable () -> Unit
|
|
|
30
30
|
@Composable
|
|
31
31
|
expect fun getScreenHeight(): Dp
|
|
32
32
|
|
|
33
|
-
expect fun
|
|
33
|
+
expect fun getOSVersion(): Int
|
|
34
34
|
|
|
35
35
|
@Composable
|
|
36
36
|
expect fun LottieAnimation(
|
|
@@ -12,7 +12,10 @@ import androidx.compose.ui.graphics.Color
|
|
|
12
12
|
import androidx.compose.ui.platform.LocalDensity
|
|
13
13
|
import androidx.compose.ui.unit.Dp
|
|
14
14
|
import androidx.compose.ui.unit.dp
|
|
15
|
+
import androidx.compose.ui.unit.min
|
|
16
|
+
import vn.momo.kits.const.AppNavigationBar
|
|
15
17
|
import vn.momo.kits.const.AppStatusBar
|
|
18
|
+
import vn.momo.kits.platform.getPlatformName
|
|
16
19
|
import kotlin.math.abs
|
|
17
20
|
|
|
18
21
|
|
|
@@ -86,3 +89,17 @@ fun getAppStatusBarHeight(): Dp {
|
|
|
86
89
|
AppStatusBar.current
|
|
87
90
|
}
|
|
88
91
|
}
|
|
92
|
+
|
|
93
|
+
@Composable
|
|
94
|
+
fun getNavigationBarHeight(): Dp {
|
|
95
|
+
return if (AppNavigationBar.current == 0.dp) {
|
|
96
|
+
val systemBottomPadding = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
|
|
97
|
+
if (getPlatformName() == "iOS") {
|
|
98
|
+
min(systemBottomPadding, 21.dp)
|
|
99
|
+
} else {
|
|
100
|
+
systemBottomPadding
|
|
101
|
+
}
|
|
102
|
+
} else {
|
|
103
|
+
AppNavigationBar.current
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -35,6 +35,7 @@ import org.jetbrains.skia.FilterBlurMode
|
|
|
35
35
|
import org.jetbrains.skia.MaskFilter
|
|
36
36
|
import platform.Foundation.NSBundle
|
|
37
37
|
import platform.UIKit.UIColor
|
|
38
|
+
import platform.UIKit.UIDevice
|
|
38
39
|
import platform.UIKit.UIScreen
|
|
39
40
|
|
|
40
41
|
actual fun getPlatformName(): String = "iOS"
|
|
@@ -84,7 +85,9 @@ actual fun getScreenHeight(): Dp {
|
|
|
84
85
|
return getScreenDimensions().height.dp
|
|
85
86
|
}
|
|
86
87
|
|
|
87
|
-
actual fun
|
|
88
|
+
actual fun getOSVersion(): Int {
|
|
89
|
+
return UIDevice.currentDevice.systemVersion.substringBefore(".").toIntOrNull() ?: 0
|
|
90
|
+
}
|
|
88
91
|
|
|
89
92
|
@OptIn(ExperimentalForeignApi::class)
|
|
90
93
|
@Composable
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Example.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1600"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "3B6FB503A75BF5BC1FA6F30BC06B9D28"
|
|
18
|
+
BuildableName = "MoMoUIKits.framework"
|
|
19
|
+
BlueprintName = "MoMoUIKits"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1600"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "0AEE99A309977BD12A049FF48AF9BA4B"
|
|
18
|
+
BuildableName = "Pods_Example.framework"
|
|
19
|
+
BlueprintName = "Pods-Example"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1600"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "3847153A6E5EEFB86565BA840768F429"
|
|
18
|
+
BuildableName = "SDWebImage.framework"
|
|
19
|
+
BlueprintName = "SDWebImage"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1600"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "92EBFA3E7005B4C18A9C0B44324EB80F"
|
|
18
|
+
BuildableName = "SDWebImageSwiftUI.framework"
|
|
19
|
+
BlueprintName = "SDWebImageSwiftUI"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1600"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "6510766A9670BFA3B251E2A62446FC5D"
|
|
18
|
+
BuildableName = "SkeletonUI.framework"
|
|
19
|
+
BlueprintName = "SkeletonUI"
|
|
20
|
+
ReferencedContainer = "container:Pods.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
</TestAction>
|
|
33
|
+
<LaunchAction
|
|
34
|
+
buildConfiguration = "Debug"
|
|
35
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
36
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
37
|
+
launchStyle = "0"
|
|
38
|
+
useCustomWorkingDirectory = "NO"
|
|
39
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
40
|
+
debugDocumentVersioning = "YES"
|
|
41
|
+
debugServiceExtension = "internal"
|
|
42
|
+
allowLocationSimulation = "YES">
|
|
43
|
+
</LaunchAction>
|
|
44
|
+
<ProfileAction
|
|
45
|
+
buildConfiguration = "Release"
|
|
46
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
47
|
+
savedToolIdentifier = ""
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
debugDocumentVersioning = "YES">
|
|
50
|
+
</ProfileAction>
|
|
51
|
+
<AnalyzeAction
|
|
52
|
+
buildConfiguration = "Debug">
|
|
53
|
+
</AnalyzeAction>
|
|
54
|
+
<ArchiveAction
|
|
55
|
+
buildConfiguration = "Release"
|
|
56
|
+
revealArchiveInOrganizer = "YES">
|
|
57
|
+
</ArchiveAction>
|
|
58
|
+
</Scheme>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>MoMoUIKits.xcscheme</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>isShown</key>
|
|
10
|
+
<false />
|
|
11
|
+
<key>orderHint</key>
|
|
12
|
+
<integer>0</integer>
|
|
13
|
+
</dict>
|
|
14
|
+
<key>Pods-Example.xcscheme</key>
|
|
15
|
+
<dict>
|
|
16
|
+
<key>isShown</key>
|
|
17
|
+
<false />
|
|
18
|
+
<key>orderHint</key>
|
|
19
|
+
<integer>1</integer>
|
|
20
|
+
</dict>
|
|
21
|
+
<key>SDWebImage.xcscheme</key>
|
|
22
|
+
<dict>
|
|
23
|
+
<key>isShown</key>
|
|
24
|
+
<false />
|
|
25
|
+
<key>orderHint</key>
|
|
26
|
+
<integer>2</integer>
|
|
27
|
+
</dict>
|
|
28
|
+
<key>SDWebImageSwiftUI.xcscheme</key>
|
|
29
|
+
<dict>
|
|
30
|
+
<key>isShown</key>
|
|
31
|
+
<false />
|
|
32
|
+
<key>orderHint</key>
|
|
33
|
+
<integer>3</integer>
|
|
34
|
+
</dict>
|
|
35
|
+
<key>SkeletonUI.xcscheme</key>
|
|
36
|
+
<dict>
|
|
37
|
+
<key>isShown</key>
|
|
38
|
+
<false />
|
|
39
|
+
<key>orderHint</key>
|
|
40
|
+
<integer>4</integer>
|
|
41
|
+
</dict>
|
|
42
|
+
</dict>
|
|
43
|
+
<key>SuppressBuildableAutocreation</key>
|
|
44
|
+
<dict />
|
|
45
|
+
</dict>
|
|
46
|
+
</plist>
|
package/gradle.properties
CHANGED
|
@@ -2,7 +2,7 @@ import SwiftUI
|
|
|
2
2
|
|
|
3
3
|
public func scaleSize(_ size: CGFloat, _ scaleRate: CGFloat? = nil) -> CGFloat {
|
|
4
4
|
let defaultScreenSize: CGFloat = 375
|
|
5
|
-
let maxFontScale: CGFloat = scaleRate ?? 1.
|
|
5
|
+
let maxFontScale: CGFloat = scaleRate ?? 1.5
|
|
6
6
|
let maxDeviceScale: CGFloat = 5
|
|
7
7
|
|
|
8
8
|
let deviceWidth = UIScreen.main.bounds.width
|
package/local.properties
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
+
# as it contains information specific to your local configuration.
|
|
3
|
+
#
|
|
4
|
+
# Location of the SDK. This is only used by Gradle.
|
|
5
|
+
# For customization when using a Version Control System, please read the
|
|
6
|
+
# header note.
|
|
7
|
+
#Wed Aug 21 14:20:12 ICT 2024
|
|
8
|
+
sdk.dir=/Users/huynhdung/Library/Android/sdk
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
package vn.momo.kits.components
|
|
2
|
-
|
|
3
|
-
import androidx.compose.runtime.Composable
|
|
4
|
-
import androidx.compose.runtime.CompositionLocalProvider
|
|
5
|
-
import vn.momo.kits.application.ScaleSizeMaxRate
|
|
6
|
-
|
|
7
|
-
@Composable
|
|
8
|
-
fun ScaleSizeScope(
|
|
9
|
-
scaleSizeMaxRate: Float? = null,
|
|
10
|
-
content: @Composable () -> Unit
|
|
11
|
-
) {
|
|
12
|
-
CompositionLocalProvider(
|
|
13
|
-
ScaleSizeMaxRate provides scaleSizeMaxRate,
|
|
14
|
-
) {
|
|
15
|
-
content()
|
|
16
|
-
}
|
|
17
|
-
}
|