@momo-kits/native-kits 0.168.1-beta.37-debug → 0.168.1-beta.38-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 (47) hide show
  1. package/CLAUDE.md +2 -3
  2. package/compose/build.gradle.kts +1 -1
  3. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +3 -2
  4. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +81 -72
  5. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +13 -8
  6. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +163 -54
  7. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +12 -17
  8. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +4 -7
  9. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +18 -11
  10. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +34 -27
  11. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +319 -167
  12. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +79 -71
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +93 -326
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/TabBarMetrics.kt +104 -0
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +3 -2
  16. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +3 -1
  17. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +0 -2
  18. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +3 -2
  19. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +3 -9
  20. package/ios/Input/Input.swift +1 -3
  21. package/ios/Input/InputTextArea.swift +1 -3
  22. package/ios/Layout/ScreenLayout.swift +24 -28
  23. package/ios/Navigation/BottomSheet.swift +157 -29
  24. package/ios/Navigation/BottomTab/BottomTab.swift +48 -67
  25. package/ios/Navigation/BottomTab/BottomTabBar.swift +280 -132
  26. package/ios/Navigation/BottomTab/CurvedContainer.swift +51 -47
  27. package/ios/Navigation/BottomTab/DuoTabBar.swift +72 -292
  28. package/ios/Navigation/BottomTab/TabBarMetrics.swift +84 -0
  29. package/ios/Navigation/Component/HeaderRight.swift +1 -1
  30. package/ios/Navigation/ModalScreen.swift +7 -18
  31. package/ios/Navigation/StackScreen.swift +3 -1
  32. package/ios/Popup/PopupDisplay.swift +2 -4
  33. package/ios/Popup/PopupInput.swift +2 -4
  34. package/ios/Popup/PopupLayout.swift +9 -10
  35. package/ios/Popup/PopupNotify.swift +23 -26
  36. package/ios-demo/Resources/tabbar_scan_qr_button.json +1 -0
  37. package/ios-demo/Resources/tabbar_scan_qr_label.json +1 -0
  38. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +272 -59
  39. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +0 -103
  40. package/package.json +1 -1
  41. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReduceMotion.android.kt +0 -17
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +0 -187
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoLiquidSelection.kt +0 -380
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReduceMotion.kt +0 -7
  45. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReduceMotion.ios.kt +0 -48
  46. package/ios/Layout/ModalLayout.swift +0 -152
  47. package/ios/Navigation/BottomTab/DuoLiquidSelection.swift +0 -364
package/CLAUDE.md CHANGED
@@ -77,12 +77,11 @@ Publishing is automated (`publish.sh` + GitLab CI on `[ci build]` / `main`). Do
77
77
  - iPhone Duo with a side strip ≥ 60pt: back + toolkit leave the bar for `HeaderSideBar` (`navigation/component/SideBar.kt`, 48pt glass controls); custom header-right stays in the bar. `sideBar.top` is 170pt in portrait, 120pt on the inner display in landscape (height ≥ 600), 24pt on the outer display in landscape, or below the header when the status bar is on top; UIKit's `statusBarFrame` is useless on Duo. Unlike RN the column is clamped above footer (24pt gap) / rail (12pt gap).
78
78
  - Reserved regions (iOS 27.1 `reservedRegionsOfKind:`, reached through the ObjC runtime so older SDKs still build): a probe `UIView` (`platform/ReservedRegions.ios.kt` on the Compose root view; `ReservedRegionsProbe` inside SwiftUI `momoScreenLayout()`) re-reads them in `layoutSubviews`, which UIKit re-runs when they change. They push `sideBar.top` below the status cluster as it grows for calls / Live Activities, and `sideBar.bottom` (≥ 24pt) above a camera at the bottom end of the strip.
79
79
  - Tab bar on Duo is `bottomtab/DuoTabBar.kt`: a rail in the side strip (`sideBar.bottom` above the window bottom, QR below it) or, without a side bar, a floating bar spanning 6/8 grid columns. Both overlay the content; `duoFloatingTabBarInset` pads tab content, footer and FAB.
80
- - Duo tab selection motion (`bottomtab/DuoLiquidSelection.kt` / `ios/Navigation/BottomTab/DuoLiquidSelection.swift`, port of RN `useLiquidSelection.ts`, momo-kits !682): press lifts the lens, a drag past 10pt takes over (Compose: the bar's `pointerInput` consumes and so cancels the tab's clickable; SwiftUI: one `DragGesture` over the bar, tabs are not `Button`s), long press calls `BottomTab(onTabLongPress)` and release still selects, Reduce Motion (`platform/ReduceMotion`) falls back to a plain slide. SwiftUI integrates the lens spring on a display link because the stretch and the tabs' active tint read it every frame. Constants mirror RN — change both together.
81
80
  - Bar compression (`bottomtab/DuoBarCompression.kt`, HIG "Vertical controls"): when toolbar + rail don't fit in the strip, one is compressed — the toolkit into a `navigation_menu` button, the rail into one button showing the current tab — and tapping it swaps them; `BottomTab(compressionBehavior)` picks which starts compressed. If neither fits beside the other compressed, both rest compressed and a tap opens one for a moment. Side bar columns report their full height (0 when the screen puts nothing there) so the decision follows each screen's toolkit.
82
81
  - Glass header: on Duo with a side bar, Default/Extended headers without search and with a `ScrollState` let content scroll under the bar (`usesDuoGlassHeader`); the bar fades in a translucent surface + hairline over 16pt (Compose has no backdrop blur — RN's fallback look), the gradient leaves with the content.
83
82
  - Quick return header: glass headers and Animated headers (with a `ScrollState`) on the Duo side bar layout slide out with the content and back in on a reverse scroll; a half-shown header settles in or out once the scroll stops. The side bar is drawn apart from the header, so it stays put.
84
- - Overlays on foldables (`layout/ModalLayout.kt` / `ios/Layout/ModalLayout.swift`, Figma "Modal - Foldable Guideline", constants shared with RN): foldable = `isIPhoneDuoDevice` or a window short side ≥ 600, so phones (landscape too) keep their look. The resolver returns the placement (safe area, so left of the Duo control column; right of an active vertical division when a Duo is half folded — Swift also needs `UIHingeInteraction` `.partiallyOpen`; Android half fold stays flat), popup geometry (width clamp(placement − 2·margin, 280, 450), margin 24 or 12 on the Duo outer display / half fold, max height min(600, placement − 48), radius 24; only the PopupNotify description scrolls) and sheet geometry (width min(placement − 24, 653) ≥ 296, bottom anchored, max height window − top inset − 12, min height 230, radius 24 top). Scrim is black 20% over the whole window on foldables (0.6 on phones). Snackbars keep clear of the strip. On every device (RN parity) popup close and sheet header back / close are `ModalIconButton`: 32pt circle on `background.surface` with a 1pt `border.default` stroke, 20pt `text.default` icon; the popup close sits inside the card 12pt from the top right (`PopupPromotion` keeps its close under the image), the default sheet header is 56 tall, 12 padding, 8 gap.
85
- - Bottom sheet on Duo: stays in the placement, never on or under the side strip; back / close stay in the header row (no side column). `BottomHeader.Title(onBack)` / `.title(onBack:)` closes the sheet, then runs (RN `leftOptions.onPressIconLeft`).
83
+ - Overlays on Duo: the modal sits inside the safe area (all four insets, so clear of the side toolbar strip) and caps its content at `duoModalMaxWidth` / `duoModalMaxHeight` (440 × 640pt, at least XL off the safe area); popups fill that width with radius XL and drop their own side padding (body scrolls, actions stay). Snackbars keep clear of the strip.
84
+ - Bottom sheet on Duo: radius XL, window height less `duoTopInset` (it never passes the side status bar: unlike RN, nothing restyles the clock over it), centered when the short side ≥ 600 (inner display in either orientation, buttons stay in the header row; RN parity). Below that (outer display, landscape too) it floats `Spacing.M` off the side edges, pads header/content/footer by `inset − M` (the drag indicator still centers on the whole sheet), and a `Title` header moves back / close into 48pt side bar buttons on the strip part of the sheet (HIG: sheet controls go vertical on the outer display) when the strip fits one; they follow the header row while the sheet is short and stay below `sideBar.top` when it is tall. `BottomHeader.Title(onBack)` / `.title(onBack:)` closes the sheet, then runs (RN `leftOptions.onPressIconLeft`).
86
85
  - Font scale deliberately uses the short side (`min(w, h)`), unlike RN which reads the window width — landscape must not inflate every font.
87
86
  - Font scale measures the **window**, never `UIScreen.main`: on iPhone Duo the main screen stays on one display while the window follows the one in use. Compose iOS `getScreenDimensions()` reads `LocalWindowInfo.containerSize` (recomposes on fold/unfold); SwiftUI `DesignSystemKits` KVO-observes each `UIWindowScene.effectiveGeometry` and republishes `windowShortSide`.
88
87
  - `StackScreen` pads content/footer/search/FAB by the side insets and provides an inset-consumed layout to its content; a bottom-tab root stays full width (tab bar + each tab's StackScreen handle insets). Grid columns use `contentWidth`.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.168.1-beta.37-debug"
43
+ version = "0.168.1-beta.38-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
@@ -88,10 +88,11 @@ actual fun LottieAnimation(
88
88
  isPlaying: Boolean,
89
89
  onEvent: ((String) -> Unit)?,
90
90
  modifier: Modifier,
91
- useCompose: Boolean
91
+ useCompose: Boolean,
92
+ progress: (() -> Float)?,
92
93
  ) {
93
94
  if (useCompose) {
94
- ComposeLottieAnimation(path, tintColor, bgColor, iterations, isPlaying, onEvent, modifier)
95
+ ComposeLottieAnimation(path, tintColor, bgColor, iterations, isPlaying, onEvent, modifier, progress)
95
96
  return
96
97
  }
97
98
 
@@ -2,6 +2,8 @@ package vn.momo.kits.components
2
2
 
3
3
  import androidx.compose.foundation.background
4
4
  import androidx.compose.foundation.border
5
+ import androidx.compose.foundation.clickable
6
+ import androidx.compose.foundation.interaction.MutableInteractionSource
5
7
  import androidx.compose.foundation.rememberScrollState
6
8
  import androidx.compose.foundation.verticalScroll
7
9
  import androidx.compose.foundation.layout.*
@@ -20,9 +22,9 @@ import vn.momo.kits.application.LocalLocalize
20
22
  import vn.momo.kits.const.*
21
23
  import vn.momo.kits.modifier.conditional
22
24
  import vn.momo.kits.modifier.setAutomationId
23
- import vn.momo.kits.layout.MODAL_ICON_BUTTON_SIZE
24
- import vn.momo.kits.layout.ModalIconButton
25
- import vn.momo.kits.layout.rememberModalLayout
25
+ import vn.momo.kits.layout.duoModalMaxHeight
26
+ import vn.momo.kits.layout.duoModalMaxWidth
27
+ import vn.momo.kits.layout.getScreenLayout
26
28
  import kotlin.math.min
27
29
 
28
30
  data class PopupAction(
@@ -36,24 +38,28 @@ enum class PopupActionDirection {
36
38
  AUTO
37
39
  }
38
40
 
39
- // Card width on foldables (ModalLayout, RN Popup/utils.ts); unbounded on phones, where each popup's padding sets it.
41
+ // Card width cap on iPhone Duo (the modal bounds, RN Popup/utils.ts); unbounded elsewhere.
40
42
  @Composable
41
43
  internal fun popupMaxWidth(): Dp {
42
- val modal = rememberModalLayout()
43
- return if (modal.isFoldable) modal.popup.maxWidth else Dp.Unspecified
44
+ val layout = getScreenLayout()
45
+ return if (layout.isIPhoneDuoDevice) layout.duoModalMaxWidth else Dp.Unspecified
44
46
  }
45
47
 
46
- // The placement already keeps foldable popups off the edges, so their own side padding goes.
48
+ // The modal bounds already keep iPhone Duo popups off the edges, so their own side padding goes.
47
49
  @Composable
48
50
  internal fun popupHorizontalPadding(padding: Dp): Dp =
49
- if (rememberModalLayout().isFoldable) 0.dp else padding
51
+ if (getScreenLayout().isIPhoneDuoDevice) 0.dp else padding
50
52
 
51
- // Tallest a popup gets on foldables; null on phones.
53
+ // Tallest a popup gets on iPhone Duo, landscape and the inner display included; null elsewhere.
52
54
  @Composable
53
- internal fun popupMaxHeight(): Dp? = rememberModalLayout().popup.maxHeight
55
+ internal fun popupMaxHeight(): Dp? {
56
+ val layout = getScreenLayout()
57
+ return if (layout.isIPhoneDuoDevice) layout.duoModalMaxHeight else null
58
+ }
54
59
 
60
+ // Rounder on iPhone Duo, closer to its system alerts.
55
61
  @Composable
56
- internal fun popupRadius(): Dp = rememberModalLayout().popup.radius
62
+ internal fun popupRadius(): Dp = if (getScreenLayout().isIPhoneDuoDevice) Radius.XL else Radius.L
57
63
 
58
64
  private fun heightForLines(
59
65
  layout: TextLayoutResult,
@@ -146,21 +152,19 @@ fun PopupNotify(
146
152
  callback?.invoke()
147
153
  }
148
154
 
149
- val popup = rememberModalLayout().popup
150
- val maxHeight = popup.maxHeight
151
- val descriptionScrollState = rememberScrollState()
152
- val shape = RoundedCornerShape(popup.radius)
155
+ val maxHeight = popupMaxHeight()
156
+ val bodyScrollState = rememberScrollState()
157
+ val horizontalPadding = popupHorizontalPadding(12.dp)
158
+ val shape = RoundedCornerShape(popupRadius())
153
159
 
154
160
  Box(
155
- Modifier
156
- .widthIn(min = popup.minWidth, max = popup.maxWidth)
157
- .fillMaxWidth()
158
- .setAutomationId("popup_notify"),
159
- contentAlignment = Alignment.TopEnd
161
+ Modifier.setAutomationId("popup_notify"), contentAlignment = Alignment.TopEnd
160
162
  ) {
161
163
  Column(
162
164
  modifier = Modifier
165
+ .widthIn(max = popupMaxWidth())
163
166
  .fillMaxWidth()
167
+ .padding(horizontal = horizontalPadding)
164
168
  .clip(shape)
165
169
  .background(AppTheme.current.colors.background.surface, shape)
166
170
  .conditional(IsShowBaseLineDebug) {
@@ -170,56 +174,37 @@ fun PopupNotify(
170
174
  heightIn(max = maxHeight ?: Dp.Unspecified)
171
175
  }
172
176
  ) {
173
- if(props.image.isNotEmpty()) {
174
- Image(
175
- source = props.image,
176
- modifier = Modifier.fillMaxWidth().aspectRatio(1.777f),
177
- options = Options(alignment = Alignment.Center)
178
- )
179
- }
180
-
181
- // with a max height only the description scrolls; image, title and actions stay
177
+ // scrolls when iPhone Duo landscape is too short; actions stay visible
182
178
  Column(
183
- modifier = Modifier
184
- .conditional(maxHeight != null) { weight(1f, fill = false) }
185
- .padding(Spacing.XL)
179
+ Modifier.conditional(maxHeight != null) {
180
+ weight(1f, fill = false).verticalScroll(bodyScrollState)
181
+ }
186
182
  ) {
187
- Text(
188
- style = Typography.headerDefaultBold,
189
- maxLines = 2,
190
- text = props.title,
191
- modifier = Modifier
192
- .conditional(props.isShowCloseIcon && props.image.isEmpty()) {
193
- padding(end = MODAL_ICON_BUTTON_SIZE + Spacing.M - Spacing.XL)
194
- }
195
- .setAutomationId("title_popup_permission")
196
- )
197
- if (maxHeight != null) {
198
- // still capped at ~8.5 lines, then shrinks further when the popup reaches its max height
199
- Box(
200
- Modifier
201
- .padding(top = Spacing.S)
202
- .weight(1f, fill = false)
203
- .conditional(isScroll) { heightIn(max = scrollHeight) }
204
- .verticalScroll(descriptionScrollState)
205
- ) {
206
- Text(
207
- text = props.description,
208
- onTextLayout = { layoutResult.value = it },
209
- style = Typography.bodyDefaultRegular
210
- )
211
- }
212
- } else {
213
- content(Modifier.padding(top = Spacing.S))
183
+ if(props.image.isNotEmpty()) {
184
+ Image(
185
+ source = props.image,
186
+ modifier = Modifier.fillMaxWidth().aspectRatio(1.777f),
187
+ options = Options(alignment = Alignment.Center)
188
+ )
214
189
  }
215
- if (props.error.isNotEmpty()) {
190
+
191
+ Column(modifier = Modifier.padding(Spacing.XL)) {
216
192
  Text(
217
- text = LocalLocalize.current.translate("errorCode") + props.error,
218
- style = Typography.descriptionXsRegular,
219
- color = AppTheme.current.colors.text.hint,
220
- maxLines = 1,
221
- modifier = Modifier.padding(top = Spacing.S)
193
+ style = Typography.headerDefaultBold,
194
+ maxLines = 2,
195
+ text = props.title,
196
+ modifier = Modifier.setAutomationId("title_popup_permission")
222
197
  )
198
+ content(Modifier.padding(top = Spacing.S))
199
+ if (props.error.isNotEmpty()) {
200
+ Text(
201
+ text = LocalLocalize.current.translate("errorCode") + props.error,
202
+ style = Typography.descriptionXsRegular,
203
+ color = AppTheme.current.colors.text.hint,
204
+ maxLines = 1,
205
+ modifier = Modifier.padding(top = Spacing.S)
206
+ )
207
+ }
223
208
  }
224
209
  }
225
210
 
@@ -233,13 +218,37 @@ fun PopupNotify(
233
218
  }
234
219
  }
235
220
 
236
- if (props.isShowCloseIcon) {
237
- ModalIconButton(
238
- icon = "navigation_close",
239
- automationId = "ic_popup_close",
240
- onClick = { onClose { props.onIconClose() } },
241
- modifier = Modifier.padding(top = Spacing.M, end = Spacing.M),
242
- )
221
+ if(props.isShowCloseIcon) {
222
+ Box(
223
+ Modifier
224
+ .width(22.dp)
225
+ .height(22.dp)
226
+ // centered on the card's top right corner
227
+ .offset(x = 11.dp - horizontalPadding, y = (-11).dp)
228
+ .background(
229
+ color = AppTheme.current.colors.text.default,
230
+ shape = RoundedCornerShape(Radius.M)
231
+ )
232
+ .border(
233
+ width = 2.dp,
234
+ color = AppTheme.current.colors.background.surface,
235
+ shape = RoundedCornerShape(Radius.M)
236
+ )
237
+ .clip(RoundedCornerShape(100))
238
+ .clickable(
239
+ interactionSource = remember { MutableInteractionSource() },
240
+ indication = null,
241
+ onClick = { onClose { props.onIconClose() } }
242
+ ),
243
+ contentAlignment = Alignment.Center
244
+ ) {
245
+ Icon(
246
+ source = "navigation_close",
247
+ color = AppTheme.current.colors.background.surface,
248
+ size = 16.dp,
249
+ modifier = Modifier.setAutomationId("ic_popup_close")
250
+ )
251
+ }
243
252
  }
244
253
  }
245
254
  }
@@ -10,7 +10,6 @@ import androidx.compose.ui.platform.LocalDensity
10
10
  import androidx.compose.ui.platform.LocalLayoutDirection
11
11
  import androidx.compose.ui.platform.LocalWindowInfo
12
12
  import androidx.compose.ui.unit.Dp
13
- import androidx.compose.ui.unit.DpRect
14
13
  import androidx.compose.ui.unit.dp
15
14
  import vn.momo.kits.const.Spacing
16
15
  import vn.momo.kits.navigation.component.HEADER_HEIGHT
@@ -60,8 +59,6 @@ data class ScreenLayout(
60
59
  val duoTopInset: Dp = insetTop,
61
60
  // iPhone Duo inner display in portrait: the header row shares the status bar band, between its clusters.
62
61
  val statusBarClearance: StatusBarClearance? = null,
63
- // Half-folded iPhone Duo: the hinge in window coordinates, running top to bottom; null while flat.
64
- val hinge: DpRect? = null,
65
62
  ) {
66
63
  val headerBarHeight: Dp get() = headerHeight - headerStatusBarHeight
67
64
  }
@@ -94,6 +91,11 @@ internal object DuoMetrics {
94
91
  val floatingTabBarHeight = 62.dp
95
92
  val floatingTabBarMargin = 20.dp
96
93
  val floatingTabBarInsetOverlap = 13.dp
94
+ // Width of a system alert on the inner display, in both orientations.
95
+ val modalMaxWidth = 440.dp
96
+ // Fits a PopupNotify with image, scrolled description and actions at the max width (RN
97
+ // Application/device.ts); taller content scrolls instead of filling the inner display.
98
+ val modalMaxHeight = 640.dp
97
99
  }
98
100
 
99
101
  private val IPHONE_HEADER_MIN_HEIGHT = 72.dp
@@ -151,12 +153,19 @@ internal fun calculateScreenLayout(topInset: Dp, parent: ScreenLayout? = null):
151
153
  asymmetricInsets = leftPx != rightPx,
152
154
  isDuoDevice = isPhone && reservedRegions.isFoldable,
153
155
  reservedRegions = reservedRegions.occlusion,
154
- division = reservedRegions.division,
155
156
  )
156
157
  }
157
158
  }
158
159
  }
159
160
 
161
+ // Room for a dialog on iPhone Duo: inside the safe area, so clear of the side toolbar strip, and
162
+ // capped so it stays a dialog on the inner display.
163
+ internal val ScreenLayout.duoModalMaxWidth: Dp
164
+ get() = minOf(width - insetLeft - insetRight - Spacing.XL * 2, DuoMetrics.modalMaxWidth)
165
+
166
+ internal val ScreenLayout.duoModalMaxHeight: Dp
167
+ get() = minOf(height - insetTop - insetBottom - Spacing.XL * 2, DuoMetrics.modalMaxHeight)
168
+
160
169
  // Content inside the safe-area padding: the insets are spent and the side bar belongs to the screen.
161
170
  internal fun ScreenLayout.consumeHorizontalInsets(): ScreenLayout =
162
171
  copy(width = contentWidth, insetLeft = 0.dp, insetRight = 0.dp, sideBar = null)
@@ -247,7 +256,6 @@ private fun screenLayoutOf(
247
256
  asymmetricInsets: Boolean,
248
257
  isDuoDevice: Boolean,
249
258
  reservedRegions: List<ReservedRegion>,
250
- division: ReservedRegion?,
251
259
  ): ScreenLayout {
252
260
  val isIPhoneDuo = isPhone && isIPhoneDuoWindow(width, height, asymmetricInsets)
253
261
  val isInnerPortrait = height > width && width >= DuoMetrics.innerMinHeight
@@ -309,8 +317,5 @@ private fun screenLayoutOf(
309
317
  isIPhoneDuoDevice = isDuoDevice || (isPhone && asymmetricInsets),
310
318
  duoTopInset = maxOf(topInset, if (height > width) sideInset * 2 else 0.dp),
311
319
  statusBarClearance = statusBarClearance,
312
- // only a hinge splitting the window into left and right halves moves overlays
313
- hinge = division?.takeIf { isPhone && it.height > it.width }
314
- ?.let { DpRect(it.x, it.y, it.x + it.width, it.y + it.height) },
315
320
  )
316
321
  }