@momo-kits/native-kits 0.157.1-skill.3 → 0.157.1-skill.6-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 (222) hide show
  1. package/.claude/skills/momo-native-kits-skills/README.md +52 -0
  2. package/.claude/skills/momo-native-kits-skills/SKILL.md +32 -0
  3. package/.claude/skills/momo-native-kits-skills/data-display/SKILL.md +42 -0
  4. package/.claude/skills/momo-native-kits-skills/feedback/SKILL.md +43 -0
  5. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/popup.md +3 -10
  6. package/.claude/skills/momo-native-kits-skills/form-controls/SKILL.md +42 -0
  7. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/button.md +2 -3
  8. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/input.md +3 -7
  9. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/radio.md +9 -9
  10. package/.claude/skills/momo-native-kits-skills/layout/SKILL.md +39 -0
  11. package/.claude/skills/momo-native-kits-skills/navigation/SKILL.md +38 -0
  12. package/.claude/skills/momo-native-kits-skills/output/test-report.json +12 -0
  13. package/.claude/skills/momo-native-kits-skills/output/validation-result.json +108 -0
  14. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills}/references/constants.md +81 -6
  15. package/.claude/skills/momo-native-kits-skills/references/design-guidelines.md +130 -0
  16. package/.claude/skills/momo-native-kits-skills/references/developer/android-compose.md +29 -0
  17. package/.claude/skills/momo-native-kits-skills/references/developer/code-convention.md +118 -0
  18. package/.claude/skills/momo-native-kits-skills/references/developer/compose-multiplatform.md +29 -0
  19. package/.claude/skills/momo-native-kits-skills/scripts/logger.js +63 -0
  20. package/.claude/skills/momo-native-kits-skills/scripts/rules/badge.js +32 -0
  21. package/.claude/skills/momo-native-kits-skills/scripts/rules/bottomtab.js +19 -0
  22. package/.claude/skills/momo-native-kits-skills/scripts/rules/button.js +32 -0
  23. package/.claude/skills/momo-native-kits-skills/scripts/rules/card.js +32 -0
  24. package/.claude/skills/momo-native-kits-skills/scripts/rules/checkbox.js +32 -0
  25. package/.claude/skills/momo-native-kits-skills/scripts/rules/chip.js +59 -0
  26. package/.claude/skills/momo-native-kits-skills/scripts/rules/divider.js +19 -0
  27. package/.claude/skills/momo-native-kits-skills/scripts/rules/global.js +61 -0
  28. package/.claude/skills/momo-native-kits-skills/scripts/rules/index.js +54 -0
  29. package/.claude/skills/momo-native-kits-skills/scripts/rules/input.js +32 -0
  30. package/.claude/skills/momo-native-kits-skills/scripts/rules/navigation.js +48 -0
  31. package/.claude/skills/momo-native-kits-skills/scripts/rules/popup.js +45 -0
  32. package/.claude/skills/momo-native-kits-skills/scripts/rules/radio.js +105 -0
  33. package/.claude/skills/momo-native-kits-skills/scripts/rules/skeleton.js +20 -0
  34. package/.claude/skills/momo-native-kits-skills/scripts/rules/snackbar.js +32 -0
  35. package/.claude/skills/momo-native-kits-skills/scripts/rules/state.js +21 -0
  36. package/.claude/skills/momo-native-kits-skills/scripts/rules/switch.js +45 -0
  37. package/.claude/skills/momo-native-kits-skills/scripts/rules/text.js +19 -0
  38. package/.claude/skills/momo-native-kits-skills/scripts/rules/tooltip.js +45 -0
  39. package/.claude/skills/momo-native-kits-skills/scripts/rules/trustbanner.js +22 -0
  40. package/.claude/skills/momo-native-kits-skills/scripts/test-on-device.sh +117 -0
  41. package/.claude/skills/momo-native-kits-skills/scripts/test-runner.js +167 -0
  42. package/.claude/skills/momo-native-kits-skills/scripts/validate-kits.js +131 -0
  43. package/.momo-agent.json +13 -0
  44. package/build.gradle.kts +11 -0
  45. package/compose/build.gradle.kts +180 -0
  46. package/compose/build.gradle.kts.backup +180 -0
  47. package/compose/compose.podspec +54 -0
  48. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
  49. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  50. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  51. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  52. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  53. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  54. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  55. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  56. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  57. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  58. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  59. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  60. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  61. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  62. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
  135. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
  136. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
  137. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
  138. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
  139. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  140. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
  141. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
  142. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
  143. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
  144. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
  145. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
  146. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
  147. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
  148. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  149. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
  150. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  151. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
  152. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
  153. package/gradle/libs.versions.toml +57 -0
  154. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  155. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  156. package/gradle.properties +26 -0
  157. package/gradlew +252 -0
  158. package/gradlew.bat +94 -0
  159. package/package.json +1 -1
  160. package/settings.gradle.kts +52 -0
  161. package/.claude/momo-native-kits-skill/SKILL.md +0 -51
  162. package/.claude/momo-native-kits-skill/evals/evals.json +0 -95
  163. package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json +0 -20
  164. package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.md +0 -13
  165. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/eval_metadata.json +0 -6
  166. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/with_skill/outputs/ButtonExample.kt +0 -55
  167. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/without_skill/outputs/ButtonExample.kt +0 -45
  168. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/eval_metadata.json +0 -6
  169. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs/InputPhoneExample.kt +0 -40
  170. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs/InputPhoneExample.kt +0 -42
  171. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/eval_metadata.json +0 -6
  172. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs/BottomTabExample.kt +0 -236
  173. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs/BottomTabExample.kt +0 -152
  174. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/eval_metadata.json +0 -6
  175. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs/CheckBoxExample.kt +0 -49
  176. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs/CheckBoxExample.kt +0 -123
  177. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/eval_metadata.json +0 -6
  178. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs/DateTimePickerExample.kt +0 -318
  179. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs/DateTimePickerExample.kt +0 -330
  180. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs/CardExample.kt +0 -124
  181. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/without_skill/outputs/CardExample.kt +0 -71
  182. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/with_skill/outputs/LoginFormExample.kt +0 -134
  183. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/without_skill/outputs/LoginFormExample.kt +0 -199
  184. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -224
  185. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/without_skill/outputs/NavigationContainerExample.kt +0 -225
  186. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs/PopupExample.kt +0 -79
  187. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs/PopupExample.kt +0 -169
  188. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/eval_metadata.json +0 -6
  189. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -255
  190. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -212
  191. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs/SkeletonExample.kt +0 -199
  192. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/without_skill/outputs/SkeletonExample.kt +0 -229
  193. package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.json +0 -20
  194. package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.md +0 -13
  195. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/eval_metadata.json +0 -22
  196. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/outputs/PrimaryButtonExample.kt +0 -38
  197. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/timing.json +0 -5
  198. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/outputs/PrimaryButtonExample.kt +0 -83
  199. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/timing.json +0 -5
  200. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json +0 -22
  201. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -547
  202. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/timing.json +0 -5
  203. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/outputs/MoMoNavigationContainer.kt +0 -519
  204. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/timing.json +0 -5
  205. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json +0 -27
  206. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -429
  207. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/timing.json +0 -5
  208. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -353
  209. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/timing.json +0 -5
  210. package/.claude/settings.local.json +0 -41
  211. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/badge.md +0 -0
  212. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/chip.md +0 -0
  213. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/skeleton.md +0 -0
  214. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/text.md +0 -0
  215. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/snackbar.md +0 -0
  216. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/tooltip.md +0 -0
  217. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/trustbanner.md +0 -0
  218. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/checkbox.md +0 -0
  219. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/switch.md +0 -0
  220. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/card.md +0 -0
  221. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/divider.md +0 -0
  222. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/navigation}/references/navigation.md +0 -0
@@ -1,519 +0,0 @@
1
- /*
2
- * MoMo App NavigationContainer Implementation
3
- * Best practices for implementing navigation container in MoMo native Android app
4
- *
5
- * This file demonstrates the correct pattern for implementing NavigationContainer
6
- * in a MoMo-style mobile application using Jetpack Navigation and Compose.
7
- */
8
-
9
- package com.momo.navigation
10
-
11
- import android.content.Context
12
- import android.os.Bundle
13
- import androidx.compose.foundation.layout.Box
14
- import androidx.compose.foundation.layout.fillMaxSize
15
- import androidx.compose.foundation.layout.padding
16
- import androidx.compose.material3.Scaffold
17
- import androidx.compose.runtime.Composable
18
- import androidx.compose.runtime.CompositionLocalProvider
19
- import androidx.compose.runtime.LaunchedEffect
20
- import androidx.compose.runtime.collectAsState
21
- import androidx.compose.runtime.getValue
22
- import androidx.compose.runtime.mutableStateOf
23
- import androidx.compose.runtime.remember
24
- import androidx.compose.runtime.setValue
25
- import androidx.compose.ui.Modifier
26
- import androidx.fragment.app.FragmentActivity
27
- import androidx.lifecycle.Lifecycle
28
- import androidx.lifecycle.LifecycleEventObserver
29
- import androidx.lifecycle.compose.LocalLifecycleOwner
30
- import androidx.navigation.NavBackStackEntry
31
- import androidx.navigation.NavDestination
32
- import androidx.navigation.NavGraph
33
- import androidx.navigation.NavHostController
34
- import androidx.navigation.compose.NavHost
35
- import androidx.navigation.compose.composable
36
- import androidx.navigation.compose.currentBackStackEntryAsState
37
- import androidx.navigation.compose.rememberNavController
38
- import kotlinx.coroutines.flow.MutableStateFlow
39
- import kotlinx.coroutines.flow.StateFlow
40
- import kotlinx.coroutines.flow.asStateFlow
41
-
42
- // ============================================================================
43
- // NavigationContainer Configuration
44
- // ============================================================================
45
-
46
- /**
47
- * NavigationContainer configuration for MoMo app
48
- * Contains all navigation-related configuration settings
49
- */
50
- data class NavigationContainerConfig(
51
- val startDestination: String = "home",
52
- val showBottomBar: Boolean = true,
53
- val enableDeepLinks: Boolean = true,
54
- val animationDuration: Int = 300
55
- )
56
-
57
- // ============================================================================
58
- // Navigation Routes
59
- // ============================================================================
60
-
61
- /**
62
- * Sealed class representing all navigation routes in MoMo app
63
- * Provides type-safe navigation throughout the app
64
- */
65
- sealed class MoMoRoute(val route: String) {
66
- // Main tabs
67
- data object Home : MoMoRoute("home")
68
- data object Wallet : MoMoRoute("wallet")
69
- data object QRPay : MoMoRoute("qr_pay")
70
- data object History : MoMoRoute("history")
71
- data object Profile : MoMoRoute("profile")
72
-
73
- // Detail screens
74
- data object Transfer : MoMoRoute("transfer")
75
- data object Payment : MoMoRoute("payment")
76
- data object TopUp : MoMoRoute("top_up")
77
- data object FinancialService : MoMoRoute("financial_service")
78
-
79
- // Auth screens
80
- data object Login : MoMoRoute("login")
81
- data object OTPVerification : MoMoRoute("otp_verification")
82
- data object BiometricSetup : MoMoRoute("biometric_setup")
83
-
84
- // Feature screens
85
- data object Game : MoMoRoute("game")
86
- data object Entertainment : MoMoRoute("entertainment")
87
- data object Insurance : MoMoRoute("insurance")
88
- data object Savings : MoMoRoute("savings")
89
-
90
- companion object {
91
- const val ARG_TRANSACTION_ID = "transactionId"
92
- const val ARG_SERVICE_ID = "serviceId"
93
- const val ARG_AMOUNT = "amount"
94
- }
95
- }
96
-
97
- // ============================================================================
98
- // Navigation State
99
- // ============================================================================
100
-
101
- /**
102
- * Navigation state holder for managing navigation state across the app
103
- * Follows unidirectional data flow pattern
104
- */
105
- class NavigationState(
106
- private val navController: NavHostController
107
- ) {
108
- private val _currentRoute = MutableStateFlow<String?>(null)
109
- val currentRoute: StateFlow<String?> = _currentRoute.asStateFlow()
110
-
111
- private val _isLoading = MutableStateFlow(false)
112
- val isLoading: StateFlow<Boolean> = _isLoading.asStateFlow()
113
-
114
- private val _deepLinkHandled = MutableStateFlow(false)
115
- val deepLinkHandled: StateFlow<Boolean> = _deepLinkHandled.asStateFlow()
116
-
117
- init {
118
- navController.addOnDestinationChangedListener { _, destination, _ ->
119
- _currentRoute.value = destination.route
120
- }
121
- }
122
-
123
- fun navigate(route: String, args: Bundle? = null) {
124
- _isLoading.value = true
125
- navController.navigate(route) {
126
- launchSingleTop = true
127
- restoreState = true
128
- popUpTo(navController.graph.startDestinationId) {
129
- saveState = true
130
- }
131
- }
132
- _isLoading.value = false
133
- }
134
-
135
- fun navigateAndClearStack(route: String) {
136
- navController.navigate(route) {
137
- popUpTo(0) { inclusive = true }
138
- }
139
- }
140
-
141
- fun popBackStack(): Boolean = navController.popBackStack()
142
-
143
- fun popBackStack(destinationId: String, inclusive: Boolean = false) {
144
- navController.popBackStack(destinationId, inclusive)
145
- }
146
-
147
- fun handleDeepLink(uri: android.net.Uri) {
148
- navController.handleDeepLink(uri)
149
- _deepLinkHandled.value = true
150
- }
151
- }
152
-
153
- // ============================================================================
154
- // NavigationContainer Implementation
155
- // ============================================================================
156
-
157
- /**
158
- * MoMoNavigationContainer - Main navigation container for MoMo app
159
- *
160
- * This is the correct pattern for implementing NavigationContainer in MoMo app:
161
- * - Wraps all navigation functionality
162
- * - Provides consistent navigation state management
163
- * - Handles bottom navigation visibility
164
- * - Supports deep linking
165
- * - Integrates with MoMo's theming and authentication
166
- *
167
- * @param config NavigationContainer configuration
168
- * @param content The main content composable
169
- */
170
- @Composable
171
- fun MoMoNavigationContainer(
172
- config: NavigationContainerConfig = NavigationContainerConfig(),
173
- content: @Composable (NavigationState) -> Unit
174
- ) {
175
- val navController = rememberNavController()
176
- val navigationState = remember(navController) { NavigationState(navController) }
177
-
178
- // Track current destination for bottom bar visibility
179
- val navBackStackEntry by navController.currentBackStackEntryAsState()
180
- val currentDestination = navBackStackEntry?.destination
181
-
182
- // Determine if bottom bar should be shown
183
- val shouldShowBottomBar = remember(currentDestination) {
184
- config.showBottomBar && currentDestination?.route in getBottomBarRoutes()
185
- }
186
-
187
- // Handle lifecycle events for navigation state persistence
188
- val lifecycleOwner = LocalLifecycleOwner.current
189
- LaunchedEffect(lifecycleOwner) {
190
- lifecycleOwner.lifecycle.addObserver(LifecycleEventObserver { _, event ->
191
- when (event) {
192
- Lifecycle.Event.ON_RESUME -> {
193
- // Restore navigation state if needed
194
- }
195
- Lifecycle.Event.ON_PAUSE -> {
196
- // Save navigation state if needed
197
- }
198
- else -> {}
199
- }
200
- })
201
- }
202
-
203
- // Main scaffold with bottom navigation
204
- Scaffold(
205
- bottomBar = {
206
- if (shouldShowBottomBar) {
207
- MoMoBottomNavigation(
208
- currentRoute = currentDestination?.route,
209
- onNavigate = { route ->
210
- navigationState.navigate(route)
211
- }
212
- )
213
- }
214
- }
215
- ) { paddingValues ->
216
- Box(
217
- modifier = Modifier
218
- .fillMaxSize()
219
- .padding(paddingValues)
220
- ) {
221
- // Navigation host
222
- MoMoNavHost(
223
- navController = navController,
224
- startDestination = config.startDestination
225
- )
226
-
227
- // Main content overlay
228
- content(navigationState)
229
- }
230
- }
231
- }
232
-
233
- /**
234
- * Internal NavHost configuration
235
- */
236
- @Composable
237
- private fun MoMoNavHost(
238
- navController: NavHostController,
239
- startDestination: String
240
- ) {
241
- NavHost(
242
- navController = navController,
243
- startDestination = startDestination
244
- ) {
245
- // Main tab destinations
246
- composable(MoMoRoute.Home.route) {
247
- HomeScreen(
248
- onNavigateToTransfer = { navController.navigate(MoMoRoute.Transfer.route) },
249
- onNavigateToPayment = { navController.navigate(MoMoRoute.Payment.route) },
250
- onNavigateToTopUp = { navController.navigate(MoMoRoute.TopUp.route) }
251
- )
252
- }
253
-
254
- composable(MoMoRoute.Wallet.route) {
255
- WalletScreen(
256
- onNavigateToTopUp = { navController.navigate(MoMoRoute.TopUp.route) },
257
- onNavigateToTransfer = { navController.navigate(MoMoRoute.Transfer.route) }
258
- )
259
- }
260
-
261
- composable(MoMoRoute.QRPay.route) {
262
- QRPayScreen()
263
- }
264
-
265
- composable(MoMoRoute.History.route) {
266
- HistoryScreen(
267
- onNavigateToDetail = { transactionId ->
268
- navController.navigate("transaction_detail/$transactionId")
269
- }
270
- )
271
- }
272
-
273
- composable(MoMoRoute.Profile.route) {
274
- ProfileScreen(
275
- onNavigateToSettings = { /* Navigate to settings */ },
276
- onNavigateToSecurity = { /* Navigate to security */ }
277
- )
278
- }
279
-
280
- // Feature destinations
281
- composable(MoMoRoute.Transfer.route) {
282
- TransferScreen(
283
- onComplete = { navController.popBackStack() },
284
- onError = { /* Handle error */ }
285
- )
286
- }
287
-
288
- composable(MoMoRoute.Payment.route) {
289
- PaymentScreen(
290
- onComplete = { navController.popBackStack() }
291
- )
292
- }
293
-
294
- composable(MoMoRoute.TopUp.route) {
295
- TopUpScreen(
296
- onComplete = { navController.popBackStack() }
297
- )
298
- }
299
-
300
- composable(MoMoRoute.FinancialService.route) {
301
- FinancialServiceScreen()
302
- }
303
-
304
- // Auth destinations
305
- composable(MoMoRoute.Login.route) {
306
- LoginScreen(
307
- onLoginSuccess = {
308
- navController.navigate(MoMoRoute.Home.route) {
309
- popUpTo(MoMoRoute.Login.route) { inclusive = true }
310
- }
311
- },
312
- onOTPRequested = { phone ->
313
- navController.navigate("${MoMoRoute.OTPVerification.route}?phone=$phone")
314
- }
315
- )
316
- }
317
-
318
- composable(
319
- route = "${MoMoRoute.OTPVerification.route}?phone={phone}",
320
- arguments = listOf(
321
- androidx.navigation.navArgument("phone") {
322
- type = androidx.navigation.NavType.StringType
323
- defaultValue = ""
324
- }
325
- )
326
- ) { backStackEntry ->
327
- val phone = backStackEntry.arguments?.getString("phone") ?: ""
328
- OTPVerificationScreen(
329
- phone = phone,
330
- onVerified = {
331
- navController.navigate(MoMoRoute.Home.route) {
332
- popUpTo(0) { inclusive = true }
333
- }
334
- }
335
- )
336
- }
337
-
338
- // Additional screens can be added here
339
- }
340
- }
341
-
342
- // ============================================================================
343
- // Bottom Navigation
344
- // ============================================================================
345
-
346
- /**
347
- * Returns list of routes that should show bottom navigation bar
348
- */
349
- private fun getBottomBarRoutes(): List<String> = listOf(
350
- MoMoRoute.Home.route,
351
- MoMoRoute.Wallet.route,
352
- MoMoRoute.QRPay.route,
353
- MoMoRoute.History.route,
354
- MoMoRoute.Profile.route
355
- )
356
-
357
- /**
358
- * MoMo bottom navigation bar component
359
- */
360
- @Composable
361
- private fun MoMoBottomNavigation(
362
- currentRoute: String?,
363
- onNavigate: (String) -> Unit
364
- ) {
365
- val items = listOf(
366
- BottomNavItem(MoMoRoute.Home.route, "Home", "ic_home"),
367
- BottomNavItem(MoMoRoute.Wallet.route, "Wallet", "ic_wallet"),
368
- BottomNavItem(MoMoRoute.QRPay.route, "QR", "ic_qr"),
369
- BottomNavItem(MoMoRoute.History.route, "History", "ic_history"),
370
- BottomNavItem(MoMoRoute.Profile.route, "Profile", "ic_profile")
371
- )
372
-
373
- // Use MoMo's actual bottom navigation composable here
374
- // This is a simplified version showing the pattern
375
- androidx.compose.material3.BottomNavigation {
376
- items.forEach { item ->
377
- androidx.compose.material3.BottomNavigationItem(
378
- icon = { /* Load icon based on item.iconRes */ },
379
- label = { androidx.compose.material3.Text(item.label) },
380
- selected = currentRoute == item.route,
381
- onClick = { onNavigate(item.route) }
382
- )
383
- }
384
- }
385
- }
386
-
387
- private data class BottomNavItem(
388
- val route: String,
389
- val label: String,
390
- val iconRes: String
391
- )
392
-
393
- // ============================================================================
394
- // Screen Placeholders
395
- // ============================================================================
396
-
397
- // These would be replaced with actual MoMo screen implementations
398
-
399
- @Composable
400
- private fun HomeScreen(
401
- onNavigateToTransfer: () -> Unit,
402
- onNavigateToPayment: () -> Unit,
403
- onNavigateToTopUp: () -> Unit
404
- ) {
405
- Box(modifier = Modifier.fillMaxSize()) {
406
- // Home screen content
407
- }
408
- }
409
-
410
- @Composable
411
- private fun WalletScreen(
412
- onNavigateToTopUp: () -> Unit,
413
- onNavigateToTransfer: () -> Unit
414
- ) {
415
- Box(modifier = Modifier.fillMaxSize())
416
- }
417
-
418
- @Composable
419
- private fun QRPayScreen() {
420
- Box(modifier = Modifier.fillMaxSize())
421
- }
422
-
423
- @Composable
424
- private fun HistoryScreen(
425
- onNavigateToDetail: (String) -> Unit
426
- ) {
427
- Box(modifier = Modifier.fillMaxSize())
428
- }
429
-
430
- @Composable
431
- private fun ProfileScreen(
432
- onNavigateToSettings: () -> Unit,
433
- onNavigateToSecurity: () -> Unit
434
- ) {
435
- Box(modifier = Modifier.fillMaxSize())
436
- }
437
-
438
- @Composable
439
- private fun TransferScreen(
440
- onComplete: () -> Unit,
441
- onError: (String) -> Unit
442
- ) {
443
- Box(modifier = Modifier.fillMaxSize())
444
- }
445
-
446
- @Composable
447
- private fun PaymentScreen(onComplete: () -> Unit) {
448
- Box(modifier = Modifier.fillMaxSize())
449
- }
450
-
451
- @Composable
452
- private fun TopUpScreen(onComplete: () -> Unit) {
453
- Box(modifier = Modifier.fillMaxSize())
454
- }
455
-
456
- @Composable
457
- private fun FinancialServiceScreen() {
458
- Box(modifier = Modifier.fillMaxSize())
459
- }
460
-
461
- @Composable
462
- private fun LoginScreen(
463
- onLoginSuccess: () -> Unit,
464
- onOTPRequested: (String) -> Unit
465
- ) {
466
- Box(modifier = Modifier.fillMaxSize())
467
- }
468
-
469
- @Composable
470
- private fun OTPVerificationScreen(
471
- phone: String,
472
- onVerified: () -> Unit
473
- ) {
474
- Box(modifier = Modifier.fillMaxSize())
475
- }
476
-
477
- // ============================================================================
478
- // Usage Example
479
- // ============================================================================
480
-
481
- /**
482
- * Example of how to use MoMoNavigationContainer in your Activity
483
- *
484
- * ```kotlin
485
- * class MainActivity : FragmentActivity() {
486
- * override fun onCreate(savedInstanceState: Bundle?) {
487
- * super.onCreate(savedInstanceState)
488
- * setContent {
489
- * MoMoNavigationContainer(
490
- * config = NavigationContainerConfig(
491
- * startDestination = MoMoRoute.Home.route,
492
- * showBottomBar = true,
493
- * enableDeepLinks = true
494
- * )
495
- * ) { navigationState ->
496
- * // Optional: Handle navigation state from parent
497
- * // This could be used for analytics, error handling, etc.
498
- * }
499
- * }
500
- * }
501
- *
502
- * override fun onNewIntent(intent: android.content.Intent) {
503
- * super.onNewIntent(intent)
504
- * // Handle deep links
505
- * intent.data?.let { uri ->
506
- * // Navigate using navigationState.handleDeepLink(uri)
507
- * }
508
- * }
509
- * }
510
- * ```
511
- *
512
- * Key patterns demonstrated:
513
- * 1. Type-safe navigation with sealed class routes
514
- * 2. Centralized navigation state management
515
- * 3. Lifecycle-aware navigation handling
516
- * 4. Deep link support
517
- * 5. Bottom navigation visibility control
518
- * 6. Navigation state persistence across configuration changes
519
- */
@@ -1,5 +0,0 @@
1
- {
2
- "total_tokens": 15976,
3
- "duration_ms": 80746,
4
- "total_duration_seconds": 80.7
5
- }
@@ -1,27 +0,0 @@
1
- {
2
- "eval_id": 1,
3
- "eval_name": "navigation-setoptions",
4
- "prompt": "How to use setOptions in MoMo navigation? Show me how to change header title dynamically",
5
- "assertions": [
6
- {
7
- "text": "Uses LocalNavigation.current",
8
- "passed": true,
9
- "evidence": "val navigation = LocalNavigation.current"
10
- },
11
- {
12
- "text": "Uses LaunchedEffect(Unit)",
13
- "passed": true,
14
- "evidence": "LaunchedEffect(Unit) { ... }"
15
- },
16
- {
17
- "text": "Uses setOptions method",
18
- "passed": true,
19
- "evidence": "navigation.setOptions(...)"
20
- },
21
- {
22
- "text": "Uses HeaderTitle",
23
- "passed": true,
24
- "evidence": "headerTitle = HeaderTitle.Default(...)"
25
- }
26
- ]
27
- }