@momo-kits/native-kits 0.163.1-beta.7-debug → 0.163.1-beta.8-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.
Files changed (32) hide show
  1. package/.claude/settings.local.json +62 -0
  2. package/compose/build.gradle.kts +2 -1
  3. package/compose/build.gradle.kts.backup +1 -0
  4. package/compose/compose.podspec +1 -1
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +3 -10
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +11 -9
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +40 -55
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +69 -26
  9. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
  10. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +3 -6
  11. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +22 -21
  12. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +4 -0
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +19 -40
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +11 -6
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +3 -4
  16. package/gradle/libs.versions.toml +2 -0
  17. package/gradle.properties +1 -1
  18. package/ios/Application/ApplicationEnvironment.swift +0 -1
  19. package/ios/Typography/Text.swift +7 -12
  20. package/ios/Typography/Typography.swift +9 -14
  21. package/local.properties +2 -2
  22. package/package.json +1 -1
  23. package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  24. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  25. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -5
  26. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  27. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  28. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  29. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  30. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  31. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
  32. package/ios/Application/FontScaleStore.swift +0 -59
@@ -1,58 +0,0 @@
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>
@@ -1,46 +0,0 @@
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>
@@ -1,59 +0,0 @@
1
- import SwiftUI
2
-
3
- public struct FontScaleConfig {
4
- public var useOSFontScale: Bool
5
- public var userScaleRate: CGFloat?
6
-
7
- public init(useOSFontScale: Bool = true, userScaleRate: CGFloat? = nil) {
8
- self.useOSFontScale = useOSFontScale
9
- self.userScaleRate = userScaleRate
10
- }
11
- }
12
-
13
- public final class FontScaleStore: ObservableObject {
14
- public static let shared = FontScaleStore()
15
-
16
- @Published public private(set) var config = FontScaleConfig()
17
-
18
- private var didBind = false
19
- private var observerId: String?
20
-
21
- private init() {}
22
-
23
- public func update(_ newConfig: FontScaleConfig) {
24
- if Thread.isMainThread {
25
- config = newConfig
26
- } else {
27
- DispatchQueue.main.async { [weak self] in self?.config = newConfig }
28
- }
29
- }
30
-
31
- public func bind(_ api: KitComposeApi?) {
32
- guard let api = api, !didBind else { return }
33
- didBind = true
34
-
35
- apply(api.request(funcName: "getFontScaleConfig", params: nil))
36
- observerId = api.request(funcName: "observer", params: ["font_scale_config"]) { [weak self] response in
37
- self?.apply(response)
38
- }
39
- }
40
-
41
- private func apply(_ response: String) {
42
- guard let parsed = FontScaleStore.parse(response) else { return }
43
- update(parsed)
44
- }
45
-
46
- static func parse(_ response: String) -> FontScaleConfig? {
47
- guard
48
- let data = response.data(using: .utf8),
49
- let json = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any]
50
- else { return nil }
51
-
52
- let obj = (json["response"] as? [String: Any]) ?? (json["data"] as? [String: Any]) ?? json
53
- guard obj["useOSFontScale"] != nil || obj["userScaleRate"] != nil else { return nil }
54
-
55
- let useOS = (obj["useOSFontScale"] as? Bool) ?? true
56
- let rate = (obj["userScaleRate"] as? NSNumber).map { CGFloat($0.doubleValue) }
57
- return FontScaleConfig(useOSFontScale: useOS, userScaleRate: rate)
58
- }
59
- }