@momo-kits/native-kits 0.163.1-beta.13-debug → 0.163.1-beta.14-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +5 -5
- package/gradle.properties +1 -1
- package/ios/Application/Localize.swift +0 -32
- package/ios/Application/Navigation/NavigationContainer.swift +0 -3
- package/ios/Popup/PopupDisplay.swift +1 -1
- package/ios/Popup/PopupNotify.swift +1 -1
- package/ios/Popup/PopupPromotion.swift +11 -5
- package/ios/Template/TrustBanner/TrustBanner.swift +2 -2
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +1 -1
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +2 -2
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -78
- package/local.properties +0 -8
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
|
@@ -29,6 +29,7 @@ import androidx.compose.ui.Alignment
|
|
|
29
29
|
import androidx.compose.ui.Modifier
|
|
30
30
|
import androidx.compose.ui.focus.onFocusChanged
|
|
31
31
|
import androidx.compose.ui.graphics.Color
|
|
32
|
+
import androidx.compose.ui.graphics.takeOrElse
|
|
32
33
|
import androidx.compose.ui.text.TextStyle
|
|
33
34
|
import androidx.compose.ui.text.input.KeyboardType
|
|
34
35
|
import androidx.compose.ui.text.style.TextOverflow
|
|
@@ -49,7 +50,7 @@ import vn.momo.kits.utils.ifTrue
|
|
|
49
50
|
internal fun RenderRightIconSearch(
|
|
50
51
|
loading: Boolean,
|
|
51
52
|
icon: String,
|
|
52
|
-
color: Color
|
|
53
|
+
color: Color?,
|
|
53
54
|
onClick: () -> Unit,
|
|
54
55
|
iconModifier: Modifier = Modifier
|
|
55
56
|
) {
|
|
@@ -57,7 +58,7 @@ internal fun RenderRightIconSearch(
|
|
|
57
58
|
Box(Modifier.padding(horizontal = Spacing.S)) {
|
|
58
59
|
CircularProgressIndicator(
|
|
59
60
|
modifier = Modifier.size(16.dp),
|
|
60
|
-
color = color,
|
|
61
|
+
color = color ?: AppTheme.current.colors.text.default,
|
|
61
62
|
trackColor = Color.Transparent,
|
|
62
63
|
strokeWidth = 2.dp
|
|
63
64
|
)
|
|
@@ -90,7 +91,7 @@ data class InputSearchProps(
|
|
|
90
91
|
val onPressButtonText: () -> Unit = {},
|
|
91
92
|
val disabled: Boolean = false,
|
|
92
93
|
val icon: String = "",
|
|
93
|
-
val iconColor: Color = Color
|
|
94
|
+
val iconColor: Color? = Color.Unspecified,
|
|
94
95
|
val onRightIconPressed: () -> Unit = {},
|
|
95
96
|
val onFocus: () -> Unit = {},
|
|
96
97
|
val onBlur: () -> Unit = {},
|
|
@@ -113,7 +114,6 @@ data class InputSearchProps(
|
|
|
113
114
|
fun InputSearch(
|
|
114
115
|
inputSearchProps: InputSearchProps = InputSearchProps(
|
|
115
116
|
text = remember { mutableStateOf("") },
|
|
116
|
-
iconColor = AppTheme.current.colors.text.default
|
|
117
117
|
),
|
|
118
118
|
) {
|
|
119
119
|
var isFocused by remember { mutableStateOf(false) }
|
|
@@ -121,7 +121,7 @@ fun InputSearch(
|
|
|
121
121
|
val disabledColor = AppTheme.current.colors.text.disable
|
|
122
122
|
var textColor = AppTheme.current.colors.text.default
|
|
123
123
|
var placeholderColor = AppTheme.current.colors.text.hint
|
|
124
|
-
var iconTintColor = inputSearchProps.iconColor
|
|
124
|
+
var iconTintColor = inputSearchProps.iconColor?.takeOrElse { AppTheme.current.colors.text.default }
|
|
125
125
|
|
|
126
126
|
if (inputSearchProps.disabled) {
|
|
127
127
|
textColor = disabledColor
|
package/gradle.properties
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
//
|
|
12
12
|
|
|
13
13
|
import Foundation
|
|
14
|
-
import SwiftUI
|
|
15
14
|
|
|
16
15
|
/// Translation dictionary keyed by language; both `vi` and `en` are required.
|
|
17
16
|
public struct LocalizationObject {
|
|
@@ -276,34 +275,3 @@ public final class Localize: ObservableObject {
|
|
|
276
275
|
]
|
|
277
276
|
)
|
|
278
277
|
}
|
|
279
|
-
|
|
280
|
-
/// Snapshots `currentLanguage` alongside the instance so SwiftUI sees an environment
|
|
281
|
-
/// *change* on `changeLanguage`: the `Localize` reference alone never changes, and
|
|
282
|
-
/// `@Environment` does not subscribe to `@Published` the way `@EnvironmentObject` does.
|
|
283
|
-
private struct LocalizeBox: Equatable {
|
|
284
|
-
let localize: Localize
|
|
285
|
-
let language: String
|
|
286
|
-
|
|
287
|
-
init(_ localize: Localize) {
|
|
288
|
-
self.localize = localize
|
|
289
|
-
self.language = localize.currentLanguage
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
static func == (lhs: LocalizeBox, rhs: LocalizeBox) -> Bool {
|
|
293
|
-
lhs.localize === rhs.localize && lhs.language == rhs.language
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
private struct LocalizeKey: EnvironmentKey {
|
|
298
|
-
/// A default-constructed `Localize` already carries the full kit dictionary, so a
|
|
299
|
-
/// consumer that never injects one renders untranslated-but-correct text instead of
|
|
300
|
-
/// trapping the way `@EnvironmentObject` does.
|
|
301
|
-
static let defaultValue = LocalizeBox(Localize())
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
public extension EnvironmentValues {
|
|
305
|
-
var localize: Localize {
|
|
306
|
-
get { self[LocalizeKey.self].localize }
|
|
307
|
-
set { self[LocalizeKey.self] = LocalizeBox(newValue) }
|
|
308
|
-
}
|
|
309
|
-
}
|
|
@@ -63,14 +63,12 @@ public struct NavigationContainer<Initial: View>: View {
|
|
|
63
63
|
.environmentObject(applicationEnvironment)
|
|
64
64
|
.environment(\.applicationEnvironment, applicationEnvironment)
|
|
65
65
|
.environmentObject(localize)
|
|
66
|
-
.environment(\.localize, localize)
|
|
67
66
|
.fullScreenCover(item: $navigator.presented) { route in
|
|
68
67
|
screenView(forDialog: route)
|
|
69
68
|
.environmentObject(navigator)
|
|
70
69
|
.environmentObject(applicationEnvironment)
|
|
71
70
|
.environment(\.applicationEnvironment, applicationEnvironment)
|
|
72
71
|
.environmentObject(localize)
|
|
73
|
-
.environment(\.localize, localize)
|
|
74
72
|
}
|
|
75
73
|
.overlay {
|
|
76
74
|
if let item = navigator.overplay {
|
|
@@ -79,7 +77,6 @@ public struct NavigationContainer<Initial: View>: View {
|
|
|
79
77
|
.environmentObject(applicationEnvironment)
|
|
80
78
|
.environment(\.applicationEnvironment, applicationEnvironment)
|
|
81
79
|
.environmentObject(localize)
|
|
82
|
-
.environment(\.localize, localize)
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
82
|
.onAppear {
|
|
@@ -20,21 +20,26 @@ public struct PopupPromotion: View {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
public var body: some View {
|
|
23
|
+
// Mirrors Kotlin's `Modifier.fillMaxWidth().aspectRatio(0.72f)` box with
|
|
24
|
+
// `ContentScale.FillBounds` inside it: a fixed-ratio frame the image stretches
|
|
25
|
+
// to exactly fill (no `.aspectRatio` modifier on the image itself, unlike the
|
|
26
|
+
// previous `.fit`, which letterboxed instead of stretching).
|
|
27
|
+
let boxWidth = UIScreen.main.bounds.width - Spacing.XL * 2
|
|
28
|
+
let boxHeight = boxWidth / 0.72
|
|
29
|
+
|
|
23
30
|
VStack(spacing: 8) {
|
|
24
31
|
if(imageUrl.isEmpty) {
|
|
25
|
-
Icon(source: "media_fail", size:
|
|
32
|
+
Icon(source: "media_fail", size: boxWidth)
|
|
26
33
|
}
|
|
27
34
|
else {
|
|
28
35
|
WebImage(url: URL(string: imageUrl)!)
|
|
29
36
|
.resizable()
|
|
30
37
|
.placeholder {
|
|
31
38
|
Color.gray
|
|
32
|
-
.
|
|
33
|
-
.frame(maxWidth: UIScreen.main.bounds.width - Spacing.XL * 2)
|
|
39
|
+
.frame(width: boxWidth, height: boxHeight)
|
|
34
40
|
.clipped()
|
|
35
41
|
}
|
|
36
|
-
.
|
|
37
|
-
.frame(maxWidth: UIScreen.main.bounds.width - Spacing.XL * 2, alignment: .center)
|
|
42
|
+
.frame(width: boxWidth, height: boxHeight, alignment: .center)
|
|
38
43
|
.clipped()
|
|
39
44
|
.onTapGesture {
|
|
40
45
|
onAction?()
|
|
@@ -65,6 +70,7 @@ public struct PopupPromotion: View {
|
|
|
65
70
|
.padding(8)
|
|
66
71
|
.zIndex(1)
|
|
67
72
|
}
|
|
73
|
+
.buttonStyle(.plain)
|
|
68
74
|
}
|
|
69
75
|
}
|
|
70
76
|
|
|
@@ -51,8 +51,8 @@ let defaultBanner = TrustBannerData(
|
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
public struct TrustBanner: View {
|
|
54
|
-
@
|
|
55
|
-
@
|
|
54
|
+
@EnvironmentObject var applicationEnvironment: ApplicationEnvironment
|
|
55
|
+
@EnvironmentObject private var localize: Localize
|
|
56
56
|
|
|
57
57
|
var onPress: ((String)->Void)?
|
|
58
58
|
|
package/ios/native-kits.podspec
CHANGED
|
@@ -29,7 +29,7 @@ struct PopupPromotionDemo: View {
|
|
|
29
29
|
private struct PopupPromotionDemoContent: View {
|
|
30
30
|
@EnvironmentObject private var navigator: Navigator
|
|
31
31
|
|
|
32
|
-
@State private var imageUrl = "https://static.momocdn.net/app/
|
|
32
|
+
@State private var imageUrl = "https://static.momocdn.net/app/img/popup_permission/img_permission_popup_camera.png"
|
|
33
33
|
|
|
34
34
|
var body: some View {
|
|
35
35
|
ScrollView {
|
|
@@ -48,7 +48,7 @@ private struct PopupPromotionDemoContent: View {
|
|
|
48
48
|
)
|
|
49
49
|
.padding(.top, 8)
|
|
50
50
|
}
|
|
51
|
-
.padding(
|
|
51
|
+
.padding(16)
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
package/package.json
CHANGED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(curl -s -o /dev/null -w \"%{http_code}\" \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.pom\")",
|
|
5
|
-
"Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/maven-metadata.xml\")",
|
|
6
|
-
"Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko/maven-metadata.xml\")",
|
|
7
|
-
"Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko/0.144.6/skiko-0.144.6.module\")",
|
|
8
|
-
"Bash(curl -s -o /dev/null -w '%{http_code}' https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.__TRACKED_VAR__)",
|
|
9
|
-
"Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/\")",
|
|
10
|
-
"Bash(curl -s \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/\")",
|
|
11
|
-
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.148.1/skiko-android-0.148.1.pom\")",
|
|
12
|
-
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" \"https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-android/0.144.5/skiko-android-0.144.5.pom\")",
|
|
13
|
-
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" \"https://dl.google.com/dl/android/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.pom\")",
|
|
14
|
-
"Bash(curl -s \"https://search.maven.org/solrsearch/select?q=a:skiko-android&rows=5&wt=json\")",
|
|
15
|
-
"Bash(curl -sL -o /dev/null -w \"%{http_code} %{url_effective}\\\\n\" \"https://repo1.maven.org/maven2/org/jetbrains/skiko/skiko-android/0.144.6/skiko-android-0.144.6.pom\")",
|
|
16
|
-
"Bash(curl *)",
|
|
17
|
-
"Bash(./gradlew :sample:androidApp:dependencies --configuration debugRuntimeClasspath)",
|
|
18
|
-
"Bash(./gradlew :sample:shared:compileDebugKotlinAndroid)",
|
|
19
|
-
"Bash(./gradlew :sample:androidApp:compileDebugKotlin)",
|
|
20
|
-
"Bash(ls -d *.xcodeproj)",
|
|
21
|
-
"Bash(grep -c ChipDemo.swift __TRACKED_VAR__/project.pbxproj)",
|
|
22
|
-
"Bash(grep -c PBXFileSystemSynchronizedRootGroup __TRACKED_VAR__/project.pbxproj)",
|
|
23
|
-
"Bash(grep -c InformationDemo.swift __TRACKED_VAR__/project.pbxproj)",
|
|
24
|
-
"Bash(plutil -lint project.pbxproj)",
|
|
25
|
-
"Bash(xcode-select -p)",
|
|
26
|
-
"Bash(/usr/bin/xcrun xcodebuild *)",
|
|
27
|
-
"Bash(echo \"exit: $?\")",
|
|
28
|
-
"Bash(/Applications/Xcode26.app/Contents/Developer/usr/bin/xcodebuild -version)",
|
|
29
|
-
"Bash(./gradlew :compose:tasks --all)",
|
|
30
|
-
"Bash(grep -n \"vanniktech\\\\|mavenPublishing\\\\|^publishing\\\\|version = gitlabVersion\\\\|namespace =\\\\|compileSdk =\\\\|minSdk =\\\\|GitLabPackages\\\\|name = \\\\\"\\\\${gitlabRepo}Packages\\\\\"\")",
|
|
31
|
-
"Bash(git checkout *)",
|
|
32
|
-
"Bash(./gradlew :compose:publishAllPublicationsToGitLabPackagesRepository --dry-run)",
|
|
33
|
-
"Bash(git fetch *)",
|
|
34
|
-
"Bash(git pull *)",
|
|
35
|
-
"Bash(git push *)",
|
|
36
|
-
"Bash(git branch *)",
|
|
37
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -list)",
|
|
38
|
-
"Bash(xcrun simctl *)",
|
|
39
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme iosApp -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14 Pro' -configuration Debug build CODE_SIGNING_ALLOWED=NO)",
|
|
40
|
-
"Bash(pod install *)",
|
|
41
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme iosApp -sdk iphonesimulator -destination 'id=1E6F9A79-5E64-4590-BEA2-828D75D99393' -configuration Debug build CODE_SIGNING_ALLOWED=NO)",
|
|
42
|
-
"Bash(xcrun swiftc *)",
|
|
43
|
-
"Bash(echo \"=== exit: $? \\(1=none found\\) ===\")",
|
|
44
|
-
"Bash(cat Radius.swift)",
|
|
45
|
-
"Bash(cat Spacing.swift)",
|
|
46
|
-
"Bash(echo \"exit=$?\")",
|
|
47
|
-
"Bash(ruby *)",
|
|
48
|
-
"Bash(xcodebuild -list -workspace iosApp.xcworkspace)",
|
|
49
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme MoMoUIKits -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14 Pro' build)",
|
|
50
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme MoMoUIKits -sdk iphonesimulator -destination 'platform=iOS Simulator,id=E6A899C0-098E-473A-95B8-A2BBD2D42A92' build)",
|
|
51
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme iosApp -sdk iphonesimulator -destination 'platform=iOS Simulator,id=E6A899C0-098E-473A-95B8-A2BBD2D42A92' build)",
|
|
52
|
-
"Bash(xcodebuild build *)",
|
|
53
|
-
"Bash(git stash *)",
|
|
54
|
-
"Bash(plutil -lint sample/iosApp/iosApp.xcodeproj/project.pbxproj)",
|
|
55
|
-
"Bash(git add *)",
|
|
56
|
-
"Bash(git commit -m 'feat: DS-646 [ci build] *)",
|
|
57
|
-
"Bash(git commit -q -m 'fix: DS-656 [ci build] *)",
|
|
58
|
-
"Bash(xargs git log --oneline -1)",
|
|
59
|
-
"Bash(git rev-list *)",
|
|
60
|
-
"Bash(git status *)",
|
|
61
|
-
"Bash(git rebase *)",
|
|
62
|
-
"Bash(git merge *)",
|
|
63
|
-
"Bash(git reset *)",
|
|
64
|
-
"Bash(awk '/^ *)",
|
|
65
|
-
"Bash(git ls-tree *)",
|
|
66
|
-
"Bash(awk *)",
|
|
67
|
-
"Read(//Users/sophia/Workspace/momo/momo-app/**)",
|
|
68
|
-
"Bash(git log *)",
|
|
69
|
-
"Bash(xcodebuild -version)",
|
|
70
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme iosApp -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -configuration Debug build CODE_SIGNING_ALLOWED=NO)",
|
|
71
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme MoMoUIKits -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -configuration Debug build CODE_SIGNING_ALLOWED=NO)",
|
|
72
|
-
"Bash(xcodebuild -workspace iosApp.xcworkspace -scheme MoMoUIKits -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' -configuration Debug clean build CODE_SIGNING_ALLOWED=NO)",
|
|
73
|
-
"Bash(git commit *)",
|
|
74
|
-
"Bash(npm view *)",
|
|
75
|
-
"Bash(echo \"EXIT=$? -> not resolvable\")"
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
}
|
package/local.properties
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
#Tue Jun 02 17:05:32 ICT 2026
|
|
8
|
-
sdk.dir=/Users/sophia/Library/Android/sdk
|