@momo-kits/native-kits 0.157.1-skill.1 → 0.157.1-skill.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/momo-native-kits-skill/SKILL.md +51 -0
- package/.claude/momo-native-kits-skill/evals/evals.json +95 -0
- package/.claude/momo-native-kits-skill/references/badge.md +52 -0
- package/.claude/momo-native-kits-skill/references/button.md +182 -0
- package/.claude/momo-native-kits-skill/references/card.md +48 -0
- package/.claude/momo-native-kits-skill/references/checkbox.md +51 -0
- package/.claude/momo-native-kits-skill/references/chip.md +48 -0
- package/.claude/momo-native-kits-skill/references/constants.md +260 -0
- package/.claude/momo-native-kits-skill/references/divider.md +26 -0
- package/.claude/momo-native-kits-skill/references/input.md +408 -0
- package/.claude/momo-native-kits-skill/references/navigation.md +475 -0
- package/.claude/momo-native-kits-skill/references/popup.md +97 -0
- package/.claude/momo-native-kits-skill/references/radio.md +60 -0
- package/.claude/momo-native-kits-skill/references/skeleton.md +40 -0
- package/.claude/momo-native-kits-skill/references/snackbar.md +54 -0
- package/.claude/momo-native-kits-skill/references/switch.md +62 -0
- package/.claude/momo-native-kits-skill/references/text.md +195 -0
- package/.claude/momo-native-kits-skill/references/tooltip.md +34 -0
- package/.claude/momo-native-kits-skill/references/trustbanner.md +61 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json +20 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.md +13 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/with_skill/outputs/ButtonExample.kt +55 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/without_skill/outputs/ButtonExample.kt +45 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs/InputPhoneExample.kt +40 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs/InputPhoneExample.kt +42 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs/BottomTabExample.kt +236 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs/BottomTabExample.kt +152 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs/CheckBoxExample.kt +49 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs/CheckBoxExample.kt +123 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs/DateTimePickerExample.kt +318 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs/DateTimePickerExample.kt +330 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs/CardExample.kt +124 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/without_skill/outputs/CardExample.kt +71 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/with_skill/outputs/LoginFormExample.kt +134 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/without_skill/outputs/LoginFormExample.kt +199 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +224 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/without_skill/outputs/NavigationContainerExample.kt +225 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs/PopupExample.kt +79 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs/PopupExample.kt +169 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/eval_metadata.json +6 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +255 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +212 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs/SkeletonExample.kt +199 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/without_skill/outputs/SkeletonExample.kt +229 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.json +20 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.md +13 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/eval_metadata.json +22 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/outputs/PrimaryButtonExample.kt +38 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/outputs/PrimaryButtonExample.kt +83 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json +22 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +547 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/outputs/MoMoNavigationContainer.kt +519 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json +27 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +429 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/timing.json +5 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +353 -0
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/timing.json +5 -0
- package/.claude/settings.local.json +35 -7
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +180 -0
- package/compose/build.gradle.kts.backup +180 -0
- package/compose/compose.podspec +54 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
- package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
- package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
- package/gradle/libs.versions.toml +57 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/ios/Input/Input.swift +112 -50
- package/local.properties +8 -0
- package/package.json +1 -1
- package/settings.gradle.kts +52 -0
- package/.claude/momo-native-kits/SKILL.md +0 -87
- package/.claude/momo-native-kits/references/Badge.md +0 -39
- package/.claude/momo-native-kits/references/BadgeDot.md +0 -37
- package/.claude/momo-native-kits/references/BottomSheet.md +0 -51
- package/.claude/momo-native-kits/references/BottomTab.md +0 -65
- package/.claude/momo-native-kits/references/Button.md +0 -197
- package/.claude/momo-native-kits/references/CheckBox.md +0 -51
- package/.claude/momo-native-kits/references/Chip.md +0 -47
- package/.claude/momo-native-kits/references/Divider.md +0 -29
- package/.claude/momo-native-kits/references/HeaderTitle.md +0 -45
- package/.claude/momo-native-kits/references/HeaderType.md +0 -47
- package/.claude/momo-native-kits/references/Icon.md +0 -32
- package/.claude/momo-native-kits/references/Image.md +0 -38
- package/.claude/momo-native-kits/references/Information.md +0 -36
- package/.claude/momo-native-kits/references/Input.md +0 -334
- package/.claude/momo-native-kits/references/InputDropDown.md +0 -47
- package/.claude/momo-native-kits/references/InputMoney.md +0 -241
- package/.claude/momo-native-kits/references/InputOTP.md +0 -52
- package/.claude/momo-native-kits/references/InputPhoneNumber.md +0 -175
- package/.claude/momo-native-kits/references/InputSearch.md +0 -57
- package/.claude/momo-native-kits/references/InputTextArea.md +0 -46
- package/.claude/momo-native-kits/references/NavigationContainer.md +0 -51
- package/.claude/momo-native-kits/references/Navigator.md +0 -287
- package/.claude/momo-native-kits/references/PaginationDot.md +0 -28
- package/.claude/momo-native-kits/references/PaginationNumber.md +0 -28
- package/.claude/momo-native-kits/references/PopupNotify.md +0 -47
- package/.claude/momo-native-kits/references/Radio.md +0 -44
- package/.claude/momo-native-kits/references/Skeleton.md +0 -32
- package/.claude/momo-native-kits/references/Switch.md +0 -36
- package/.claude/momo-native-kits/references/Tag.md +0 -40
- package/.claude/momo-native-kits/references/Text.md +0 -37
- package/.claude/momo-native-kits/references/Title.md +0 -43
- package/.claude/momo-native-kits/references/Tooltip.md +0 -30
- package/building-skill-for-claude.md +0 -1190
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
package vn.momo.kits.navigation.examples
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.Arrangement
|
|
4
|
+
import androidx.compose.foundation.layout.Column
|
|
5
|
+
import androidx.compose.foundation.layout.Spacer
|
|
6
|
+
import androidx.compose.foundation.layout.fillMaxSize
|
|
7
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
8
|
+
import androidx.compose.foundation.layout.height
|
|
9
|
+
import androidx.compose.foundation.layout.padding
|
|
10
|
+
import androidx.compose.foundation.rememberScrollState
|
|
11
|
+
import androidx.compose.foundation.verticalScroll
|
|
12
|
+
import androidx.compose.material3.MaterialTheme
|
|
13
|
+
import androidx.compose.material3.Text
|
|
14
|
+
import androidx.compose.runtime.Composable
|
|
15
|
+
import androidx.compose.runtime.LaunchedEffect
|
|
16
|
+
import androidx.compose.runtime.getValue
|
|
17
|
+
import androidx.compose.runtime.mutableStateOf
|
|
18
|
+
import androidx.compose.runtime.remember
|
|
19
|
+
import androidx.compose.runtime.setValue
|
|
20
|
+
import androidx.compose.ui.Modifier
|
|
21
|
+
import androidx.compose.ui.text.style.TextAlign
|
|
22
|
+
import androidx.compose.ui.unit.dp
|
|
23
|
+
import vn.momo.kits.components.Button
|
|
24
|
+
import vn.momo.kits.components.ButtonType
|
|
25
|
+
import vn.momo.kits.components.Input
|
|
26
|
+
import vn.momo.kits.components.Size
|
|
27
|
+
import vn.momo.kits.navigation.LocalNavigation
|
|
28
|
+
import vn.momo.kits.navigation.LocalNavigator
|
|
29
|
+
import vn.momo.kits.navigation.NavigationContainer
|
|
30
|
+
import vn.momo.kits.navigation.NavigationOptions
|
|
31
|
+
import vn.momo.kits.navigation.component.HeaderTitle
|
|
32
|
+
import vn.momo.kits.navigation.component.HeaderType
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* SetOptionsExample - Demonstrates how to use setOptions in MoMo Navigation
|
|
36
|
+
* to change header title dynamically.
|
|
37
|
+
*
|
|
38
|
+
* USAGE:
|
|
39
|
+
* 1. Get navigation instance: val navigation = LocalNavigation.current
|
|
40
|
+
* 2. Set initial options in LaunchedEffect(Unit) when screen loads
|
|
41
|
+
* 3. Update dynamically: navigation.setOptions(headerTitle = HeaderTitle.Default("New Title"))
|
|
42
|
+
*/
|
|
43
|
+
@Composable
|
|
44
|
+
fun SetOptionsNavigationExample() {
|
|
45
|
+
NavigationContainer(
|
|
46
|
+
initialScreen = {
|
|
47
|
+
SetOptionsDemoScreen()
|
|
48
|
+
},
|
|
49
|
+
options = NavigationOptions(
|
|
50
|
+
headerTitle = HeaderTitle.Default("MoMo Navigation"),
|
|
51
|
+
headerType = HeaderType.Default
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@Composable
|
|
57
|
+
fun SetOptionsDemoScreen() {
|
|
58
|
+
val navigation = LocalNavigation.current
|
|
59
|
+
val navigator = LocalNavigator.current
|
|
60
|
+
|
|
61
|
+
var titleInput by remember { mutableStateOf("") }
|
|
62
|
+
var currentTitle by remember { mutableStateOf("SetOptions Demo") }
|
|
63
|
+
|
|
64
|
+
// Set initial options when screen loads
|
|
65
|
+
LaunchedEffect(Unit) {
|
|
66
|
+
navigation.setOptions(
|
|
67
|
+
headerTitle = HeaderTitle.Default(currentTitle),
|
|
68
|
+
headerType = HeaderType.Default
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
Column(
|
|
73
|
+
modifier = Modifier
|
|
74
|
+
.fillMaxSize()
|
|
75
|
+
.padding(16.dp)
|
|
76
|
+
.verticalScroll(rememberScrollState()),
|
|
77
|
+
verticalArrangement = Arrangement.spacedBy(16.dp)
|
|
78
|
+
) {
|
|
79
|
+
// Header
|
|
80
|
+
Text(
|
|
81
|
+
text = "How to Use setOptions",
|
|
82
|
+
style = MaterialTheme.typography.headlineSmall,
|
|
83
|
+
modifier = Modifier.fillMaxWidth(),
|
|
84
|
+
textAlign = TextAlign.Center
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
Text(
|
|
88
|
+
text = "Learn how to change header title dynamically using setOptions in MoMo Navigation",
|
|
89
|
+
style = MaterialTheme.typography.bodyMedium,
|
|
90
|
+
color = MaterialTheme.colorScheme.onSurfaceVariant
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
94
|
+
|
|
95
|
+
// ========================================
|
|
96
|
+
// Example 1: Dynamic Title from User Input
|
|
97
|
+
// ========================================
|
|
98
|
+
Text(
|
|
99
|
+
text = "1. Change Title from Input",
|
|
100
|
+
style = MaterialTheme.typography.titleMedium,
|
|
101
|
+
color = MaterialTheme.typography.primaryColor
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
Text(
|
|
105
|
+
text = "Enter a custom title and apply it to the header",
|
|
106
|
+
style = MaterialTheme.typography.bodySmall,
|
|
107
|
+
color = MaterialTheme.colorScheme.onSurfaceVariant
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
Input(
|
|
111
|
+
text = titleInput,
|
|
112
|
+
onChangeText = { titleInput = it },
|
|
113
|
+
placeholder = "Enter title here...",
|
|
114
|
+
modifier = Modifier.fillMaxWidth()
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
Button(
|
|
118
|
+
title = "Apply Title",
|
|
119
|
+
onClick = {
|
|
120
|
+
if (titleInput.isNotBlank()) {
|
|
121
|
+
currentTitle = titleInput
|
|
122
|
+
navigation.setOptions(
|
|
123
|
+
headerTitle = HeaderTitle.Default(titleInput)
|
|
124
|
+
)
|
|
125
|
+
titleInput = ""
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
type = ButtonType.PRIMARY,
|
|
129
|
+
size = Size.MEDIUM,
|
|
130
|
+
modifier = Modifier.fillMaxWidth()
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
134
|
+
|
|
135
|
+
// ========================================
|
|
136
|
+
// Example 2: Quick Title Presets
|
|
137
|
+
// ========================================
|
|
138
|
+
Text(
|
|
139
|
+
text = "2. Quick Title Presets",
|
|
140
|
+
style = MaterialTheme.typography.titleMedium,
|
|
141
|
+
color = MaterialTheme.typography.primaryColor
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
|
145
|
+
Button(
|
|
146
|
+
title = "Home",
|
|
147
|
+
onClick = {
|
|
148
|
+
currentTitle = "Home"
|
|
149
|
+
navigation.setOptions(headerTitle = HeaderTitle.Default("Home"))
|
|
150
|
+
},
|
|
151
|
+
type = ButtonType.OUTLINE,
|
|
152
|
+
size = Size.SMALL
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
Button(
|
|
156
|
+
title = "Profile",
|
|
157
|
+
onClick = {
|
|
158
|
+
currentTitle = "Profile"
|
|
159
|
+
navigation.setOptions(headerTitle = HeaderTitle.Default("Profile"))
|
|
160
|
+
},
|
|
161
|
+
type = ButtonType.OUTLINE,
|
|
162
|
+
size = Size.SMALL
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
Button(
|
|
166
|
+
title = "Wallet",
|
|
167
|
+
onClick = {
|
|
168
|
+
currentTitle = "Wallet"
|
|
169
|
+
navigation.setOptions(headerTitle = HeaderTitle.Default("Wallet"))
|
|
170
|
+
},
|
|
171
|
+
type = ButtonType.OUTLINE,
|
|
172
|
+
size = Size.SMALL
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
177
|
+
|
|
178
|
+
// ========================================
|
|
179
|
+
// Example 3: Context-Aware Title Changes
|
|
180
|
+
// ========================================
|
|
181
|
+
Text(
|
|
182
|
+
text = "3. Context-Aware Titles",
|
|
183
|
+
style = MaterialTheme.typography.titleMedium,
|
|
184
|
+
color = MaterialTheme.typography.primaryColor
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
var selectedCategory by remember { mutableStateOf("All") }
|
|
188
|
+
val categories = listOf("All", "Electronics", "Fashion", "Food", "Travel")
|
|
189
|
+
|
|
190
|
+
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
|
191
|
+
categories.forEach { category ->
|
|
192
|
+
Button(
|
|
193
|
+
title = category,
|
|
194
|
+
onClick = {
|
|
195
|
+
selectedCategory = category
|
|
196
|
+
val displayTitle = if (category == "All") "Products" else "Products - $category"
|
|
197
|
+
navigation.setOptions(headerTitle = HeaderTitle.Default(displayTitle))
|
|
198
|
+
},
|
|
199
|
+
type = if (selectedCategory == category) ButtonType.PRIMARY else ButtonType.OUTLINE,
|
|
200
|
+
size = Size.SMALL,
|
|
201
|
+
modifier = Modifier.fillMaxWidth()
|
|
202
|
+
)
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
207
|
+
|
|
208
|
+
// ========================================
|
|
209
|
+
// Example 4: Header Type Changes
|
|
210
|
+
// ========================================
|
|
211
|
+
Text(
|
|
212
|
+
text = "4. Change Header Type",
|
|
213
|
+
style = MaterialTheme.typography.titleMedium,
|
|
214
|
+
color = MaterialTheme.typography.primaryColor
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
Button(
|
|
218
|
+
title = "Hide Header",
|
|
219
|
+
onClick = {
|
|
220
|
+
navigation.setOptions(headerType = HeaderType.None)
|
|
221
|
+
},
|
|
222
|
+
type = ButtonType.OUTLINE,
|
|
223
|
+
size = Size.MEDIUM,
|
|
224
|
+
modifier = Modifier.fillMaxWidth()
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
Button(
|
|
228
|
+
title = "Show Default Header",
|
|
229
|
+
onClick = {
|
|
230
|
+
navigation.setOptions(
|
|
231
|
+
headerType = HeaderType.Default,
|
|
232
|
+
headerTitle = HeaderTitle.Default(currentTitle)
|
|
233
|
+
)
|
|
234
|
+
},
|
|
235
|
+
type = ButtonType.OUTLINE,
|
|
236
|
+
size = Size.MEDIUM,
|
|
237
|
+
modifier = Modifier.fillMaxWidth()
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
Spacer(modifier = Modifier.height(8.dp))
|
|
241
|
+
|
|
242
|
+
// ========================================
|
|
243
|
+
// Example 5: Push Screen with Options
|
|
244
|
+
// ========================================
|
|
245
|
+
Text(
|
|
246
|
+
text = "5. Push Screen with Options",
|
|
247
|
+
style = MaterialTheme.typography.titleMedium,
|
|
248
|
+
color = MaterialTheme.typography.primaryColor
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
Button(
|
|
252
|
+
title = "Go to Detail Screen",
|
|
253
|
+
onClick = {
|
|
254
|
+
navigator.push(
|
|
255
|
+
content = { DetailScreen() },
|
|
256
|
+
options = NavigationOptions(
|
|
257
|
+
headerTitle = HeaderTitle.Default("Product Details")
|
|
258
|
+
)
|
|
259
|
+
)
|
|
260
|
+
},
|
|
261
|
+
type = ButtonType.TONAL,
|
|
262
|
+
size = Size.MEDIUM,
|
|
263
|
+
modifier = Modifier.fillMaxWidth()
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
Spacer(modifier = Modifier.height(24.dp))
|
|
267
|
+
|
|
268
|
+
// Summary
|
|
269
|
+
Text(
|
|
270
|
+
text = "Summary",
|
|
271
|
+
style = MaterialTheme.typography.titleMedium
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
Text(
|
|
275
|
+
text = """
|
|
276
|
+
To change header title dynamically with setOptions:
|
|
277
|
+
|
|
278
|
+
1. Get navigation instance: val navigation = LocalNavigation.current
|
|
279
|
+
|
|
280
|
+
2. Call setOptions() with HeaderTitle.Default("Your Title")
|
|
281
|
+
|
|
282
|
+
3. Use LaunchedEffect(Unit) for initial setup:
|
|
283
|
+
LaunchedEffect(Unit) {
|
|
284
|
+
navigation.setOptions(
|
|
285
|
+
headerTitle = HeaderTitle.Default("Initial Title")
|
|
286
|
+
)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
4. Call from any event handler for dynamic updates:
|
|
290
|
+
Button(onClick = {
|
|
291
|
+
navigation.setOptions(
|
|
292
|
+
headerTitle = HeaderTitle.Default("New Title")
|
|
293
|
+
)
|
|
294
|
+
})
|
|
295
|
+
""".trimIndent(),
|
|
296
|
+
style = MaterialTheme.typography.bodySmall,
|
|
297
|
+
color = MaterialTheme.colorScheme.onSurfaceVariant
|
|
298
|
+
)
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@Composable
|
|
303
|
+
fun DetailScreen() {
|
|
304
|
+
val navigation = LocalNavigation.current
|
|
305
|
+
|
|
306
|
+
LaunchedEffect(Unit) {
|
|
307
|
+
navigation.setOptions(
|
|
308
|
+
headerTitle = HeaderTitle.Default("Product Details")
|
|
309
|
+
)
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
Column(
|
|
313
|
+
modifier = Modifier
|
|
314
|
+
.fillMaxSize()
|
|
315
|
+
.padding(16.dp)
|
|
316
|
+
.verticalScroll(rememberScrollState()),
|
|
317
|
+
verticalArrangement = Arrangement.spacedBy(16.dp)
|
|
318
|
+
) {
|
|
319
|
+
Text(
|
|
320
|
+
text = "Product Details",
|
|
321
|
+
style = MaterialTheme.typography.headlineMedium
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
Text(
|
|
325
|
+
text = "This is a detail screen pushed with NavigationOptions. " +
|
|
326
|
+
"The header title was set when pushing this screen.",
|
|
327
|
+
style = MaterialTheme.typography.bodyMedium
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
Text(
|
|
331
|
+
text = "You can also change the title dynamically from this screen:",
|
|
332
|
+
style = MaterialTheme.typography.bodyMedium
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
Button(
|
|
336
|
+
title = "Update to 'Item Details'",
|
|
337
|
+
onClick = {
|
|
338
|
+
navigation.setOptions(headerTitle = HeaderTitle.Default("Item Details"))
|
|
339
|
+
},
|
|
340
|
+
type = ButtonType.PRIMARY,
|
|
341
|
+
size = Size.MEDIUM
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
Button(
|
|
345
|
+
title = "Update to 'Product #12345'",
|
|
346
|
+
onClick = {
|
|
347
|
+
navigation.setOptions(headerTitle = HeaderTitle.Default("Product #12345"))
|
|
348
|
+
},
|
|
349
|
+
type = ButtonType.SECONDARY,
|
|
350
|
+
size = Size.MEDIUM
|
|
351
|
+
)
|
|
352
|
+
}
|
|
353
|
+
}
|
|
@@ -1,13 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"
|
|
5
|
-
"Bash(
|
|
6
|
-
"Bash(
|
|
7
|
-
"Bash(
|
|
8
|
-
"Bash(
|
|
9
|
-
"Bash(
|
|
10
|
-
"Bash(
|
|
4
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/references)",
|
|
5
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/evals)",
|
|
6
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs)",
|
|
7
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs)",
|
|
8
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs)",
|
|
9
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs)",
|
|
10
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs)",
|
|
11
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs)",
|
|
12
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs)",
|
|
13
|
+
"Bash(mkdir -p /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs)",
|
|
14
|
+
"Bash(python3 -m scripts.aggregate_benchmark /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1 --skill-name momo-native-kits-skills)",
|
|
15
|
+
"Bash(python3 -m eval_viewer.generate_review /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1 --skill-name momo-native-kits-skills --benchmark /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json)",
|
|
16
|
+
"Bash(python3 eval-viewer/generate_review.py /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1 --skill-name momo-native-kits-skills --benchmark /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json)",
|
|
17
|
+
"Read(//tmp/**)",
|
|
18
|
+
"Read(//Users/phuc/.claude/skills/skill-creator/**)",
|
|
19
|
+
"Bash(python -m scripts.aggregate_benchmark /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3 --skill-name momo-native-kits-skills)",
|
|
20
|
+
"Bash(python3 -m scripts.aggregate_benchmark /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3 --skill-name momo-native-kits-skills)",
|
|
21
|
+
"Bash(python3 -m eval-viewer.generate_review /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3 --skill-name \"momo-native-kits-skills\" --static /Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval_viewer.html)"
|
|
22
|
+
],
|
|
23
|
+
"additionalDirectories": [
|
|
24
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill",
|
|
25
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs",
|
|
26
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill",
|
|
27
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs",
|
|
28
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs",
|
|
29
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs",
|
|
30
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs",
|
|
31
|
+
"/tmp",
|
|
32
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace",
|
|
33
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill",
|
|
34
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill",
|
|
35
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill",
|
|
36
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill",
|
|
37
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill",
|
|
38
|
+
"/Users/phuc/momo-native-kits/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill"
|
|
11
39
|
]
|
|
12
40
|
}
|
|
13
41
|
}
|
package/build.gradle.kts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
plugins {
|
|
2
|
+
// this is necessary to avoid the plugins to be loaded multiple times
|
|
3
|
+
// in each subproject's classloader
|
|
4
|
+
alias(libs.plugins.android.application) apply false
|
|
5
|
+
alias(libs.plugins.android.library) apply false
|
|
6
|
+
alias(libs.plugins.compose) apply false
|
|
7
|
+
alias(libs.plugins.kotlin.compose.compiler) apply false
|
|
8
|
+
alias(libs.plugins.jetbrains.kotlin.multiplatform) apply false
|
|
9
|
+
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
|
|
10
|
+
alias(libs.plugins.vanniktech.mavenPublish) apply false
|
|
11
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// import com.vanniktech.maven.publish.JavadocJar
|
|
2
|
+
// import com.vanniktech.maven.publish.KotlinMultiplatform
|
|
3
|
+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
4
|
+
|
|
5
|
+
plugins {
|
|
6
|
+
alias(libs.plugins.jetbrains.kotlin.multiplatform)
|
|
7
|
+
alias(libs.plugins.android.library)
|
|
8
|
+
alias(libs.plugins.compose)
|
|
9
|
+
alias(libs.plugins.kotlin.compose.compiler)
|
|
10
|
+
// alias(libs.plugins.vanniktech.mavenPublish)
|
|
11
|
+
id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
|
|
12
|
+
kotlin("plugin.serialization")
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
val gitlabName: String? = findProperty("name") as String? ?: ""
|
|
16
|
+
val gitlabRepo: String? = findProperty("repo") as String? ?: ""
|
|
17
|
+
val gitlabUrl: String? = findProperty("url") as String? ?: ""
|
|
18
|
+
val gitlabGroup: String? = findProperty("group") as String? ?: ""
|
|
19
|
+
val gitlabArtifactId: String = findProperty("artifact.id") as String? ?: ""
|
|
20
|
+
val gitlabVersion: String? = findProperty("version") as String? ?: ""
|
|
21
|
+
val gitlabUser: String? = findProperty("gitlab.user") as String? ?: ""
|
|
22
|
+
val gitlabKey: String? = findProperty("gitlab.password") as String? ?: ""
|
|
23
|
+
|
|
24
|
+
kotlin {
|
|
25
|
+
androidTarget {
|
|
26
|
+
compilerOptions {
|
|
27
|
+
jvmTarget.set(JvmTarget.JVM_17)
|
|
28
|
+
}
|
|
29
|
+
publishLibraryVariants("release")
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
val fwName = gitlabArtifactId
|
|
33
|
+
val iosTargets = listOf(iosX64(), iosArm64(), iosSimulatorArm64())
|
|
34
|
+
iosTargets.forEach {
|
|
35
|
+
it.binaries.framework {
|
|
36
|
+
baseName = fwName
|
|
37
|
+
binaryOption("bundleId", "$gitlabGroup.$fwName")
|
|
38
|
+
isStatic = true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
cocoapods {
|
|
43
|
+
version = "0.157.1-skill.3-debug"
|
|
44
|
+
summary = "IOS Shared module"
|
|
45
|
+
homepage = "https://momo.vn"
|
|
46
|
+
ios.deploymentTarget = "15.0"
|
|
47
|
+
|
|
48
|
+
framework {
|
|
49
|
+
baseName = fwName
|
|
50
|
+
isStatic = true
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
pod("lottie-ios") {
|
|
54
|
+
moduleName = "Lottie"
|
|
55
|
+
version = "4.4.3"
|
|
56
|
+
extraOpts += listOf("-compiler-option", "-fmodules")
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
sourceSets {
|
|
61
|
+
commonMain.dependencies {
|
|
62
|
+
implementation(compose.runtime)
|
|
63
|
+
implementation(compose.material)
|
|
64
|
+
implementation(compose.material3)
|
|
65
|
+
implementation(compose.components.resources)
|
|
66
|
+
implementation(libs.ktor.client.core)
|
|
67
|
+
implementation(libs.jetbrains.coroutines.core)
|
|
68
|
+
implementation(libs.navigation.multiplatform)
|
|
69
|
+
implementation(libs.coil.multiplatform.compose)
|
|
70
|
+
implementation(libs.coil.multiplatform.core)
|
|
71
|
+
implementation(libs.coil.multiplatform.network.ktor)
|
|
72
|
+
implementation(libs.jetbrains.serialization.json)
|
|
73
|
+
implementation(libs.kotlinx.datetime)
|
|
74
|
+
api(libs.native.max.api)
|
|
75
|
+
}
|
|
76
|
+
androidMain.dependencies {
|
|
77
|
+
implementation(libs.ktor.client.okhttp)
|
|
78
|
+
implementation(libs.airbnb.lottie)
|
|
79
|
+
}
|
|
80
|
+
iosMain.dependencies {
|
|
81
|
+
implementation(libs.ktor.client.darwin)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
android {
|
|
87
|
+
namespace = "vn.momo.kits.kits"
|
|
88
|
+
compileSdk = 35
|
|
89
|
+
compileOptions {
|
|
90
|
+
sourceCompatibility = JavaVersion.VERSION_17
|
|
91
|
+
targetCompatibility = JavaVersion.VERSION_17
|
|
92
|
+
}
|
|
93
|
+
defaultConfig {
|
|
94
|
+
minSdk = 24
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
dependencies {
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
repositories {
|
|
102
|
+
google {
|
|
103
|
+
mavenContent {
|
|
104
|
+
includeGroupAndSubgroups("androidx")
|
|
105
|
+
includeGroupAndSubgroups("com.android")
|
|
106
|
+
includeGroupAndSubgroups("com.google")
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
mavenCentral()
|
|
110
|
+
maven {
|
|
111
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
112
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
113
|
+
}
|
|
114
|
+
maven {
|
|
115
|
+
url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
|
|
116
|
+
isAllowInsecureProtocol = true
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
compose {
|
|
121
|
+
resources {
|
|
122
|
+
publicResClass = true
|
|
123
|
+
packageOfResClass = "vn.momo.uikits.resources"
|
|
124
|
+
generateResClass = always
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// publishing {
|
|
129
|
+
// repositories {
|
|
130
|
+
// maven {
|
|
131
|
+
// name = "${gitlabRepo}Packages"
|
|
132
|
+
// credentials {
|
|
133
|
+
// username = gitlabUser
|
|
134
|
+
// password = gitlabKey
|
|
135
|
+
// }
|
|
136
|
+
// url = uri("$gitlabUrl")
|
|
137
|
+
// }
|
|
138
|
+
// }
|
|
139
|
+
// }
|
|
140
|
+
|
|
141
|
+
// mavenPublishing {
|
|
142
|
+
// configure(
|
|
143
|
+
// KotlinMultiplatform(
|
|
144
|
+
// javadocJar = JavadocJar.Empty(),
|
|
145
|
+
// sourcesJar = true,
|
|
146
|
+
// androidVariantsToPublish = listOf("release")
|
|
147
|
+
// )
|
|
148
|
+
// )
|
|
149
|
+
//
|
|
150
|
+
// repositories {
|
|
151
|
+
// maven {
|
|
152
|
+
// name = "${gitlabRepo}Packages"
|
|
153
|
+
// credentials { username = gitlabUser; password = gitlabKey }
|
|
154
|
+
// url = uri("$gitlabUrl")
|
|
155
|
+
// }
|
|
156
|
+
// }
|
|
157
|
+
//
|
|
158
|
+
// coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
|
|
159
|
+
//
|
|
160
|
+
// pom {
|
|
161
|
+
// name = "$gitlabName Klib"
|
|
162
|
+
// description = "$gitlabName"
|
|
163
|
+
// url = "https://gitlab.mservice.com.vn"
|
|
164
|
+
// licenses {
|
|
165
|
+
// license {
|
|
166
|
+
// name = "The Apache License, Version 2.0"
|
|
167
|
+
// url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
168
|
+
// distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
169
|
+
// }
|
|
170
|
+
// }
|
|
171
|
+
// developers {
|
|
172
|
+
// developer {
|
|
173
|
+
// id = "kotlin-hands-on"
|
|
174
|
+
// name = "Kotlin Developer Advocate"
|
|
175
|
+
// url = "https://github.com/kotlin-hands-on/"
|
|
176
|
+
// }
|
|
177
|
+
// }
|
|
178
|
+
// }
|
|
179
|
+
// }
|
|
180
|
+
|