@momo-kits/native-kits 0.162.1-beta.1-debug → 0.162.1-beta.12-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 (66) hide show
  1. package/CLAUDE.md +78 -0
  2. package/compose/build.gradle.kts +59 -58
  3. package/compose/build.gradle.kts.backup +61 -60
  4. package/compose/compose.podspec +1 -1
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +13 -14
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +2 -2
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +5 -7
  9. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +2 -2
  10. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +21 -19
  11. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +1 -1
  12. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +69 -26
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +1 -1
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +1 -1
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +3 -1
  16. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +2 -5
  17. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +1 -1
  18. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +6 -3
  19. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +5 -7
  20. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +21 -22
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +104 -0
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +2 -2
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +2 -2
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +3 -2
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +66 -25
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +42 -28
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +4 -3
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +25 -16
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +3 -1
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +4 -3
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +4 -4
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +0 -10
  33. package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  34. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  35. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +5 -0
  36. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
  37. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
  38. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
  39. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
  40. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
  41. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
  42. package/gradle/libs.versions.toml +2 -0
  43. package/gradle.properties +1 -1
  44. package/ios/Application/ApplicationEnvironment.swift +1 -0
  45. package/ios/Application/Components.swift +1 -0
  46. package/ios/Application/FloatingButton.swift +1 -0
  47. package/ios/Application/FontScaleStore.swift +59 -0
  48. package/ios/Badge/Badge.swift +1 -0
  49. package/ios/Badge/BadgeRibbon.swift +2 -0
  50. package/ios/Button/Button.swift +1 -1
  51. package/ios/Checkbox/Checkbox.swift +1 -0
  52. package/ios/Information/Information.swift +151 -0
  53. package/ios/Input/Input.swift +1 -0
  54. package/ios/Input/InputPhoneNumber.swift +1 -0
  55. package/ios/Input/InputSearch.swift +3 -0
  56. package/ios/Input/InputTextArea.swift +1 -0
  57. package/ios/OTPKeyboard/KeyboardButton.swift +1 -1
  58. package/ios/Popup/PopupDisplay.swift +6 -0
  59. package/ios/Popup/PopupInput.swift +2 -0
  60. package/ios/Template/TrustBanner/TrustBanner.swift +2 -0
  61. package/ios/Typography/Text.swift +13 -7
  62. package/ios/Typography/Typography.swift +22 -8
  63. package/local.properties +2 -2
  64. package/package.json +1 -1
  65. package/.claude/settings.local.json +0 -32
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Deprecated.kt +0 -107
package/CLAUDE.md ADDED
@@ -0,0 +1,78 @@
1
+ # CLAUDE.md
2
+
3
+ Guidance for working in this repo. Keep it accurate — update it when structure or commands change.
4
+
5
+ ## What this is
6
+
7
+ `momo-native-kits` — MoMo's design-system / UI-kit as a **Kotlin Multiplatform + Compose Multiplatform** library, published for Android (AAR/Maven) and iOS (static framework + CocoaPods). It is the Compose port of the React Native `momo-kits`. Consumed by mini-apps embedded in the host MoMo app.
8
+
9
+ - Artifact: `vn.momo.kits:kits` (version in `gradle.properties`). NPM mirror: `@momo-kits/native-kits`.
10
+ - Targets: `androidTarget` (JVM 17, compile/min/target SDK 36/24/36), `iosArm64`, `iosSimulatorArm64` (framework `baseName = "kits"`, `isStatic = true`).
11
+ - Kotlin 2.3.10, Compose MP 1.10.3.
12
+
13
+ ## Modules
14
+
15
+ - `:compose` — the published library. All real code lives here.
16
+ - `:sample:shared` + `:sample:androidApp` — demo app (`UIKitHome` lists all components). iOS demo in `sample/iosApp` (Xcode).
17
+
18
+ ## Source layout (`compose/src/commonMain/kotlin/vn/momo/kits/`)
19
+
20
+ - `components/` — ~50 UI components, **one file per component** (`Button.kt`, `Input*.kt`, `PopupNotify.kt`, …).
21
+ - `application/` — app-level context & config: `Context.kt` (CompositionLocals, `MiniAppContext`, `DesignSystemConfig`), `Localize.kt` (i18n: `LocalizationObject`, `Localize`, default dictionary), `Screen.kt`, header pieces. Also holds the **deprecated** `ApplicationContainer`.
22
+ - `navigation/` — `NavigationContainer.kt` (**canonical entry point**), `Navigator.kt`, `Navigation.kt`, `StackScreen.kt`, `bottomtab/`, `component/`, `tracking/`.
23
+ - `const/` — design tokens: `Theme.kt`, `Colors.kt`, `Typography.kt`, `Spacing.kt`, `Radius.kt`.
24
+ - `layout/`, `modifier/`, `utils/`.
25
+ - `platform/` — `Platform.kt` `expect` declarations, actualized in `androidMain` / `iosMain` (`Platform.android.kt`, `Platform.ios.kt`).
26
+
27
+ ## Build & verify
28
+
29
+ No unit-test suite is configured. Validate changes by compiling the relevant target(s); use the sample app for visual checks.
30
+
31
+ ```bash
32
+ ./gradlew :compose:compileCommonMainKotlinMetadata # validate commonMain (fast, do this first)
33
+ ./gradlew :compose:compileDebugKotlinAndroid # Android target
34
+ ./gradlew :compose:linkDebugFrameworkIosSimulatorArm64 # iOS framework (slow)
35
+ ./gradlew :sample:androidApp:installDebug # run demo on device/emulator
36
+ ```
37
+
38
+ Publishing is automated (`publish.sh` + GitLab CI on `[ci build]` / `main`). Do not publish manually unless asked: `sh publish.sh beta` / `sh publish.sh release` (Maven→GitLab + NPM).
39
+
40
+ ## Architecture essentials
41
+
42
+ - **Entry point:** wrap content in `NavigationContainer(...)` from `navigation/`. It builds the `Navigator`, takes a host-supplied `Localize` (falls back to an empty one), and provides the CompositionLocals below. **Do not use** `ApplicationContainer` (`application/NavigationContainer.kt`) — deprecated and does **not** wire `LocalLocalize` / `LocalNavigator` / `LocalMaxApi`.
43
+ - **Configuration flows via CompositionLocals**, not params. Public ones: `AppTheme`, `AppStatusBar`, `AppNavigationBar` (`const/Theme.kt`); `ApplicationContext`, `AppConfig`, `AppLanguage`, `LocalLocalize`, `ScaleSizeMaxRate` (`application/`); `LocalNavigator`, `LocalMaxApi` (`navigation/`). Read with `X.current`.
44
+ - **Platform code** goes through `expect`/`actual` in `platform/` — never reference Android/iOS APIs from `commonMain` directly.
45
+ - **Native bridge:** `IMaxApi` (`vn.momo.maxapi`, exposed as `LocalMaxApi`) is the host-app bridge (dismiss, tracking, device info, language).
46
+ - Navigation uses a runtime `DynamicScreenRegistry`; overlays (modal/bottom-sheet/snackbar) go through `Navigator` + `OverplayComponentRegistry`.
47
+
48
+ ## i18n / Localize (port of RN `Localize`)
49
+
50
+ - `application/Localize.kt`: everything i18n. `LocalizationObject` is a data class with required `vi` / `en` maps (`LocalizationObject(vi = mapOf(…), en = mapOf(…))`). `Localize` constructors take a `LocalizationObject` or a `(vi, en)` map pair; the constructor **merges** the kit defaults with the host data (host wins on key clash). Methods: `translate(key)` (missing/empty → returns the key), `translateData(map)` / `translateData(vi, en)`, `addTranslations` (existing keys win), `changeLanguage(lang)`. Default language `"vi"`, `"en"` only on exact match; language is snapshot state so a switch recomposes consumers.
51
+ - The default dictionary lives **inside `Localize`** (companion `defaultLanguage`), **generated 1:1 from `momo-kits` RN `Assets/language.json`** — do not hand-edit that block; edit the RN source and regenerate.
52
+ - The host creates one `Localize` and passes it in: `NavigationContainer(localize = myLocalize, …)`. There is **no** `language` param and `DesignSystemConfig` carries no translations — overrides go through the `Localize` constructor / `addTranslations`. Switch language at runtime with `myLocalize.changeLanguage("en")`.
53
+ - Access in a `@Composable`: `LocalLocalize.current.translate("errorCode")`. Language is host-controlled, never read from the OS locale. `AppLanguage` is still provided (derived from `Localize.currentLanguage`) for older components that read it.
54
+ - Some older components still do ad-hoc `AppLanguage.current` + `Map` lookups; new/changed code should use `LocalLocalize`.
55
+
56
+ ## Code conventions
57
+
58
+ - **Tokens, not literals:** use `Colors`, `Typography`, `Spacing`, `Radius` objects and `AppTheme.current` for colors/styles. Per-component sizing is bundled in enums (e.g. `Button.Size(val value: ButtonSpecs)`).
59
+ - **Composable signatures:** required params first, slot lambdas next, `modifier: Modifier = Modifier` **last**; give optional params sensible defaults.
60
+ - **Stability:** annotate token/config data classes `@Stable`/`@Immutable`; memoize derived colors/styles/handlers with `remember(keys) { … }`.
61
+ - **Custom modifiers** are preferred: `conditional(...)`, `setAutomationId(...)`, the `clickable` variants in `modifier/`.
62
+ - Match the surrounding file's style when adding code.
63
+
64
+ ## Writing docs in code (follow this)
65
+
66
+ Comments are **sparse and in English**. Document only what is **not obvious from the code** — non-obvious behavior, platform quirks, RN-parity semantics, memoization intent, or important gotchas worth flagging. Do **not**:
67
+
68
+ - write KDoc walls or restate what the signature/code already says;
69
+ - narrate obvious steps or add section-banner noise;
70
+ - use a language other than English in code comments.
71
+
72
+ Prefer one tight line at the surprising spot over a paragraph. Match the (low) comment density already in the codebase.
73
+
74
+ ## Gotchas
75
+
76
+ - **Resource qualifier drift:** the generated Compose `Res` namespace is `vn.momo.uikits.resources`, but `utils/Resources.kt` and `platform/Platform.ios.kt` reference `vn.momo.compose.resources`. Keep bundled strings/dictionaries as plain Kotlin (the `defaultLanguage` map in `Localize.kt`), not `composeResources/values`, to avoid iOS framework resource-loading issues.
77
+ - Prefer `NavigationContainer` over the deprecated `ApplicationContainer`; prefer `IMaxApi`/`LocalMaxApi` over the deprecated `PlatformApi`.
78
+ - iOS strings/maps must survive Kotlin/Native framework packaging — keep them compiled-in, not loaded from resource bundles.
@@ -1,5 +1,5 @@
1
- import com.vanniktech.maven.publish.JavadocJar
2
- import com.vanniktech.maven.publish.KotlinMultiplatform
1
+ // import com.vanniktech.maven.publish.JavadocJar
2
+ // import com.vanniktech.maven.publish.KotlinMultiplatform
3
3
  import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
4
 
5
5
  plugins {
@@ -7,7 +7,7 @@ plugins {
7
7
  alias(libs.plugins.android.library)
8
8
  alias(libs.plugins.compose)
9
9
  alias(libs.plugins.kotlin.compose.compiler)
10
- alias(libs.plugins.vanniktech.mavenPublish)
10
+ // alias(libs.plugins.vanniktech.mavenPublish)
11
11
  id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
12
12
  kotlin("plugin.serialization")
13
13
  }
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.161.0-debug"
43
+ version = "0.162.1-beta.12-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -59,7 +59,7 @@ kotlin {
59
59
 
60
60
  sourceSets {
61
61
  all {
62
- languageSettings.optIn("vn.momo.kits.utils.Deprecated.InternalApi")
62
+ languageSettings.optIn("vn.momo.kits.modifier.InternalApi")
63
63
  }
64
64
  commonMain.dependencies {
65
65
  implementation(compose.runtime)
@@ -77,6 +77,7 @@ kotlin {
77
77
  implementation(libs.kotlinx.datetime)
78
78
  api(libs.native.max.api)
79
79
  implementation(libs.compottie)
80
+ implementation(libs.gif.image)
80
81
  }
81
82
  androidMain.dependencies {
82
83
  implementation(libs.ktor.client.okhttp)
@@ -90,7 +91,7 @@ kotlin {
90
91
 
91
92
  android {
92
93
  namespace = "vn.momo.kits.kits"
93
- compileSdk = 36
94
+ compileSdk = 35
94
95
  compileOptions {
95
96
  sourceCompatibility = JavaVersion.VERSION_17
96
97
  targetCompatibility = JavaVersion.VERSION_17
@@ -135,55 +136,55 @@ compose {
135
136
  }
136
137
  }
137
138
 
138
- publishing {
139
- repositories {
140
- maven {
141
- name = "${gitlabRepo}Packages"
142
- credentials {
143
- username = gitlabUser
144
- password = gitlabKey
145
- }
146
- url = uri(gitlabUrl)
147
- }
148
- }
149
- }
150
-
151
- mavenPublishing {
152
- configure(
153
- KotlinMultiplatform(
154
- javadocJar = JavadocJar.Empty(),
155
- sourcesJar = true,
156
- androidVariantsToPublish = listOf("release")
157
- )
158
- )
159
-
160
- repositories {
161
- maven {
162
- name = "${gitlabRepo}Packages"
163
- credentials { username = gitlabUser; password = gitlabKey }
164
- url = uri(gitlabUrl)
165
- }
166
- }
167
-
168
- coordinates(gitlabGroup, gitlabArtifactId, gitlabVersion)
169
-
170
- pom {
171
- name = "$gitlabName Klib"
172
- description = gitlabName
173
- url = "https://gitlab.mservice.com.vn"
174
- licenses {
175
- license {
176
- name = "The Apache License, Version 2.0"
177
- url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
178
- distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
179
- }
180
- }
181
- developers {
182
- developer {
183
- id = "kotlin-hands-on"
184
- name = "Kotlin Developer Advocate"
185
- url = "https://github.com/kotlin-hands-on/"
186
- }
187
- }
188
- }
189
- }
139
+ // publishing {
140
+ // repositories {
141
+ // maven {
142
+ // name = "${gitlabRepo}Packages"
143
+ // credentials {
144
+ // username = gitlabUser
145
+ // password = gitlabKey
146
+ // }
147
+ // url = uri("$gitlabUrl")
148
+ // }
149
+ // }
150
+ // }
151
+
152
+ // mavenPublishing {
153
+ // configure(
154
+ // KotlinMultiplatform(
155
+ // javadocJar = JavadocJar.Empty(),
156
+ // sourcesJar = true,
157
+ // androidVariantsToPublish = listOf("release")
158
+ // )
159
+ // )
160
+ //
161
+ // repositories {
162
+ // maven {
163
+ // name = "${gitlabRepo}Packages"
164
+ // credentials { username = gitlabUser; password = gitlabKey }
165
+ // url = uri("$gitlabUrl")
166
+ // }
167
+ // }
168
+ //
169
+ // coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
170
+ //
171
+ // pom {
172
+ // name = "$gitlabName Klib"
173
+ // description = "$gitlabName"
174
+ // url = "https://gitlab.mservice.com.vn"
175
+ // licenses {
176
+ // license {
177
+ // name = "The Apache License, Version 2.0"
178
+ // url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
179
+ // distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
180
+ // }
181
+ // }
182
+ // developers {
183
+ // developer {
184
+ // id = "kotlin-hands-on"
185
+ // name = "Kotlin Developer Advocate"
186
+ // url = "https://github.com/kotlin-hands-on/"
187
+ // }
188
+ // }
189
+ // }
190
+ // }
@@ -1,5 +1,5 @@
1
- import com.vanniktech.maven.publish.JavadocJar
2
- import com.vanniktech.maven.publish.KotlinMultiplatform
1
+ import com.vanniktech.maven.publish.JavadocJar
2
+ import com.vanniktech.maven.publish.KotlinMultiplatform
3
3
  import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
4
 
5
5
  plugins {
@@ -7,7 +7,7 @@ plugins {
7
7
  alias(libs.plugins.android.library)
8
8
  alias(libs.plugins.compose)
9
9
  alias(libs.plugins.kotlin.compose.compiler)
10
- alias(libs.plugins.vanniktech.mavenPublish)
10
+ alias(libs.plugins.vanniktech.mavenPublish)
11
11
  id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
12
12
  kotlin("plugin.serialization")
13
13
  }
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.161.0-debug"
43
+ version = gitlabVersion
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -59,7 +59,7 @@ kotlin {
59
59
 
60
60
  sourceSets {
61
61
  all {
62
- languageSettings.optIn("vn.momo.kits.utils.Deprecated.InternalApi")
62
+ languageSettings.optIn("vn.momo.kits.modifier.InternalApi")
63
63
  }
64
64
  commonMain.dependencies {
65
65
  implementation(compose.runtime)
@@ -77,6 +77,7 @@ kotlin {
77
77
  implementation(libs.kotlinx.datetime)
78
78
  api(libs.native.max.api)
79
79
  implementation(libs.compottie)
80
+ implementation(libs.gif.image)
80
81
  }
81
82
  androidMain.dependencies {
82
83
  implementation(libs.ktor.client.okhttp)
@@ -89,14 +90,14 @@ kotlin {
89
90
  }
90
91
 
91
92
  android {
92
- namespace = "vn.momo.kits.kits"
93
- compileSdk = 36
93
+ namespace = "$gitlabGroup.$gitlabArtifactId"
94
+ compileSdk = libs.versions.android.compileSdk.get().toInt()
94
95
  compileOptions {
95
96
  sourceCompatibility = JavaVersion.VERSION_17
96
97
  targetCompatibility = JavaVersion.VERSION_17
97
98
  }
98
99
  defaultConfig {
99
- minSdk = 24
100
+ minSdk = libs.versions.android.minSdk.get().toInt()
100
101
  }
101
102
  }
102
103
 
@@ -135,55 +136,55 @@ compose {
135
136
  }
136
137
  }
137
138
 
138
- publishing {
139
- repositories {
140
- maven {
141
- name = "${gitlabRepo}Packages"
142
- credentials {
143
- username = gitlabUser
144
- password = gitlabKey
145
- }
146
- url = uri(gitlabUrl)
147
- }
148
- }
149
- }
150
-
151
- mavenPublishing {
152
- configure(
153
- KotlinMultiplatform(
154
- javadocJar = JavadocJar.Empty(),
155
- sourcesJar = true,
156
- androidVariantsToPublish = listOf("release")
157
- )
158
- )
159
-
160
- repositories {
161
- maven {
162
- name = "${gitlabRepo}Packages"
163
- credentials { username = gitlabUser; password = gitlabKey }
164
- url = uri(gitlabUrl)
165
- }
166
- }
167
-
168
- coordinates(gitlabGroup, gitlabArtifactId, gitlabVersion)
169
-
170
- pom {
171
- name = "$gitlabName Klib"
172
- description = gitlabName
173
- url = "https://gitlab.mservice.com.vn"
174
- licenses {
175
- license {
176
- name = "The Apache License, Version 2.0"
177
- url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
178
- distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
179
- }
180
- }
181
- developers {
182
- developer {
183
- id = "kotlin-hands-on"
184
- name = "Kotlin Developer Advocate"
185
- url = "https://github.com/kotlin-hands-on/"
186
- }
187
- }
188
- }
189
- }
139
+ publishing {
140
+ repositories {
141
+ maven {
142
+ name = "${gitlabRepo}Packages"
143
+ credentials {
144
+ username = gitlabUser
145
+ password = gitlabKey
146
+ }
147
+ url = uri("$gitlabUrl")
148
+ }
149
+ }
150
+ }
151
+
152
+ mavenPublishing {
153
+ configure(
154
+ KotlinMultiplatform(
155
+ javadocJar = JavadocJar.Empty(),
156
+ sourcesJar = true,
157
+ androidVariantsToPublish = listOf("release")
158
+ )
159
+ )
160
+
161
+ repositories {
162
+ maven {
163
+ name = "${gitlabRepo}Packages"
164
+ credentials { username = gitlabUser; password = gitlabKey }
165
+ url = uri("$gitlabUrl")
166
+ }
167
+ }
168
+
169
+ coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
170
+
171
+ pom {
172
+ name = "$gitlabName Klib"
173
+ description = "$gitlabName"
174
+ url = "https://gitlab.mservice.com.vn"
175
+ licenses {
176
+ license {
177
+ name = "The Apache License, Version 2.0"
178
+ url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
179
+ distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
180
+ }
181
+ }
182
+ developers {
183
+ developer {
184
+ id = "kotlin-hands-on"
185
+ name = "Kotlin Developer Advocate"
186
+ url = "https://github.com/kotlin-hands-on/"
187
+ }
188
+ }
189
+ }
190
+ }
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |spec|
2
2
  spec.name = 'compose'
3
- spec.version = '0.161.0-debug'
3
+ spec.version = '0.163.1-beta.1'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
@@ -10,7 +10,7 @@ data class FeatureFlags(
10
10
  )
11
11
 
12
12
  @Immutable
13
- data class KitConfig(
13
+ data class DesignSystemConfig(
14
14
  val trustBanner: TrustBannerData? = null,
15
15
  val headerBar: String? = null,
16
16
  val headerGradient: String? = null,
@@ -28,7 +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
+ val fontScaleConfig: FontScaleConfig? = null,
32
32
  ) {
33
33
  companion object {
34
34
 
@@ -60,7 +60,7 @@ data class MiniAppContext(
60
60
  providerId = parent.providerId.ifBlank { child.providerId },
61
61
  permissions = if (!parent.permissions.isNullOrEmpty()) parent.permissions else child.permissions,
62
62
  features = mergeFeatureFlags(parent.features, child.features),
63
- scaleSizeMaxRate = parent.scaleSizeMaxRate ?: child.scaleSizeMaxRate,
63
+ fontScaleConfig = parent.fontScaleConfig ?: child.fontScaleConfig,
64
64
  )
65
65
  }
66
66
 
@@ -88,17 +88,9 @@ data class ComponentInformation(
88
88
  val action: String? = null
89
89
  )
90
90
 
91
- var IsShowBaseLineDebug = true
91
+ var IsShowBaseLineDebug = false
92
92
 
93
- val ApplicationContext = staticCompositionLocalOf<MiniAppContext?> {
94
- null
95
- }
96
-
97
- val AppConfig = staticCompositionLocalOf<KitConfig?> {
98
- null
99
- }
100
-
101
- val AppLanguage = staticCompositionLocalOf<String?> {
93
+ val LocalContext = staticCompositionLocalOf<MiniAppContext?> {
102
94
  null
103
95
  }
104
96
 
@@ -106,4 +98,11 @@ val LocalComponentInformation = staticCompositionLocalOf<ComponentInformation?>
106
98
  null
107
99
  }
108
100
 
109
- val ScaleSizeMaxRate = staticCompositionLocalOf<Float?> { null }
101
+ @Immutable
102
+ data class FontScaleConfig(
103
+ val useOSFontScale: Boolean = true,
104
+ val userScaleRate: Float? = null,
105
+ val osFontScale: Float? = null,
106
+ )
107
+
108
+ val LocalFontScaleConfig = staticCompositionLocalOf { FontScaleConfig() }
@@ -117,7 +117,7 @@ private fun ToolkitHeaderRight(
117
117
  var isFavorite by remember { mutableStateOf(false) }
118
118
  val isLoading by remember { mutableStateOf(false) }
119
119
  val api = PlatformApi.current as? ComposeApi
120
- val context = ApplicationContext.current
120
+ val context = LocalContext.current
121
121
 
122
122
  fun onPressShortcut() {
123
123
  api?.request("onToolAction", mapOf("item" to mapOf("key" to "onFavorite"))) {
@@ -262,7 +262,7 @@ fun NavigationButton(
262
262
  modifier = Modifier
263
263
  .size(28.dp)
264
264
  .clickable(enabled = !disabled, onClick = onClick)
265
-
265
+
266
266
  ) {
267
267
  Box(
268
268
  modifier = Modifier