@momo-kits/native-kits 0.158.1-test.4-debug → 0.159.1-beta.3-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 -15
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +11 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +4 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +2 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +4 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +2 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +3 -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.properties +1 -1
- package/ios/Typography/Text.swift +11 -11
- package/local.properties +2 -2
- package/package.json +1 -1
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"Bash(
|
|
5
|
-
"
|
|
6
|
-
"Bash(git *)",
|
|
7
|
-
"Bash(ls *)",
|
|
8
|
-
"Bash(mkdir *)",
|
|
9
|
-
"Bash(rm *)",
|
|
10
|
-
"Bash(cp *)",
|
|
11
|
-
"Bash(mv *)",
|
|
12
|
-
"Bash(cat *)",
|
|
13
|
-
"Bash(find *)",
|
|
14
|
-
"Bash(grep *)",
|
|
15
|
-
"Bash(cd *)",
|
|
16
|
-
"Read(//Users/phuc/momo-native-kits/**)",
|
|
17
|
-
"Edit(//Users/phuc/momo-native-kits/**)",
|
|
18
|
-
"Write(//Users/phuc/momo-native-kits/**)"
|
|
4
|
+
"Bash(which glab:*)",
|
|
5
|
+
"WebFetch(domain:gitlab.mservice.com.vn)"
|
|
19
6
|
]
|
|
20
7
|
}
|
|
21
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
|
|
@@ -28,6 +28,7 @@ data class MiniAppContext(
|
|
|
28
28
|
val providerId: String = "",
|
|
29
29
|
val permissions: List<Map<String, Any>>? = emptyList(),
|
|
30
30
|
val features: FeatureFlags? = null,
|
|
31
|
+
val scaleSizeMaxRate: Float? = null,
|
|
31
32
|
) {
|
|
32
33
|
companion object {
|
|
33
34
|
|
|
@@ -58,7 +59,8 @@ data class MiniAppContext(
|
|
|
58
59
|
toolkitConfig = mergeMaps(parent.toolkitConfig, child.toolkitConfig),
|
|
59
60
|
providerId = parent.providerId.ifBlank { child.providerId },
|
|
60
61
|
permissions = if (!parent.permissions.isNullOrEmpty()) parent.permissions else child.permissions,
|
|
61
|
-
features = mergeFeatureFlags(parent.features, child.features)
|
|
62
|
+
features = mergeFeatureFlags(parent.features, child.features),
|
|
63
|
+
scaleSizeMaxRate = parent.scaleSizeMaxRate ?: child.scaleSizeMaxRate,
|
|
62
64
|
)
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -104,4 +106,4 @@ val LocalComponentInformation = staticCompositionLocalOf<ComponentInformation?>
|
|
|
104
106
|
null
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
val ScaleSizeMaxRate = staticCompositionLocalOf<Float?> { null }
|
|
@@ -305,7 +305,7 @@ fun Input(
|
|
|
305
305
|
visualTransformation = visualTransformation,
|
|
306
306
|
keyboardOptions = keyboardOptionsConfig,
|
|
307
307
|
modifier = inputModifier
|
|
308
|
-
.height(scaleSize(size.values.height.value
|
|
308
|
+
.height(scaleSize(size.values.height.value).dp)
|
|
309
309
|
.onFocusChanged { focusState ->
|
|
310
310
|
val wasFocused = inputState.isFocused
|
|
311
311
|
inputState = inputState.copy(
|
|
@@ -445,4 +445,4 @@ fun Input(
|
|
|
445
445
|
// Error/hint display
|
|
446
446
|
ErrorView(error, errorSpacing, hintText)
|
|
447
447
|
}
|
|
448
|
-
}
|
|
448
|
+
}
|
|
@@ -128,7 +128,7 @@ fun InputPhoneNumber(
|
|
|
128
128
|
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Number),
|
|
129
129
|
cursorBrush = SolidColor(AppTheme.current.colors.primary),
|
|
130
130
|
modifier = inputModifier
|
|
131
|
-
.height(scaleSize(size.values.height.value
|
|
131
|
+
.height(scaleSize(size.values.height.value).dp)
|
|
132
132
|
.onFocusChanged { focusState ->
|
|
133
133
|
val wasFocused = inputState.isFocused
|
|
134
134
|
inputState = inputState.copy(
|
|
@@ -230,4 +230,4 @@ fun InputPhoneNumber(
|
|
|
230
230
|
// Error/hint display
|
|
231
231
|
ErrorView(error, errorSpacing, hintText)
|
|
232
232
|
}
|
|
233
|
-
}
|
|
233
|
+
}
|
|
@@ -33,12 +33,12 @@ import kotlin.math.max
|
|
|
33
33
|
import kotlin.math.min
|
|
34
34
|
|
|
35
35
|
const val DEFAULT_SCREEN_SIZE = 375f
|
|
36
|
-
const val MAX_FONT_SCALE = 1.
|
|
36
|
+
const val MAX_FONT_SCALE = 1.2f
|
|
37
37
|
const val MAX_DEVICE_SCALE = 5
|
|
38
38
|
|
|
39
39
|
@Composable
|
|
40
|
-
fun scaleSize(size: Float
|
|
41
|
-
val scaleSizeMaxRate: Float =
|
|
40
|
+
fun scaleSize(size: Float): Float {
|
|
41
|
+
val scaleSizeMaxRate: Float = ScaleSizeMaxRate.current ?: MAX_FONT_SCALE
|
|
42
42
|
val deviceWidth = getScreenDimensions().width
|
|
43
43
|
val deviceScale = deviceWidth / DEFAULT_SCREEN_SIZE
|
|
44
44
|
|
|
@@ -77,7 +77,7 @@ fun scaleSize(size: TextUnit): TextUnit {
|
|
|
77
77
|
|
|
78
78
|
@Composable
|
|
79
79
|
fun scaleSize(size: Dp): Dp {
|
|
80
|
-
return scaleSize(size.value).
|
|
80
|
+
return scaleSize(size.value).dp
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
@Composable
|
|
@@ -9,7 +9,7 @@ import androidx.compose.ui.semantics.semantics
|
|
|
9
9
|
import androidx.compose.ui.semantics.testTag
|
|
10
10
|
import vn.momo.kits.platform.getPlatformName
|
|
11
11
|
|
|
12
|
-
fun Modifier.setAutomationId(accessibilityId: String,
|
|
12
|
+
fun Modifier.setAutomationId(accessibilityId: String, mergeDescendants: Boolean = false): Modifier {
|
|
13
13
|
return if (getPlatformName() == "Android") {
|
|
14
14
|
semantics {
|
|
15
15
|
contentDescription = accessibilityId
|
|
@@ -17,10 +17,8 @@ fun Modifier.setAutomationId(accessibilityId: String, label: String? = null, mer
|
|
|
17
17
|
} else {
|
|
18
18
|
semantics(mergeDescendants = mergeDescendants) {
|
|
19
19
|
testTag = accessibilityId
|
|
20
|
-
contentDescription = label ?: accessibilityId
|
|
21
20
|
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
21
|
+
}}
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* Alternative for [setAutomationId]
|
|
@@ -27,6 +27,7 @@ import vn.momo.kits.application.AppLanguage
|
|
|
27
27
|
import vn.momo.kits.application.ApplicationContext
|
|
28
28
|
import vn.momo.kits.application.KitConfig
|
|
29
29
|
import vn.momo.kits.application.MiniAppContext
|
|
30
|
+
import vn.momo.kits.application.ScaleSizeMaxRate
|
|
30
31
|
import vn.momo.kits.const.AppNavigationBar
|
|
31
32
|
import vn.momo.kits.const.AppStatusBar
|
|
32
33
|
import vn.momo.kits.const.AppTheme
|
|
@@ -85,7 +86,8 @@ fun NavigationContainer(
|
|
|
85
86
|
ApplicationContext provides mergedContext,
|
|
86
87
|
AppConfig provides config,
|
|
87
88
|
AppLanguage provides language,
|
|
88
|
-
|
|
89
|
+
ScaleSizeMaxRate provides mergedContext?.scaleSizeMaxRate,
|
|
90
|
+
) {
|
|
89
91
|
LaunchedEffect(Unit) {
|
|
90
92
|
setNavigator?.invoke(navigator)
|
|
91
93
|
}
|
|
@@ -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,28 +2,28 @@ 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.2
|
|
6
6
|
let maxDeviceScale: CGFloat = 5
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
let deviceWidth = UIScreen.main.bounds.width
|
|
9
9
|
let deviceScale = deviceWidth / defaultScreenSize
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
let defaultFont = UIFont.systemFont(ofSize: UIFont.labelFontSize)
|
|
12
12
|
let scaledFont = UIFontMetrics.default.scaledFont(for: defaultFont)
|
|
13
13
|
let fontScale = scaledFont.pointSize / defaultFont.pointSize
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
var fontSizeDeviceScale = size
|
|
16
16
|
var fontSizeOSScale = size
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
|
|
18
|
+
|
|
19
19
|
if deviceScale > 1 {
|
|
20
20
|
fontSizeDeviceScale = min(fontSizeDeviceScale * deviceScale, fontSizeDeviceScale + maxDeviceScale)
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
if fontScale > 1 {
|
|
24
24
|
fontSizeOSScale = min(fontSizeOSScale * fontScale, fontSizeOSScale * maxFontScale)
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
return max(fontSizeDeviceScale, fontSizeOSScale)
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -118,7 +118,7 @@ public struct MomoText: View {
|
|
|
118
118
|
private let content: String
|
|
119
119
|
private let typography: TypographyStyle
|
|
120
120
|
private let color: Color
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
public init(
|
|
123
123
|
_ content: String,
|
|
124
124
|
typography: TypographyStyle = .bodyDefaultRegular,
|
|
@@ -128,13 +128,13 @@ public struct MomoText: View {
|
|
|
128
128
|
self.typography = typography
|
|
129
129
|
self.color = color
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
|
|
132
132
|
public var body: some View {
|
|
133
133
|
let text = SwiftUI.Text(content)
|
|
134
134
|
.font(.system(size: scaleSize(typography.fontSize), weight: typography.fontWeight))
|
|
135
135
|
.foregroundColor(color)
|
|
136
136
|
.lineSpacing(scaleSize(typography.lineHeight) - scaleSize(typography.fontSize))
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
return text
|
|
139
139
|
}
|
|
140
140
|
}
|
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
|