@momo-kits/native-kits 0.156.1-test.20-debug → 0.156.1-test.20

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 (116) hide show
  1. package/package.json +1 -1
  2. package/build.gradle.kts +0 -11
  3. package/compose/build.gradle.kts +0 -180
  4. package/compose/build.gradle.kts.backup +0 -180
  5. package/compose/compose.podspec +0 -54
  6. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -113
  7. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  8. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  9. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  10. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  11. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  12. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  13. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  14. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  15. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  16. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  17. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  18. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  19. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  20. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +0 -57
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +0 -95
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +0 -201
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +0 -222
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +0 -48
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +0 -86
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +0 -76
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +0 -76
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +0 -305
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +0 -33
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +0 -715
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +0 -121
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +0 -405
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +0 -69
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +0 -83
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +0 -32
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +0 -340
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +0 -348
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -94
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +0 -136
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +0 -543
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +0 -23
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +0 -76
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +0 -148
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +0 -188
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +0 -116
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +0 -447
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +0 -172
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +0 -244
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +0 -231
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +0 -234
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +0 -254
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +0 -241
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +0 -364
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +0 -56
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +0 -41
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +0 -92
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +0 -40
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +0 -352
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +0 -103
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +0 -70
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -17
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +0 -96
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +0 -96
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +0 -92
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +0 -130
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +0 -214
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +0 -177
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +0 -205
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +0 -29
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +0 -239
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +0 -191
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +0 -306
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +0 -12
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +0 -13
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -189
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +0 -285
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +0 -2
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +0 -35
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +0 -2
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -59
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +0 -68
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +0 -11
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +0 -14
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +0 -50
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +0 -51
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +0 -239
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +0 -119
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +0 -99
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -166
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -333
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +0 -552
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +0 -162
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +0 -226
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +0 -86
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +0 -187
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +0 -274
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +0 -80
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +0 -306
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +0 -31
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +0 -370
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +0 -132
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +0 -219
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +0 -42
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +0 -1329
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +0 -62
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +0 -88
  108. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -152
  109. package/gradle/libs.versions.toml +0 -57
  110. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  111. package/gradle/wrapper/gradle-wrapper.properties +0 -8
  112. package/gradle.properties +0 -26
  113. package/gradlew +0 -252
  114. package/gradlew.bat +0 -94
  115. package/local.properties +0 -8
  116. package/settings.gradle.kts +0 -52
@@ -1,219 +0,0 @@
1
- package vn.momo.kits.navigation.tracking
2
-
3
- import vn.momo.kits.application.MiniAppContext
4
- import vn.momo.maxapi.IMaxApi
5
- import kotlin.time.Clock
6
- import kotlin.time.ExperimentalTime
7
-
8
- /**
9
- * Screen tracking state holder
10
- */
11
- class ScreenTrackingState {
12
- @OptIn(ExperimentalTime::class)
13
- var startTime: Long = Clock.System.now().toEpochMilliseconds()
14
- var endTime: Long = startTime
15
- var releaseNavigated: Boolean = false
16
- var releaseLoad: Boolean = false
17
- var releaseInteraction: Boolean = false
18
- var previousScreenName: String? = null
19
- var action: String = "push"
20
- }
21
-
22
- /**
23
- * Screen tracker for auto tracking events
24
- *
25
- * Tracks 3 main events:
26
- * - auto_screen_navigated: When screen is focused
27
- * - auto_screen_displayed: When screen finished loading
28
- * - auto_screen_interacted: When screen is ready for interaction
29
- */
30
- object ScreenTracker {
31
-
32
- private var lastScreenName: String? = null
33
-
34
- /**
35
- * Track screen navigation event
36
- * Called when screen is focused
37
- */
38
- fun trackScreenNavigated(
39
- maxApi: IMaxApi?,
40
- context: MiniAppContext?,
41
- screenName: String,
42
- action: String,
43
- state: ScreenTrackingState
44
- ) {
45
- if (state.releaseNavigated) return
46
-
47
- val previousScreen = lastScreenName
48
- lastScreenName = screenName
49
-
50
- println("Tracking screen navigated native kit: $screenName")
51
- maxApi?.track(
52
- eventName = "auto_screen_navigated",
53
- params = buildBaseParams(context, screenName).apply {
54
- put("pre_screen_name", previousScreen)
55
- put("state", "navigated")
56
- put("action", action)
57
- }
58
- )
59
-
60
- state.releaseNavigated = true
61
- state.previousScreenName = previousScreen
62
- }
63
-
64
- /**
65
- * Track screen displayed event
66
- * Called when screen finished loading all elements
67
- */
68
- fun trackScreenDisplayed(
69
- maxApi: IMaxApi?,
70
- context: MiniAppContext?,
71
- screenName: String,
72
- duration: Long,
73
- state: ScreenTrackingState
74
- ) {
75
- if (state.releaseLoad) return
76
-
77
- maxApi?.track(
78
- eventName = "auto_screen_displayed",
79
- params = buildBaseParams(context, screenName).apply {
80
- put("state", "load")
81
- put("duration", duration)
82
- }
83
- )
84
-
85
- state.releaseLoad = true
86
- }
87
-
88
- /**
89
- * Track screen interacted event
90
- * Called when screen is ready for user interaction
91
- */
92
- fun trackScreenInteracted(
93
- maxApi: IMaxApi?,
94
- context: MiniAppContext?,
95
- screenName: String,
96
- duration: Long,
97
- totalDuration: Long,
98
- state: ScreenTrackingState
99
- ) {
100
- if (state.releaseInteraction) return
101
-
102
- maxApi?.track(
103
- eventName = "auto_screen_interacted",
104
- params = buildBaseParams(context, screenName).apply {
105
- put("state", "interaction")
106
- put("duration", duration)
107
- put("total_duration", totalDuration)
108
- }
109
- )
110
-
111
- state.releaseInteraction = true
112
- }
113
-
114
- /**
115
- * Build base tracking params from MiniAppContext
116
- */
117
- private fun buildBaseParams(
118
- context: MiniAppContext?,
119
- screenName: String,
120
- componentName: String = "Screen"
121
- ): MutableMap<String, Any?> {
122
- return mutableMapOf(
123
- "app_id" to context?.appId,
124
- "feature_code" to context?.appCode,
125
- // "miniapp_version" to context?.,
126
- "screen_name" to screenName,
127
- "component_name" to componentName,
128
- "tracking_source" to 1
129
- )
130
- }
131
-
132
- /**
133
- * Track popup/modal displayed event
134
- * Called when popup is opened or closed
135
- *
136
- * @param action "open" or "close"
137
- * @param popupName name of the popup/modal
138
- * @param parentScreenName the screen that shows the popup
139
- * @param title popup title for tracking
140
- * @param desc popup description for tracking
141
- */
142
- fun trackPopupDisplayed(
143
- maxApi: IMaxApi?,
144
- context: MiniAppContext?,
145
- action: String,
146
- popupName: String?,
147
- parentScreenName: String?,
148
- title: String? = null,
149
- desc: String? = null
150
- ) {
151
- // When opening: screen_name = parent screen, component_name = popup name
152
- // When closing: screen_name = popup name, component_name = parent screen
153
- val screenName = if (action == "open") parentScreenName else popupName
154
- val componentName = if (action == "open") popupName else parentScreenName
155
-
156
- maxApi?.track(
157
- eventName = "auto_popup_displayed",
158
- params = mutableMapOf(
159
- "app_id" to context?.appId,
160
- "feature_code" to context?.appCode,
161
- "screen_name" to screenName,
162
- "component_name" to componentName,
163
- "action" to action,
164
- "title" to title,
165
- "desc" to desc,
166
- "tracking_source" to 1
167
- )
168
- )
169
- }
170
-
171
- /**
172
- * Track bottom sheet displayed event
173
- * Called when bottom sheet is opened or closed
174
- *
175
- * @param action "open" or "close"
176
- * @param sheetName name of the bottom sheet
177
- * @param parentScreenName the screen that shows the bottom sheet
178
- * @param title sheet title for tracking
179
- * @param desc sheet description for tracking
180
- */
181
- fun trackBottomSheetDisplayed(
182
- maxApi: IMaxApi?,
183
- context: MiniAppContext?,
184
- action: String,
185
- sheetName: String?,
186
- parentScreenName: String?,
187
- title: String? = null,
188
- desc: String? = null
189
- ) {
190
- val screenName = if (action == "open") parentScreenName else sheetName
191
- val componentName = if (action == "open") sheetName else parentScreenName
192
-
193
- maxApi?.track(
194
- eventName = "auto_bottomsheet_displayed",
195
- params = mutableMapOf(
196
- "app_id" to context?.appId,
197
- "feature_code" to context?.appCode,
198
- "screen_name" to screenName,
199
- "component_name" to componentName,
200
- "action" to action,
201
- "title" to title,
202
- "desc" to desc,
203
- "tracking_source" to 1
204
- )
205
- )
206
- }
207
-
208
- /**
209
- * Get previous screen name for back navigation detection
210
- */
211
- fun getLastScreenName(): String? = lastScreenName
212
-
213
- /**
214
- * Reset tracker (for testing or cleanup)
215
- */
216
- fun reset() {
217
- lastScreenName = null
218
- }
219
- }
@@ -1,42 +0,0 @@
1
- package vn.momo.kits.platform
2
-
3
- import androidx.compose.runtime.Composable
4
- import androidx.compose.ui.Modifier
5
- import androidx.compose.ui.graphics.Color
6
- import androidx.compose.ui.graphics.NativePaint
7
- import androidx.compose.ui.unit.Dp
8
-
9
- data class ScreenDimension(
10
- val width: Int,
11
- val height: Int,
12
- )
13
-
14
- expect fun getPlatformName(): String
15
-
16
- @Composable
17
- expect fun getScreenDimensions(): ScreenDimension
18
-
19
- expect fun NativePaint.setMaskFilter(blurRadius: Float)
20
-
21
- @Composable
22
- expect fun getStatusBarHeight(): Dp
23
-
24
- @Composable
25
- expect fun BackHandler(enabled: Boolean, onBack: () -> Unit)
26
-
27
- @Composable
28
- expect fun getScreenHeight(): Dp
29
-
30
- expect fun getAndroidBuildVersion(): Int
31
-
32
- @Composable
33
- expect fun LottieAnimation(
34
- path: String,
35
- tintColor: Color? = null,
36
- bgColor: Color? = null,
37
- modifier: Modifier = Modifier
38
- )
39
-
40
- expect fun NativePaint.setColor(
41
- color: Color = Color.Black
42
- )