@momo-kits/native-kits 0.164.1-trustsans-10-debug → 0.164.1-trustsans-11-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
CHANGED
package/gradle.properties
CHANGED
|
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
|
|
|
18
18
|
name="ComposeKits"
|
|
19
19
|
group=vn.momo.kits
|
|
20
20
|
artifact.id=kits
|
|
21
|
-
version=0.164.1-trustsans-
|
|
21
|
+
version=0.164.1-trustsans-11
|
|
22
22
|
|
|
23
23
|
repo=GitLab
|
|
24
24
|
url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/// Design-system rollout flag for the SwiftUI kit, mirroring Compose's `KitDesignSystem`.
|
|
4
|
+
/// The kit is sandboxed and can't read the host config, so the host writes `update(_:)` once at
|
|
5
|
+
/// startup from `DesignSystemConfig`. Startup-only and non-reactive, like `FontScaleStore` was
|
|
6
|
+
/// before it gained live updates: there is no SwiftUI navigation container to re-render from.
|
|
7
|
+
public final class KitDesignSystem {
|
|
8
|
+
public static let shared = KitDesignSystem()
|
|
9
|
+
|
|
10
|
+
public private(set) var isWhiteList: Bool = false
|
|
11
|
+
|
|
12
|
+
private init() {}
|
|
13
|
+
|
|
14
|
+
public func update(isWhiteList: Bool) {
|
|
15
|
+
self.isWhiteList = isWhiteList
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -100,6 +100,8 @@ public extension TypographyStyle {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
private func momoFontName(family: String, weight: Font.Weight) -> String? {
|
|
103
|
+
// Ngoai whitelist thi tra nil de momoFont() roi ve .system(...), dung nhu truoc DS-791.
|
|
104
|
+
guard KitDesignSystem.shared.isWhiteList else { return nil }
|
|
103
105
|
guard family == "MomoTrustSans" else { return nil }
|
|
104
106
|
switch weight {
|
|
105
107
|
case .ultraLight, .thin: return "MomoTrustSans-ExtraLight"
|