@momo-kits/native-kits 0.159.1-beta.5-debug → 0.159.1-beta.6-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 +2 -9
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +11 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +7 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +2 -32
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +30 -8
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +2 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +3 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +0 -17
- 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 -24
- package/ios/Typography/Typography.swift +4 -25
- package/local.properties +2 -2
- package/package.json +1 -1
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(
|
|
5
|
-
"
|
|
6
|
-
"Bash(python3 scripts/install_skill.py --update)",
|
|
7
|
-
"Bash(cd /Users/phuc/momo-kits/.claude/skills/design-system-kits && mkdir -p .claude/skills/design-system-kits && mv SKILL.md README.md references .claude/skills/design-system-kits/)",
|
|
8
|
-
"Bash(mv .claude/skills/design-system-kits/* . && rmdir .claude/skills/design-system-kits && rmdir .claude/skills)",
|
|
9
|
-
"WebFetch(domain:via.placeholder.com)",
|
|
10
|
-
"WebFetch(domain:image.tmdb.org)",
|
|
11
|
-
"WebFetch(domain:placehold.co)",
|
|
12
|
-
"WebFetch(domain:dummyimage.com)"
|
|
4
|
+
"Bash(which glab:*)",
|
|
5
|
+
"WebFetch(domain:gitlab.mservice.com.vn)"
|
|
13
6
|
]
|
|
14
7
|
}
|
|
15
8
|
}
|
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.157.1-beta.3'
|
|
4
4
|
spec.homepage = 'https://momo.vn'
|
|
5
5
|
spec.source = { :http=> ''}
|
|
6
6
|
spec.authors = ''
|
|
@@ -10,20 +10,27 @@ 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
|
+
|
|
13
14
|
if !Dir.exist?('build/cocoapods/framework/kits.framework') || Dir.empty?('build/cocoapods/framework/kits.framework')
|
|
14
15
|
raise "
|
|
16
|
+
|
|
15
17
|
Kotlin framework 'kits' doesn't exist yet, so a proper Xcode project can't be generated.
|
|
16
18
|
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
|
|
19
|
+
|
|
17
20
|
./gradlew :compose:generateDummyFramework
|
|
21
|
+
|
|
18
22
|
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
|
|
19
23
|
end
|
|
24
|
+
|
|
20
25
|
spec.xcconfig = {
|
|
21
26
|
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
|
|
22
27
|
}
|
|
28
|
+
|
|
23
29
|
spec.pod_target_xcconfig = {
|
|
24
30
|
'KOTLIN_PROJECT_PATH' => ':compose',
|
|
25
31
|
'PRODUCT_MODULE_NAME' => 'kits',
|
|
26
32
|
}
|
|
33
|
+
|
|
27
34
|
spec.script_phases = [
|
|
28
35
|
{
|
|
29
36
|
:name => 'Build compose',
|
|
@@ -31,8 +38,8 @@ Pod::Spec.new do |spec|
|
|
|
31
38
|
:shell_path => '/bin/sh',
|
|
32
39
|
:script => <<-SCRIPT
|
|
33
40
|
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
|
|
42
|
+
exit 0
|
|
36
43
|
fi
|
|
37
44
|
set -ev
|
|
38
45
|
REPO_ROOT="$PODS_TARGET_SRCROOT"
|
|
@@ -44,4 +51,4 @@ Pod::Spec.new do |spec|
|
|
|
44
51
|
}
|
|
45
52
|
]
|
|
46
53
|
spec.resources = ['build/compose/cocoapods/compose-resources']
|
|
47
|
-
end
|
|
54
|
+
end
|
|
@@ -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
|
|
22
21
|
import androidx.compose.foundation.layout.offset
|
|
23
22
|
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,6 +43,7 @@ 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
|
|
46
47
|
import androidx.compose.ui.zIndex
|
|
47
48
|
import kotlinx.coroutines.CoroutineScope
|
|
48
49
|
import kotlinx.coroutines.Dispatchers
|
|
@@ -102,8 +103,8 @@ fun Screen(
|
|
|
102
103
|
val keyboardController = LocalSoftwareKeyboardController.current
|
|
103
104
|
|
|
104
105
|
val isKeyboardVisible = isKeyboardVisible()
|
|
105
|
-
val indicator =
|
|
106
|
-
val bottomPadding = if (isKeyboardVisible) 0.dp else
|
|
106
|
+
val indicator = WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
|
|
107
|
+
val bottomPadding = min(indicator, if (isKeyboardVisible) 0.dp else 21.dp)
|
|
107
108
|
|
|
108
109
|
val headerHeight = if (animatedHeader !== null)
|
|
109
110
|
with(LocalDensity.current) { layoutOffset.roundToPx() }
|
|
@@ -342,7 +343,7 @@ fun ScreenSnackBarHost(footerHeightPx: Int) {
|
|
|
342
343
|
footerHeightPx
|
|
343
344
|
} else {
|
|
344
345
|
with(density) {
|
|
345
|
-
navigationBar.toPx()
|
|
346
|
+
min(navigationBar, 21.dp).toPx()
|
|
346
347
|
}
|
|
347
348
|
}.toInt()
|
|
348
349
|
|
|
@@ -400,3 +401,5 @@ fun ScreenSnackBarHost(footerHeightPx: Int) {
|
|
|
400
401
|
|
|
401
402
|
|
|
402
403
|
|
|
404
|
+
|
|
405
|
+
|
|
@@ -7,16 +7,10 @@ import androidx.compose.ui.text.TextStyle
|
|
|
7
7
|
import androidx.compose.ui.text.font.FontFamily
|
|
8
8
|
import androidx.compose.ui.text.font.FontWeight
|
|
9
9
|
import androidx.compose.ui.text.style.TextDecoration
|
|
10
|
-
import androidx.compose.ui.unit
|
|
11
|
-
import androidx.compose.ui.unit.TextUnit
|
|
12
|
-
import androidx.compose.ui.unit.TextUnitType
|
|
13
|
-
import androidx.compose.ui.unit.dp
|
|
14
|
-
import androidx.compose.ui.unit.sp
|
|
10
|
+
import androidx.compose.ui.unit.*
|
|
15
11
|
import org.jetbrains.compose.resources.Font
|
|
16
12
|
import org.jetbrains.compose.resources.FontResource
|
|
17
13
|
import org.jetbrains.compose.resources.InternalResourceApi
|
|
18
|
-
import vn.momo.kits.application.ScaleSizeMaxRate
|
|
19
|
-
import vn.momo.kits.platform.getScreenDimensions
|
|
20
14
|
import vn.momo.uikits.resources.Res
|
|
21
15
|
import vn.momo.uikits.resources.momosignature
|
|
22
16
|
import vn.momo.uikits.resources.momotrustdisplay
|
|
@@ -29,8 +23,6 @@ import vn.momo.uikits.resources.sfprotext_regular
|
|
|
29
23
|
import vn.momo.uikits.resources.sfprotext_semibold
|
|
30
24
|
import vn.momo.uikits.resources.sfprotext_thin
|
|
31
25
|
import vn.momo.uikits.resources.sfprotext_ultralight
|
|
32
|
-
import kotlin.math.max
|
|
33
|
-
import kotlin.math.min
|
|
34
26
|
|
|
35
27
|
const val DEFAULT_SCREEN_SIZE = 375f
|
|
36
28
|
const val MAX_FONT_SCALE = 1.2f
|
|
@@ -38,29 +30,7 @@ const val MAX_DEVICE_SCALE = 5
|
|
|
38
30
|
|
|
39
31
|
@Composable
|
|
40
32
|
fun scaleSize(size: Float): Float {
|
|
41
|
-
|
|
42
|
-
val deviceWidth = getScreenDimensions().width
|
|
43
|
-
val deviceScale = deviceWidth / DEFAULT_SCREEN_SIZE
|
|
44
|
-
|
|
45
|
-
val density = LocalDensity.current
|
|
46
|
-
val fontScale = density.fontScale
|
|
47
|
-
|
|
48
|
-
var fontSizeScaleDevice = size
|
|
49
|
-
var fontSizeScaleOS = size
|
|
50
|
-
|
|
51
|
-
if (deviceScale > 1) {
|
|
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
|
-
)
|
|
33
|
+
return size;
|
|
64
34
|
}
|
|
65
35
|
|
|
66
36
|
@Composable
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
package vn.momo.kits.navigation
|
|
2
2
|
|
|
3
|
-
import androidx.compose.animation.*
|
|
4
3
|
import androidx.compose.animation.core.tween
|
|
4
|
+
import androidx.compose.animation.fadeIn
|
|
5
|
+
import androidx.compose.animation.slideInHorizontally
|
|
6
|
+
import androidx.compose.animation.slideInVertically
|
|
7
|
+
import androidx.compose.animation.slideOutHorizontally
|
|
8
|
+
import androidx.compose.animation.slideOutVertically
|
|
5
9
|
import androidx.compose.foundation.layout.WindowInsets
|
|
6
10
|
import androidx.compose.foundation.layout.asPaddingValues
|
|
7
11
|
import androidx.compose.foundation.layout.systemBars
|
|
8
|
-
import androidx.compose.runtime
|
|
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
|
|
9
19
|
import androidx.compose.ui.unit.Dp
|
|
10
20
|
import androidx.compose.ui.unit.dp
|
|
11
|
-
import androidx.compose.ui.unit.min
|
|
12
21
|
import androidx.navigation.compose.NavHost
|
|
13
22
|
import androidx.navigation.compose.composable
|
|
14
23
|
import androidx.navigation.compose.rememberNavController
|
|
15
24
|
import androidx.navigation.toRoute
|
|
16
|
-
import vn.momo.kits.application
|
|
17
|
-
import vn.momo.kits.
|
|
18
|
-
import vn.momo.kits.
|
|
25
|
+
import vn.momo.kits.application.AppConfig
|
|
26
|
+
import vn.momo.kits.application.AppLanguage
|
|
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
|
|
19
37
|
import vn.momo.kits.utils.getAppStatusBarHeight
|
|
20
|
-
import vn.momo.kits.utils.getNavigationBarHeight
|
|
21
38
|
import vn.momo.maxapi.IMaxApi
|
|
22
39
|
|
|
23
40
|
@Composable
|
|
@@ -36,7 +53,11 @@ fun NavigationContainer(
|
|
|
36
53
|
val navController = rememberNavController()
|
|
37
54
|
val navigator = remember { Navigator(navController = navController, maxApi = maxApi) }
|
|
38
55
|
val statusBarHeight = statusBarHeight ?: getAppStatusBarHeight()
|
|
39
|
-
val navigationBarHeight =
|
|
56
|
+
val navigationBarHeight = if (AppNavigationBar.current == 0.dp) {
|
|
57
|
+
WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
|
|
58
|
+
} else {
|
|
59
|
+
AppNavigationBar.current
|
|
60
|
+
}
|
|
40
61
|
|
|
41
62
|
val parentContext = ApplicationContext.current
|
|
42
63
|
val mergedContext = MiniAppContext.merge(parentContext, applicationContext)
|
|
@@ -142,3 +163,4 @@ fun NavigationContainer(
|
|
|
142
163
|
val LocalMaxApi = staticCompositionLocalOf<IMaxApi?> {
|
|
143
164
|
error("No MaxApi provided")
|
|
144
165
|
}
|
|
166
|
+
|
|
@@ -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 = if (isKeyboardVisible) 0.dp else
|
|
292
|
+
val bottomPadding = min(AppNavigationBar.current, if (isKeyboardVisible) 0.dp else 21.dp)
|
|
293
293
|
Footer(footerComponent = options.footerComponent, bottomPadding = bottomPadding)
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -18,6 +18,7 @@ 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
|
|
21
22
|
import androidx.navigation.compose.NavHost
|
|
22
23
|
import androidx.navigation.compose.composable
|
|
23
24
|
import androidx.navigation.compose.rememberNavController
|
|
@@ -138,7 +139,7 @@ fun BottomTab(
|
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
)
|
|
141
|
-
Spacer(modifier = Modifier.fillMaxWidth().height(AppNavigationBar.current + Spacing.S).background(AppTheme.current.colors.background.surface))
|
|
142
|
+
Spacer(modifier = Modifier.fillMaxWidth().height(min(AppNavigationBar.current, 21.dp) + Spacing.S).background(AppTheme.current.colors.background.surface))
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
}
|
|
@@ -19,6 +19,7 @@ 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
|
|
22
23
|
import kotlinx.coroutines.delay
|
|
23
24
|
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
24
25
|
import vn.momo.kits.const.Colors
|
|
@@ -55,7 +56,7 @@ fun SnackBar(
|
|
|
55
56
|
val footerHeight = if (options.footerComponent != null) {
|
|
56
57
|
footerHeightPxState.value
|
|
57
58
|
} else {
|
|
58
|
-
with(density){ navigationBar.toPx() }
|
|
59
|
+
with(density){ min(navigationBar, 21.dp).toPx() }
|
|
59
60
|
}.toInt()
|
|
60
61
|
|
|
61
62
|
var startPosition by remember { mutableStateOf(Float.MAX_VALUE) }
|
|
@@ -128,4 +129,4 @@ fun SnackBar(
|
|
|
128
129
|
is SnackBar.Toast -> {}
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
|
-
}
|
|
132
|
+
}
|
|
@@ -12,10 +12,7 @@ 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
|
|
17
15
|
import vn.momo.kits.const.AppStatusBar
|
|
18
|
-
import vn.momo.kits.platform.getPlatformName
|
|
19
16
|
import kotlin.math.abs
|
|
20
17
|
|
|
21
18
|
|
|
@@ -89,17 +86,3 @@ fun getAppStatusBarHeight(): Dp {
|
|
|
89
86
|
AppStatusBar.current
|
|
90
87
|
}
|
|
91
88
|
}
|
|
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
|
-
}
|
|
@@ -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
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
3
|
public func scaleSize(_ size: CGFloat, _ scaleRate: CGFloat? = nil) -> CGFloat {
|
|
4
|
-
|
|
5
|
-
let maxFontScale: CGFloat = scaleRate ?? 1.2
|
|
6
|
-
let maxDeviceScale: CGFloat = 5
|
|
7
|
-
|
|
8
|
-
let deviceWidth = UIScreen.main.bounds.width
|
|
9
|
-
let deviceScale = deviceWidth / defaultScreenSize
|
|
10
|
-
|
|
11
|
-
let defaultFont = UIFont.systemFont(ofSize: UIFont.labelFontSize)
|
|
12
|
-
let scaledFont = UIFontMetrics.default.scaledFont(for: defaultFont)
|
|
13
|
-
let fontScale = scaledFont.pointSize / defaultFont.pointSize
|
|
14
|
-
|
|
15
|
-
var fontSizeDeviceScale = size
|
|
16
|
-
var fontSizeOSScale = size
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if deviceScale > 1 {
|
|
20
|
-
fontSizeDeviceScale = min(fontSizeDeviceScale * deviceScale, fontSizeDeviceScale + maxDeviceScale)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if fontScale > 1 {
|
|
24
|
-
fontSizeOSScale = min(fontSizeOSScale * fontScale, fontSizeOSScale * maxFontScale)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return max(fontSizeDeviceScale, fontSizeOSScale)
|
|
4
|
+
return size
|
|
28
5
|
}
|
|
29
6
|
|
|
30
7
|
public enum TypographyStyle {
|
|
@@ -2,30 +2,9 @@ import SwiftUI
|
|
|
2
2
|
|
|
3
3
|
public extension Font {
|
|
4
4
|
static func appFont(size: CGFloat) -> Font {
|
|
5
|
-
|
|
6
|
-
let maxFontScale: CGFloat = 1.5
|
|
7
|
-
let maxDeviceScale: CGFloat = 5
|
|
8
|
-
|
|
9
|
-
let deviceWidth = UIScreen.main.bounds.width
|
|
10
|
-
let deviceScale = deviceWidth / defaultScreenSize
|
|
11
|
-
|
|
12
|
-
let defaultFont = UIFont.systemFont(ofSize: UIFont.labelFontSize)
|
|
13
|
-
let scaledFont = UIFontMetrics.default.scaledFont(for: defaultFont)
|
|
14
|
-
let fontScale = scaledFont.pointSize / defaultFont.pointSize
|
|
15
|
-
|
|
16
|
-
var fontSize = size
|
|
17
|
-
|
|
18
|
-
if deviceScale > 1 {
|
|
19
|
-
fontSize = min(fontSize * deviceScale, fontSize + maxDeviceScale)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if fontScale > 1 {
|
|
23
|
-
fontSize = min(fontSize * fontScale, fontSize * maxFontScale)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return Font.system(size: fontSize)
|
|
5
|
+
return Font.system(size: size)
|
|
27
6
|
}
|
|
28
|
-
|
|
7
|
+
|
|
29
8
|
// New supported typography styles
|
|
30
9
|
static let headline_default_bold = appFont(size: 24).weight(.bold)
|
|
31
10
|
static let header_m_bold = appFont(size: 18).weight(.bold)
|
|
@@ -43,7 +22,7 @@ public extension Font {
|
|
|
43
22
|
static let action_s_bold = appFont(size: 14).weight(.bold)
|
|
44
23
|
static let action_xs_bold = appFont(size: 12).weight(.bold)
|
|
45
24
|
static let action_xxs_bold = appFont(size: 10).weight(.bold)
|
|
46
|
-
|
|
25
|
+
|
|
47
26
|
// Legacy styles
|
|
48
27
|
static let headline_default = appFont(size: 28).weight(.semibold)
|
|
49
28
|
static let headline_s = appFont(size: 24).weight(.semibold)
|
|
@@ -68,7 +47,7 @@ public extension Font {
|
|
|
68
47
|
static let action_xxs = appFont(size: 10).weight(.bold)
|
|
69
48
|
static let action_xs = appFont(size: 12).weight(.bold)
|
|
70
49
|
static let action_s = appFont(size: 15).weight(.bold)
|
|
71
|
-
|
|
50
|
+
|
|
72
51
|
// deprecated
|
|
73
52
|
static let h1 = appFont(size: 36).weight(.semibold) //headline_xl
|
|
74
53
|
static let h2 = appFont(size: 32).weight(.semibold)
|
package/local.properties
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
# Location of the SDK. This is only used by Gradle.
|
|
5
5
|
# For customization when using a Version Control System, please read the
|
|
6
6
|
# header note.
|
|
7
|
-
#
|
|
8
|
-
sdk.dir=/Users/
|
|
7
|
+
#Wed Aug 21 14:20:12 ICT 2024
|
|
8
|
+
sdk.dir=/Users/huynhdung/Library/Android/sdk
|