@momo-kits/native-kits 0.160.3-debug → 0.160.4-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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.160.3-debug"
43
+ version = "0.160.4-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |spec|
2
2
  spec.name = 'compose'
3
- spec.version = '0.159.1-beta.7'
3
+ spec.version = '0.159.1-beta.12'
4
4
  spec.homepage = 'https://momo.vn'
5
5
  spec.source = { :http=> ''}
6
6
  spec.authors = ''
@@ -77,6 +77,7 @@ actual fun LottieAnimation(
77
77
  path: String,
78
78
  tintColor: Color?,
79
79
  bgColor: Color?,
80
+ placedAsOverlay: Boolean,
80
81
  modifier: Modifier
81
82
  ) {
82
83
  val json = readJson(path)
@@ -49,6 +49,7 @@ expect fun LottieAnimation(
49
49
  path: String,
50
50
  tintColor: Color? = null,
51
51
  bgColor: Color? = null,
52
+ placedAsOverlay: Boolean = false,
52
53
  modifier: Modifier = Modifier
53
54
  )
54
55
 
@@ -12,17 +12,19 @@ import androidx.compose.runtime.getValue
12
12
  import androidx.compose.runtime.mutableStateOf
13
13
  import androidx.compose.runtime.remember
14
14
  import androidx.compose.runtime.setValue
15
+ import androidx.compose.ui.ExperimentalComposeUiApi
15
16
  import androidx.compose.ui.InternalComposeUiApi
16
17
  import androidx.compose.ui.Modifier
17
18
  import androidx.compose.ui.backhandler.LocalCompatNavigationEventDispatcherOwner
18
19
  import androidx.compose.ui.graphics.Color
19
20
  import androidx.compose.ui.graphics.NativePaint
20
21
  import androidx.compose.ui.graphics.toArgb
21
- import androidx.compose.ui.interop.UIKitView
22
22
  import androidx.compose.ui.semantics.SemanticsPropertyKey
23
23
  import androidx.compose.ui.semantics.semantics
24
24
  import androidx.compose.ui.unit.Dp
25
25
  import androidx.compose.ui.unit.dp
26
+ import androidx.compose.ui.viewinterop.UIKitInteropProperties
27
+ import androidx.compose.ui.viewinterop.UIKitView
26
28
  import cocoapods.lottie_ios.CompatibleAnimation
27
29
  import cocoapods.lottie_ios.CompatibleAnimationKeypath
28
30
  import cocoapods.lottie_ios.CompatibleAnimationView
@@ -89,12 +91,13 @@ actual fun getOSVersion(): OSVersion = OSVersion.IOS(
89
91
  major = UIDevice.currentDevice.systemVersion.substringBefore(".").toIntOrNull() ?: 0
90
92
  )
91
93
 
92
- @OptIn(ExperimentalForeignApi::class)
94
+ @OptIn(ExperimentalForeignApi::class, ExperimentalComposeUiApi::class)
93
95
  @Composable
94
96
  actual fun LottieAnimation(
95
97
  path: String,
96
98
  tintColor: Color?,
97
99
  bgColor: Color?,
100
+ placedAsOverlay: Boolean,
98
101
  modifier: Modifier
99
102
  ) {
100
103
  var animation by remember { mutableStateOf<CompatibleAnimation?>(null) }
@@ -112,11 +115,12 @@ actual fun LottieAnimation(
112
115
  Box(modifier) {
113
116
  UIKitView(
114
117
  modifier = Modifier.fillMaxSize(),
118
+ properties = UIKitInteropProperties(placedAsOverlay = placedAsOverlay),
115
119
  factory = {
116
120
  CompatibleAnimationView(value).apply {
117
121
  translatesAutoresizingMaskIntoConstraints = true
118
122
 
119
- setBackgroundColor(bgColor?.toUIColor() ?: UIColor.whiteColor)
123
+ setBackgroundColor(bgColor?.toUIColor() ?: UIColor.clearColor)
120
124
 
121
125
  setLoopAnimationCount(-1.0)
122
126
  setAnimationSpeed(1.0)
@@ -137,7 +141,7 @@ actual fun LottieAnimation(
137
141
  },
138
142
 
139
143
  update = { view ->
140
- view.setBackgroundColor(bgColor?.toUIColor() ?: UIColor.whiteColor)
144
+ view.setBackgroundColor(bgColor?.toUIColor() ?: UIColor.clearColor)
141
145
 
142
146
  if (tintColor != null) {
143
147
  val uiColor = tintColor.toUIColor()
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.160.3
21
+ version=0.160.4
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.160.3-debug",
3
+ "version": "0.160.4-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},