@momo-kits/native-kits 0.168.1-beta.2 → 0.168.1-beta.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.md +4 -4
- package/README.md +10 -2
- package/build.gradle.kts +13 -0
- package/compose/build.gradle.kts +197 -0
- package/compose/build.gradle.kts.backup +197 -0
- package/compose/compose.podspec +47 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/const/HostFont.android.kt +19 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/BackGesture.android.kt +12 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +153 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReservedRegions.android.kt +6 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +124 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +1071 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +65 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +81 -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 +338 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +115 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +128 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +542 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +49 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +125 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +189 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +478 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +114 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +265 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +235 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +223 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +265 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +343 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -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 +84 -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 +361 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +108 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +308 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +90 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +330 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +220 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +473 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +207 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +560 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +125 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +207 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +501 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +176 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -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 +236 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +180 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +325 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/HostFont.kt +16 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitDesignSystem.kt +18 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitFontScale.kt +22 -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 +16 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +194 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +283 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +54 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +309 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -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 +104 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -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 +338 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/HostBackGestureBridge.kt +58 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +137 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +116 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +215 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +404 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +732 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackTransition.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/SwipeBackHaptic.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +233 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +217 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoBarCompression.kt +98 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +312 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +169 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +455 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +103 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderJourney.kt +106 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderLocation.kt +74 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +413 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +39 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +363 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HelpCenterRequest.kt +37 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SideBar.kt +192 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +133 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/ToolkitRequests.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +135 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/BackGesture.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +91 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +9 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +74 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +13 -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 +55 -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 +118 -0
- package/compose/src/commonTest/kotlin/vn/momo/kits/navigation/component/HelpCenterRequestTest.kt +44 -0
- package/compose/src/commonTest/kotlin/vn/momo/kits/navigation/component/ToolkitRequestsTest.kt +62 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +40 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/HostBackGesture.ios.kt +45 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +36 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/BackGesture.ios.kt +38 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +66 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +217 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +94 -0
- package/gradle/libs.versions.toml +76 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +10 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/ios-demo/README.md +120 -0
- package/package.json +1 -1
- package/publish.sh +7 -2
- package/settings.gradle.kts +64 -0
- package/.claude/settings.local.json +0 -9
package/CLAUDE.md
CHANGED
|
@@ -7,7 +7,7 @@ Guidance for working in this repo. Keep it accurate — update it when structure
|
|
|
7
7
|
`momo-native-kits` — MoMo's design-system / UI-kit as a **Kotlin Multiplatform + Compose Multiplatform** library, published for Android (AAR/Maven) and iOS (static framework + CocoaPods). It is the Compose port of the React Native `momo-kits`. Consumed by mini-apps embedded in the host MoMo app.
|
|
8
8
|
|
|
9
9
|
- Artifact: `vn.momo.kits:kits` (version in `gradle.properties`). NPM mirror: `@momo-kits/native-kits`.
|
|
10
|
-
- Targets: `
|
|
10
|
+
- Targets: AGP KMP `android` target (JVM 17, compile/min SDK 36/24; AGP 9.2.1, Gradle 9.5.0), `iosArm64`, `iosSimulatorArm64` (framework `baseName = "kits"`, `isStatic = true`).
|
|
11
11
|
- Kotlin 2.3.10, Compose MP 1.10.3.
|
|
12
12
|
|
|
13
13
|
## Modules
|
|
@@ -26,11 +26,11 @@ Guidance for working in this repo. Keep it accurate — update it when structure
|
|
|
26
26
|
|
|
27
27
|
## Build & verify
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Run `./gradlew :compose:testAndroidHostTest` for the request ownership tests in `commonTest`. Compile the relevant Android/iOS targets and use the sample app for visual checks.
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
./gradlew :compose:compileCommonMainKotlinMetadata # validate commonMain (fast, do this first)
|
|
33
|
-
./gradlew :compose:
|
|
33
|
+
./gradlew :compose:compileAndroidMain # Android target
|
|
34
34
|
./gradlew :compose:linkDebugFrameworkIosSimulatorArm64 # iOS framework (slow)
|
|
35
35
|
./gradlew :sample:androidApp:installDebug # run demo on device/emulator
|
|
36
36
|
```
|
|
@@ -50,7 +50,7 @@ Publishing is automated (`publish.sh` + GitLab CI on `[ci build]` / `main`). Do
|
|
|
50
50
|
- **Configuration flows via CompositionLocals**, not params. Public ones: `AppTheme`, `AppStatusBar`, `AppNavigationBar` (`const/Theme.kt`); `ApplicationContext`, `AppConfig`, `AppLanguage`, `LocalLocalize` (`application/`); `LocalNavigator`, `LocalMaxApi` (`navigation/`). Read with `X.current`.
|
|
51
51
|
- **Design-system config** (`trustBanner`, `headerBar`, `headerGradient`): the host seeds `KitDesignSystemConfig.update(...)` once (same pattern as `KitFontScale`); `NavigationContainer` provides it as `LocalDesignSystemConfig` (param `designSystemConfig` → parent → global) and applies `headerBar` as the header image when the theme has none.
|
|
52
52
|
- **Platform code** goes through `expect`/`actual` in `platform/` — never reference Android/iOS APIs from `commonMain` directly.
|
|
53
|
-
- **Native bridge:** `IMaxApi` (`vn.momo.maxapi`, exposed as `LocalMaxApi`) is the host-app bridge
|
|
53
|
+
- **Native bridge:** typed `IMaxApi` from NativeMaxApi `0.3.1` (`vn.momo.maxapi`, exposed as `LocalMaxApi`) is the host-app bridge. Toolkit uses `ToolkitOptions` to preserve custom groups and system-tool policy; pending callbacks are cancelled when their composition is disposed. Containers borrow the host client and must not close it.
|
|
54
54
|
- Navigation uses a runtime `DynamicScreenRegistry`; overlays (modal/bottom-sheet/snackbar) go through `Navigator` + `OverplayComponentRegistry`.
|
|
55
55
|
- **iOS swipe-back:** the host owns the only edge-pan recogniser and replays it through `HostBackGestureBridge` (`navigation/HostBackGestureBridge.kt`; the kit framework is never exported, so the host reaches it through its own Koin-provided facade): `checkCanPop` / `canPopInner` / `pop` route the back into the kit stack, `started` / `progressed` / `completed` / `cancelled` seek the NavHost transition, `shouldUseFloatingArrowBack` is set by bottom tabs. `NavigationContainer` attaches itself automatically (`AttachHostBackGesture`, iOS only, detached by identity on dispose) — hosts need no wrapper and no `setNavigator`. `maxApi` is a required parameter of `NavigationContainer` — every container, nested or root, is handed its host bridge explicitly.
|
|
56
56
|
|
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ ComposeKit là bộ UI Kit đa nền tảng phục vụ Mini App/SDK của MoMo.
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
55
|
### Yêu cầu môi trường
|
|
56
|
-
- JDK 17
|
|
56
|
+
- JDK 17+ và Android SDK (compileSdk xem `libs.versions.toml`); wrapper Gradle `9.5.0`, AGP `9.2.1`.
|
|
57
57
|
- Kotlin Multiplatform plugin + Compose Multiplatform (JetBrains 1.6.1+).
|
|
58
58
|
- Xcode 15, CocoaPods 1.12+ để build `iosApp` hoặc publish Pod.
|
|
59
59
|
- Truy cập mạng nội bộ GitLab Packages nếu cần publish/consume Maven repo `https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven`.
|
|
@@ -174,4 +174,12 @@ fun SuccessState() {
|
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
- `shared/build.gradle.kts` đã bật `coreLibraryDesugaringEnabled` để tương thích `compottie-dot`/`compottie-network` với `minSdk = 24`.
|
|
177
|
-
- Nếu animation dùng asset/font nội bộ, kết hợp `compottie-resources` (`rememberResourcesAssetsManager`, `rememberResourcesFontManager`) để trỏ về `composeResources`.
|
|
177
|
+
- Nếu animation dùng asset/font nội bộ, kết hợp `compottie-resources` (`rememberResourcesAssetsManager`, `rememberResourcesFontManager`) để trỏ về `composeResources`.
|
|
178
|
+
### NativeMaxApi 0.3.1
|
|
179
|
+
|
|
180
|
+
Compose dùng typed `vn.momo.maxapi.IMaxApi` do host truyền vào `NavigationContainer`.
|
|
181
|
+
Toolkit dùng overload `showToolkit(ToolkitOptions, callback)` để giữ nhóm tool tùy chỉnh,
|
|
182
|
+
nhãn đa ngôn ngữ, icon, badge và `useSystemTools`. Callback trả `actionKey`; request đang chờ
|
|
183
|
+
được hủy khi composition bị gỡ. Kits không đóng client do host sở hữu.
|
|
184
|
+
|
|
185
|
+
Chạy `./gradlew :compose:testAndroidHostTest` để kiểm tra hủy request và callback đến muộn.
|
package/build.gradle.kts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
// AI-GENERATED START: use the AGP 9 Kotlin Multiplatform Android library target
|
|
6
|
+
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
|
|
7
|
+
// AI-GENERATED END: use the AGP 9 Kotlin Multiplatform Android library target
|
|
8
|
+
alias(libs.plugins.compose) apply false
|
|
9
|
+
alias(libs.plugins.kotlin.compose.compiler) apply false
|
|
10
|
+
alias(libs.plugins.jetbrains.kotlin.multiplatform) apply false
|
|
11
|
+
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
|
|
12
|
+
alias(libs.plugins.vanniktech.mavenPublish) apply false
|
|
13
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
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
|
+
// AI-GENERATED START: use the AGP 9 Kotlin Multiplatform Android library target
|
|
8
|
+
alias(libs.plugins.android.kotlin.multiplatform.library)
|
|
9
|
+
// AI-GENERATED END: use the AGP 9 Kotlin Multiplatform Android library target
|
|
10
|
+
alias(libs.plugins.compose)
|
|
11
|
+
alias(libs.plugins.kotlin.compose.compiler)
|
|
12
|
+
// alias(libs.plugins.vanniktech.mavenPublish)
|
|
13
|
+
id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
|
|
14
|
+
kotlin("plugin.serialization")
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
val gitlabName: String = findProperty("name") as String? ?: ""
|
|
18
|
+
val gitlabRepo: String = findProperty("repo") as String? ?: ""
|
|
19
|
+
val gitlabUrl: String = findProperty("url") as String? ?: ""
|
|
20
|
+
val gitlabGroup: String = findProperty("group") as String? ?: ""
|
|
21
|
+
val gitlabArtifactId: String = findProperty("artifact.id") as String? ?: ""
|
|
22
|
+
val gitlabVersion: String = findProperty("version") as String? ?: ""
|
|
23
|
+
val gitlabUser: String = findProperty("gitlab.user") as String? ?: ""
|
|
24
|
+
val gitlabKey: String = findProperty("gitlab.password") as String? ?: ""
|
|
25
|
+
|
|
26
|
+
kotlin {
|
|
27
|
+
// AI-GENERATED START: configure the AGP 9 Android target and host tests
|
|
28
|
+
android {
|
|
29
|
+
namespace = "vn.momo.kits.kits"
|
|
30
|
+
compileSdk = 35
|
|
31
|
+
minSdk = 24
|
|
32
|
+
androidResources.enable = true
|
|
33
|
+
withHostTest {}
|
|
34
|
+
compilerOptions {
|
|
35
|
+
jvmTarget.set(JvmTarget.JVM_17)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// AI-GENERATED END: configure the AGP 9 Android target and host tests
|
|
39
|
+
|
|
40
|
+
val fwName = gitlabArtifactId
|
|
41
|
+
val iosTargets = listOf(iosArm64(), iosSimulatorArm64())
|
|
42
|
+
iosTargets.forEach {
|
|
43
|
+
it.binaries.framework {
|
|
44
|
+
baseName = fwName
|
|
45
|
+
binaryOption("bundleId", "$gitlabGroup.$fwName")
|
|
46
|
+
isStatic = true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
cocoapods {
|
|
51
|
+
version = "0.168.1-beta.3-debug"
|
|
52
|
+
summary = "IOS Shared module"
|
|
53
|
+
homepage = "https://momo.vn"
|
|
54
|
+
ios.deploymentTarget = "15.0"
|
|
55
|
+
|
|
56
|
+
framework {
|
|
57
|
+
baseName = fwName
|
|
58
|
+
isStatic = true
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
pod("lottie-ios") {
|
|
62
|
+
moduleName = "Lottie"
|
|
63
|
+
version = "4.4.3"
|
|
64
|
+
extraOpts += listOf("-compiler-option", "-fmodules")
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
sourceSets {
|
|
69
|
+
all {
|
|
70
|
+
languageSettings.optIn("vn.momo.kits.modifier.InternalApi")
|
|
71
|
+
}
|
|
72
|
+
commonMain.dependencies {
|
|
73
|
+
implementation(compose.runtime)
|
|
74
|
+
implementation(compose.material)
|
|
75
|
+
implementation(compose.material3)
|
|
76
|
+
implementation(compose.components.resources)
|
|
77
|
+
implementation(libs.compose.ui.backhandler)
|
|
78
|
+
implementation(libs.ktor.client.core)
|
|
79
|
+
implementation(libs.jetbrains.coroutines.core)
|
|
80
|
+
implementation(libs.navigation.multiplatform)
|
|
81
|
+
implementation(libs.coil.multiplatform.compose)
|
|
82
|
+
implementation(libs.coil.multiplatform.core)
|
|
83
|
+
implementation(libs.coil.multiplatform.network.ktor)
|
|
84
|
+
implementation(libs.jetbrains.serialization.json)
|
|
85
|
+
implementation(libs.kotlinx.datetime)
|
|
86
|
+
api(libs.native.max.api)
|
|
87
|
+
implementation(libs.compottie)
|
|
88
|
+
implementation(libs.gif.image)
|
|
89
|
+
}
|
|
90
|
+
androidMain.dependencies {
|
|
91
|
+
implementation(libs.ktor.client.okhttp)
|
|
92
|
+
implementation(libs.airbnb.lottie)
|
|
93
|
+
}
|
|
94
|
+
iosMain.dependencies {
|
|
95
|
+
implementation(libs.ktor.client.darwin)
|
|
96
|
+
}
|
|
97
|
+
// AI-GENERATED START: verify toolkit request ownership
|
|
98
|
+
commonTest.dependencies {
|
|
99
|
+
implementation(kotlin("test"))
|
|
100
|
+
}
|
|
101
|
+
// AI-GENERATED END: verify toolkit request ownership
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
repositories {
|
|
106
|
+
google {
|
|
107
|
+
mavenContent {
|
|
108
|
+
includeGroupAndSubgroups("androidx")
|
|
109
|
+
includeGroupAndSubgroups("com.android")
|
|
110
|
+
includeGroupAndSubgroups("com.google")
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
mavenCentral()
|
|
114
|
+
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
|
115
|
+
maven {
|
|
116
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
117
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
118
|
+
}
|
|
119
|
+
maven {
|
|
120
|
+
url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
|
|
121
|
+
credentials {
|
|
122
|
+
username = "viewer"
|
|
123
|
+
password = "viewer"
|
|
124
|
+
}
|
|
125
|
+
isAllowInsecureProtocol = true
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
compose {
|
|
130
|
+
resources {
|
|
131
|
+
publicResClass = true
|
|
132
|
+
packageOfResClass = "vn.momo.uikits.resources"
|
|
133
|
+
generateResClass = always
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// publishing {
|
|
138
|
+
// repositories {
|
|
139
|
+
// maven {
|
|
140
|
+
// name = "${gitlabRepo}Packages"
|
|
141
|
+
// credentials {
|
|
142
|
+
// username = gitlabUser
|
|
143
|
+
// password = gitlabKey
|
|
144
|
+
// }
|
|
145
|
+
// url = uri("$gitlabUrl")
|
|
146
|
+
// }
|
|
147
|
+
// }
|
|
148
|
+
// }
|
|
149
|
+
|
|
150
|
+
// mavenPublishing {
|
|
151
|
+
// configure(
|
|
152
|
+
// KotlinMultiplatform(
|
|
153
|
+
// javadocJar = JavadocJar.Empty(),
|
|
154
|
+
// // AI-GENERATED START: the AGP KMP target publishes a single Android variant
|
|
155
|
+
// sourcesJar = true,
|
|
156
|
+
// // AI-GENERATED END: the AGP KMP target publishes a single Android variant
|
|
157
|
+
// )
|
|
158
|
+
// )
|
|
159
|
+
//
|
|
160
|
+
// repositories {
|
|
161
|
+
// maven {
|
|
162
|
+
// name = "${gitlabRepo}Packages"
|
|
163
|
+
// credentials { username = gitlabUser; password = gitlabKey }
|
|
164
|
+
// url = uri("$gitlabUrl")
|
|
165
|
+
// }
|
|
166
|
+
// }
|
|
167
|
+
//
|
|
168
|
+
// coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
|
|
169
|
+
//
|
|
170
|
+
// pom {
|
|
171
|
+
// name = "$gitlabName Klib"
|
|
172
|
+
// description = "$gitlabName"
|
|
173
|
+
// url = "https://gitlab.mservice.com.vn"
|
|
174
|
+
// licenses {
|
|
175
|
+
// license {
|
|
176
|
+
// name = "The Apache License, Version 2.0"
|
|
177
|
+
// url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
178
|
+
// distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
179
|
+
// }
|
|
180
|
+
// }
|
|
181
|
+
// developers {
|
|
182
|
+
// developer {
|
|
183
|
+
// id = "kotlin-hands-on"
|
|
184
|
+
// name = "Kotlin Developer Advocate"
|
|
185
|
+
// url = "https://github.com/kotlin-hands-on/"
|
|
186
|
+
// }
|
|
187
|
+
// }
|
|
188
|
+
// }
|
|
189
|
+
// }
|
|
190
|
+
|
|
191
|
+
// Xcode 27 rejects iOS < 15; KGP's synthetic Podfile only raises pods to 12 (KT-57741), leaving lottie-ios at 13.
|
|
192
|
+
tasks.named("podGenIos") {
|
|
193
|
+
doLast {
|
|
194
|
+
val podfile = layout.buildDirectory.file("cocoapods/synthetic/ios/Podfile").get().asFile
|
|
195
|
+
podfile.writeText(podfile.readText().replace("major < 12 ||", "major < 15 ||").replace("#{12}", "#{15}"))
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
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
|
+
// AI-GENERATED START: use the AGP 9 Kotlin Multiplatform Android library target
|
|
8
|
+
alias(libs.plugins.android.kotlin.multiplatform.library)
|
|
9
|
+
// AI-GENERATED END: use the AGP 9 Kotlin Multiplatform Android library target
|
|
10
|
+
alias(libs.plugins.compose)
|
|
11
|
+
alias(libs.plugins.kotlin.compose.compiler)
|
|
12
|
+
alias(libs.plugins.vanniktech.mavenPublish)
|
|
13
|
+
id(libs.plugins.jetbrains.kotlin.cocoapods.get().pluginId)
|
|
14
|
+
kotlin("plugin.serialization")
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
val gitlabName: String = findProperty("name") as String? ?: ""
|
|
18
|
+
val gitlabRepo: String = findProperty("repo") as String? ?: ""
|
|
19
|
+
val gitlabUrl: String = findProperty("url") as String? ?: ""
|
|
20
|
+
val gitlabGroup: String = findProperty("group") as String? ?: ""
|
|
21
|
+
val gitlabArtifactId: String = findProperty("artifact.id") as String? ?: ""
|
|
22
|
+
val gitlabVersion: String = findProperty("version") as String? ?: ""
|
|
23
|
+
val gitlabUser: String = findProperty("gitlab.user") as String? ?: ""
|
|
24
|
+
val gitlabKey: String = findProperty("gitlab.password") as String? ?: ""
|
|
25
|
+
|
|
26
|
+
kotlin {
|
|
27
|
+
// AI-GENERATED START: configure the AGP 9 Android target and host tests
|
|
28
|
+
android {
|
|
29
|
+
namespace = "$gitlabGroup.$gitlabArtifactId"
|
|
30
|
+
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
31
|
+
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
32
|
+
androidResources.enable = true
|
|
33
|
+
withHostTest {}
|
|
34
|
+
compilerOptions {
|
|
35
|
+
jvmTarget.set(JvmTarget.JVM_17)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// AI-GENERATED END: configure the AGP 9 Android target and host tests
|
|
39
|
+
|
|
40
|
+
val fwName = gitlabArtifactId
|
|
41
|
+
val iosTargets = listOf(iosArm64(), iosSimulatorArm64())
|
|
42
|
+
iosTargets.forEach {
|
|
43
|
+
it.binaries.framework {
|
|
44
|
+
baseName = fwName
|
|
45
|
+
binaryOption("bundleId", "$gitlabGroup.$fwName")
|
|
46
|
+
isStatic = true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
cocoapods {
|
|
51
|
+
version = gitlabVersion
|
|
52
|
+
summary = "IOS Shared module"
|
|
53
|
+
homepage = "https://momo.vn"
|
|
54
|
+
ios.deploymentTarget = "15.0"
|
|
55
|
+
|
|
56
|
+
framework {
|
|
57
|
+
baseName = fwName
|
|
58
|
+
isStatic = true
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
pod("lottie-ios") {
|
|
62
|
+
moduleName = "Lottie"
|
|
63
|
+
version = "4.4.3"
|
|
64
|
+
extraOpts += listOf("-compiler-option", "-fmodules")
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
sourceSets {
|
|
69
|
+
all {
|
|
70
|
+
languageSettings.optIn("vn.momo.kits.modifier.InternalApi")
|
|
71
|
+
}
|
|
72
|
+
commonMain.dependencies {
|
|
73
|
+
implementation(compose.runtime)
|
|
74
|
+
implementation(compose.material)
|
|
75
|
+
implementation(compose.material3)
|
|
76
|
+
implementation(compose.components.resources)
|
|
77
|
+
implementation(libs.compose.ui.backhandler)
|
|
78
|
+
implementation(libs.ktor.client.core)
|
|
79
|
+
implementation(libs.jetbrains.coroutines.core)
|
|
80
|
+
implementation(libs.navigation.multiplatform)
|
|
81
|
+
implementation(libs.coil.multiplatform.compose)
|
|
82
|
+
implementation(libs.coil.multiplatform.core)
|
|
83
|
+
implementation(libs.coil.multiplatform.network.ktor)
|
|
84
|
+
implementation(libs.jetbrains.serialization.json)
|
|
85
|
+
implementation(libs.kotlinx.datetime)
|
|
86
|
+
api(libs.native.max.api)
|
|
87
|
+
implementation(libs.compottie)
|
|
88
|
+
implementation(libs.gif.image)
|
|
89
|
+
}
|
|
90
|
+
androidMain.dependencies {
|
|
91
|
+
implementation(libs.ktor.client.okhttp)
|
|
92
|
+
implementation(libs.airbnb.lottie)
|
|
93
|
+
}
|
|
94
|
+
iosMain.dependencies {
|
|
95
|
+
implementation(libs.ktor.client.darwin)
|
|
96
|
+
}
|
|
97
|
+
// AI-GENERATED START: verify toolkit request ownership
|
|
98
|
+
commonTest.dependencies {
|
|
99
|
+
implementation(kotlin("test"))
|
|
100
|
+
}
|
|
101
|
+
// AI-GENERATED END: verify toolkit request ownership
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
repositories {
|
|
106
|
+
google {
|
|
107
|
+
mavenContent {
|
|
108
|
+
includeGroupAndSubgroups("androidx")
|
|
109
|
+
includeGroupAndSubgroups("com.android")
|
|
110
|
+
includeGroupAndSubgroups("com.google")
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
mavenCentral()
|
|
114
|
+
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
|
115
|
+
maven {
|
|
116
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
117
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
118
|
+
}
|
|
119
|
+
maven {
|
|
120
|
+
url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
|
|
121
|
+
credentials {
|
|
122
|
+
username = "viewer"
|
|
123
|
+
password = "viewer"
|
|
124
|
+
}
|
|
125
|
+
isAllowInsecureProtocol = true
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
compose {
|
|
130
|
+
resources {
|
|
131
|
+
publicResClass = true
|
|
132
|
+
packageOfResClass = "vn.momo.uikits.resources"
|
|
133
|
+
generateResClass = always
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
publishing {
|
|
138
|
+
repositories {
|
|
139
|
+
maven {
|
|
140
|
+
name = "${gitlabRepo}Packages"
|
|
141
|
+
credentials {
|
|
142
|
+
username = gitlabUser
|
|
143
|
+
password = gitlabKey
|
|
144
|
+
}
|
|
145
|
+
url = uri("$gitlabUrl")
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
mavenPublishing {
|
|
151
|
+
configure(
|
|
152
|
+
KotlinMultiplatform(
|
|
153
|
+
javadocJar = JavadocJar.Empty(),
|
|
154
|
+
// AI-GENERATED START: the AGP KMP target publishes a single Android variant
|
|
155
|
+
sourcesJar = true,
|
|
156
|
+
// AI-GENERATED END: the AGP KMP target publishes a single Android variant
|
|
157
|
+
)
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
repositories {
|
|
161
|
+
maven {
|
|
162
|
+
name = "${gitlabRepo}Packages"
|
|
163
|
+
credentials { username = gitlabUser; password = gitlabKey }
|
|
164
|
+
url = uri("$gitlabUrl")
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
coordinates(gitlabGroup.toString(), gitlabArtifactId, gitlabVersion.toString())
|
|
169
|
+
|
|
170
|
+
pom {
|
|
171
|
+
name = "$gitlabName Klib"
|
|
172
|
+
description = "$gitlabName"
|
|
173
|
+
url = "https://gitlab.mservice.com.vn"
|
|
174
|
+
licenses {
|
|
175
|
+
license {
|
|
176
|
+
name = "The Apache License, Version 2.0"
|
|
177
|
+
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
178
|
+
distribution = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
developers {
|
|
182
|
+
developer {
|
|
183
|
+
id = "kotlin-hands-on"
|
|
184
|
+
name = "Kotlin Developer Advocate"
|
|
185
|
+
url = "https://github.com/kotlin-hands-on/"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Xcode 27 rejects iOS < 15; KGP's synthetic Podfile only raises pods to 12 (KT-57741), leaving lottie-ios at 13.
|
|
192
|
+
tasks.named("podGenIos") {
|
|
193
|
+
doLast {
|
|
194
|
+
val podfile = layout.buildDirectory.file("cocoapods/synthetic/ios/Podfile").get().asFile
|
|
195
|
+
podfile.writeText(podfile.readText().replace("major < 12 ||", "major < 15 ||").replace("#{12}", "#{15}"))
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Pod::Spec.new do |spec|
|
|
2
|
+
spec.name = 'compose'
|
|
3
|
+
spec.version = '0.167.1-duo.15-debug'
|
|
4
|
+
spec.homepage = 'https://momo.vn'
|
|
5
|
+
spec.source = { :http=> ''}
|
|
6
|
+
spec.authors = ''
|
|
7
|
+
spec.license = ''
|
|
8
|
+
spec.summary = 'IOS Shared module'
|
|
9
|
+
spec.vendored_frameworks = 'build/cocoapods/framework/kits.framework'
|
|
10
|
+
spec.libraries = 'c++'
|
|
11
|
+
spec.ios.deployment_target = '15.0'
|
|
12
|
+
spec.dependency 'lottie-ios', '4.4.3'
|
|
13
|
+
if !Dir.exist?('build/cocoapods/framework/kits.framework') || Dir.empty?('build/cocoapods/framework/kits.framework')
|
|
14
|
+
raise "
|
|
15
|
+
Kotlin framework 'kits' doesn't exist yet, so a proper Xcode project can't be generated.
|
|
16
|
+
'pod install' should be executed after running ':generateDummyFramework' Gradle task:
|
|
17
|
+
./gradlew :compose:generateDummyFramework
|
|
18
|
+
Alternatively, proper pod installation is performed during Gradle sync in the IDE (if Podfile location is set)"
|
|
19
|
+
end
|
|
20
|
+
spec.xcconfig = {
|
|
21
|
+
'ENABLE_USER_SCRIPT_SANDBOXING' => 'NO',
|
|
22
|
+
}
|
|
23
|
+
spec.pod_target_xcconfig = {
|
|
24
|
+
'KOTLIN_PROJECT_PATH' => ':compose',
|
|
25
|
+
'PRODUCT_MODULE_NAME' => 'kits',
|
|
26
|
+
}
|
|
27
|
+
spec.script_phases = [
|
|
28
|
+
{
|
|
29
|
+
:name => 'Build compose',
|
|
30
|
+
:execution_position => :before_compile,
|
|
31
|
+
:shell_path => '/bin/sh',
|
|
32
|
+
:script => <<-SCRIPT
|
|
33
|
+
if [ "YES" = "$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED" ]; then
|
|
34
|
+
echo "Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \"YES\""
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
set -ev
|
|
38
|
+
REPO_ROOT="$PODS_TARGET_SRCROOT"
|
|
39
|
+
"$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \
|
|
40
|
+
-Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \
|
|
41
|
+
-Pkotlin.native.cocoapods.archs="$ARCHS" \
|
|
42
|
+
-Pkotlin.native.cocoapods.configuration="$CONFIGURATION"
|
|
43
|
+
SCRIPT
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
spec.resources = ['build/compose/cocoapods/compose-resources']
|
|
47
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
package vn.momo.kits.const
|
|
2
|
+
|
|
3
|
+
import androidx.compose.runtime.Composable
|
|
4
|
+
import androidx.compose.runtime.remember
|
|
5
|
+
import androidx.compose.ui.platform.LocalContext
|
|
6
|
+
import androidx.compose.ui.text.font.Font
|
|
7
|
+
import androidx.compose.ui.text.font.FontFamily
|
|
8
|
+
|
|
9
|
+
@Composable
|
|
10
|
+
internal actual fun hostFontFamily(fileName: String): FontFamily? {
|
|
11
|
+
val assets = LocalContext.current.applicationContext.assets
|
|
12
|
+
return remember(fileName) {
|
|
13
|
+
val path = "fonts/$fileName"
|
|
14
|
+
// AssetManager.open ném IOException nếu thiếu file; Font(path, assetManager) thì lỗi
|
|
15
|
+
// muộn lúc render nên phải kiểm tra tồn tại trước.
|
|
16
|
+
val exists = runCatching { assets.open(path).close() }.isSuccess
|
|
17
|
+
if (exists) FontFamily(Font(path = path, assetManager = assets)) else null
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
package vn.momo.kits.platform
|
|
2
|
+
|
|
3
|
+
import androidx.compose.runtime.Composable
|
|
4
|
+
import androidx.compose.runtime.State
|
|
5
|
+
import androidx.compose.runtime.mutableStateOf
|
|
6
|
+
import androidx.compose.runtime.remember
|
|
7
|
+
|
|
8
|
+
// No passive observer at androidx.activity 1.10.x; a second callback would steal the gesture.
|
|
9
|
+
@Composable
|
|
10
|
+
actual fun rememberBackGestureProgress(): State<Float?> = remember { mutableStateOf(null) }
|
|
11
|
+
|
|
12
|
+
actual fun reportFloatingArrowBack(shouldUse: Boolean) = Unit
|