@onekeyfe/react-native-native-overlay 6.7.0-33 → 6.7.0-34

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.
@@ -103,6 +103,9 @@ internal class NativeOverlayEntryRootView(
103
103
  private var imeBottom = 0
104
104
  private var safeTop = 0
105
105
  private var sheetBottomPadding = 0
106
+ /** Paints the platform sheet's navigation-bar inset strip. */
107
+ internal var sheetBottomInsetPaintView: View? = null
108
+ private set
106
109
  private var keyboardAnimating = false
107
110
 
108
111
  /** `sheet` presentation: the draggable surface; otherwise null. */
@@ -156,6 +159,8 @@ internal class NativeOverlayEntryRootView(
156
159
  backgroundColor: Int,
157
160
  showHandle: Boolean,
158
161
  draggable: Boolean,
162
+ bottomInsetColor: Int? = null,
163
+ bottomInsetHorizontalPx: Float = 0f,
159
164
  ) {
160
165
  val sheet = sheetView ?: createSheet()
161
166
  (sheet.background as? GradientDrawable)?.apply {
@@ -178,6 +183,60 @@ internal class NativeOverlayEntryRootView(
178
183
  params.height = targetHeight
179
184
  sheet.layoutParams = params
180
185
  }
186
+ updateSheetBottomInsetPaint(sheetBottomPadding, bottomInsetColor, bottomInsetHorizontalPx)
187
+ }
188
+
189
+ /**
190
+ * `sheet` presentation: the sheet pads its content by the navigation-bar
191
+ * inset so the content sits above the system bar. When JS draws the surface
192
+ * the platform sheet stays transparent, and the JS safe-area tail cannot
193
+ * paint this strip on Android: it hangs below the React content root, which
194
+ * Android does not composite outside its bounds. Paint the strip natively
195
+ * with the drawn surface color instead. A null color keeps it transparent
196
+ * for platform-painted sheets.
197
+ */
198
+ internal fun updateSheetBottomInsetPaint(
199
+ insetPx: Int,
200
+ color: Int?,
201
+ horizontalInsetPx: Float,
202
+ ) {
203
+ val sheet = sheetView ?: return
204
+ if (color == null || insetPx <= 0) {
205
+ sheetBottomInsetPaintView?.let { paint ->
206
+ sheet.removeView(paint)
207
+ sheetBottomInsetPaintView = null
208
+ }
209
+ return
210
+ }
211
+ val paint = sheetBottomInsetPaintView ?: View(reactContext).apply {
212
+ isClickable = false
213
+ isFocusable = false
214
+ importantForAccessibility = IMPORTANT_FOR_ACCESSIBILITY_NO
215
+ // Index 0 keeps the strip behind the sheet content.
216
+ sheet.addView(
217
+ this,
218
+ 0,
219
+ LayoutParams(LayoutParams.MATCH_PARENT, 0).apply { gravity = Gravity.BOTTOM },
220
+ )
221
+ sheetBottomInsetPaintView = this
222
+ }
223
+ paint.setBackgroundColor(color)
224
+ // The content height can be fractional; overlap it by a couple of points so
225
+ // rounding cannot leave an unpainted row above the strip. Both views share
226
+ // the same surface color, so the overlap is invisible.
227
+ val height = insetPx + (2 * resources.displayMetrics.density).toInt()
228
+ val horizontal = horizontalInsetPx.toInt().coerceAtLeast(0)
229
+ val params = paint.layoutParams as LayoutParams
230
+ if (
231
+ params.height != height ||
232
+ params.leftMargin != horizontal ||
233
+ params.rightMargin != horizontal
234
+ ) {
235
+ params.height = height
236
+ params.leftMargin = horizontal
237
+ params.rightMargin = horizontal
238
+ paint.layoutParams = params
239
+ }
181
240
  }
182
241
 
183
242
  /** The sheet's full height, navigation bar padding included. */
@@ -242,6 +301,7 @@ internal class NativeOverlayEntryRootView(
242
301
  sheetAnimationView = coordinator
243
302
  sheetBehavior = behavior
244
303
  handleView = handle
304
+ sheetBottomInsetPaintView = null
245
305
  return sheet
246
306
  }
247
307
 
@@ -69,6 +69,10 @@ class NativeOverlayView(
69
69
  var sheetCornerRadius = 24.0
70
70
  var showHandle = false
71
71
  var sheetBackgroundColor: Int? = null
72
+ /** Paints the platform sheet's bottom inset with the drawn surface color. */
73
+ var sheetBottomInsetColor: Int? = null
74
+ /** Horizontal inset of the drawn surface inside the sheet, in points. */
75
+ var sheetBottomInsetHorizontal = 0.0
72
76
  var dismissOnPanDown = true
73
77
  var animationConfig: String? = null
74
78
  var onPresented: ((Int) -> Unit)? = null
@@ -398,6 +402,8 @@ class NativeOverlayView(
398
402
  backgroundColor = sheetBackgroundColor ?: defaultSheetBackgroundColor(),
399
403
  showHandle = showHandle,
400
404
  draggable = dismissOnPanDown,
405
+ bottomInsetColor = sheetBottomInsetColor,
406
+ bottomInsetHorizontalPx = (sheetBottomInsetHorizontal * density).toFloat(),
401
407
  )
402
408
  }
403
409
  }
@@ -145,6 +145,14 @@ class NativeOverlayViewManager :
145
145
  view.sheetBackgroundColor = value
146
146
  }
147
147
 
148
+ override fun setSheetBottomInsetColor(view: NativeOverlayView, value: Int?) {
149
+ view.sheetBottomInsetColor = value
150
+ }
151
+
152
+ override fun setSheetBottomInsetHorizontal(view: NativeOverlayView, value: Double) {
153
+ view.sheetBottomInsetHorizontal = value
154
+ }
155
+
148
156
  override fun setDismissOnPanDown(view: NativeOverlayView, value: Boolean) {
149
157
  view.dismissOnPanDown = value
150
158
  }
@@ -0,0 +1,78 @@
1
+ package com.onekey.nativeoverlay
2
+
3
+ import android.graphics.Color
4
+ import android.graphics.drawable.ColorDrawable
5
+ import android.view.Gravity
6
+ import android.widget.FrameLayout
7
+ import androidx.activity.ComponentActivity
8
+ import com.facebook.react.bridge.BridgeReactContext
9
+ import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsForTests
10
+ import com.facebook.react.uimanager.ThemedReactContext
11
+ import org.junit.Assert.assertEquals
12
+ import org.junit.Assert.assertNull
13
+ import org.junit.Assert.assertTrue
14
+ import org.junit.Test
15
+ import org.junit.runner.RunWith
16
+ import org.robolectric.Robolectric
17
+ import org.robolectric.RobolectricTestRunner
18
+ import org.robolectric.annotation.Config
19
+
20
+ @RunWith(RobolectricTestRunner::class)
21
+ @Config(sdk = [34])
22
+ class NativeOverlaySheetInsetTest {
23
+ private fun newEntry(): NativeOverlayEntryRootView {
24
+ ReactNativeFeatureFlagsForTests.setUp()
25
+ val activity = Robolectric.buildActivity(ComponentActivity::class.java).setup().visible().get()
26
+ val reactContext = BridgeReactContext(activity)
27
+ val context = ThemedReactContext(reactContext, activity, "SheetInsetTest", 1)
28
+ return NativeOverlayEntryRootView(context)
29
+ }
30
+
31
+ @Test
32
+ fun paintsTheNavigationBarStripBehindTheContent() {
33
+ val entry = newEntry()
34
+ // Platform-painted sheet: the platform background reaches the inset.
35
+ entry.configureSheet(200, 24f, Color.WHITE, false, true)
36
+ assertNull(entry.sheetBottomInsetPaintView)
37
+ val sheet = entry.sheetView!!
38
+ val content = entry.contentView
39
+
40
+ entry.updateSheetBottomInsetPaint(48, Color.WHITE, 12f)
41
+
42
+ val paint = entry.sheetBottomInsetPaintView!!
43
+ assertTrue(sheet.indexOfChild(paint) < sheet.indexOfChild(content))
44
+ val params = paint.layoutParams as FrameLayout.LayoutParams
45
+ assertEquals(Gravity.BOTTOM, params.gravity)
46
+ assertEquals(12, params.leftMargin)
47
+ assertEquals(12, params.rightMargin)
48
+ // The inset plus a small overlap over the fractional content height.
49
+ assertTrue(params.height >= 48)
50
+ assertEquals(Color.WHITE, (paint.background as ColorDrawable).color)
51
+ }
52
+
53
+ @Test
54
+ fun clearsTheStripWhenThePlatformSheetPaintsTheSurface() {
55
+ val entry = newEntry()
56
+ entry.configureSheet(200, 24f, Color.TRANSPARENT, false, true)
57
+ val sheet = entry.sheetView!!
58
+ entry.updateSheetBottomInsetPaint(48, Color.WHITE, 0f)
59
+ assertTrue(sheet.childCount == 3)
60
+
61
+ entry.updateSheetBottomInsetPaint(48, null, 0f)
62
+
63
+ assertEquals(2, sheet.childCount)
64
+ assertNull(entry.sheetBottomInsetPaintView)
65
+ }
66
+
67
+ @Test
68
+ fun keepsTheStripSquareWhenTheSurfaceIsNarrowerThanTheSheet() {
69
+ val entry = newEntry()
70
+ entry.configureSheet(200, 24f, Color.TRANSPARENT, false, true)
71
+ entry.updateSheetBottomInsetPaint(48, Color.BLACK, 40f)
72
+
73
+ val params = entry.sheetBottomInsetPaintView!!.layoutParams as FrameLayout.LayoutParams
74
+ assertEquals(40, params.leftMargin)
75
+ assertEquals(40, params.rightMargin)
76
+ assertEquals(Gravity.BOTTOM, params.gravity)
77
+ }
78
+ }
package/docs/SPEC.md CHANGED
@@ -492,6 +492,11 @@ Max-width sheet (`sheet.maxWidth`, default 540):
492
492
  amount, so the fractional boundary between the two views cannot antialias
493
493
  into a hairline on scaled renders (Simulator windows, screenshots, screen
494
494
  recordings).
495
+ - Android hosts the sheet inside the activity content view and pads the sheet
496
+ by the navigation-bar inset, so the JS tail below the React content root is
497
+ not composited there. Native paints that inset strip with the drawn surface
498
+ color (`sheetBottomInsetColor`, limited by `sheetBottomInsetHorizontal`)
499
+ instead; the JS tail still covers the iOS home-indicator area.
495
500
 
496
501
  Width changes while open (rotation, folding, window resize):
497
502
 
@@ -699,6 +704,13 @@ Automated (P0):
699
704
  actual `ReactViewGroup` and checks a sheet at 200, 600 and 320 px after
700
705
  attachment. Height changes MUST relayout and bottom-pin the sheet without
701
706
  a Fabric host-size update, and leave no pending host layout flag.
707
+ - `NativeOverlaySheetInsetTest` exercises the production Android sheet inset
708
+ painter: the navigation-bar strip sits behind the content, follows the drawn
709
+ surface width, carries the surface color and is removed when the platform
710
+ sheet paints its own background. `src/__tests__/sheetSurface.test.ts` checks
711
+ that the drawn surface color and horizontal inset reach native only while
712
+ the JS surface is active. Source and Robolectric verified; physical-device
713
+ verification pending.
702
714
  - `src/__tests__/pageIsolation.web.test.ts` mounts a real React portal in a
703
715
  DOM host and verifies late suspension, level ordering and restoration after
704
716
  the blocking entry is removed.
@@ -844,7 +856,9 @@ P4b dialog loading notes:
844
856
  it. Its 50 ms delays and the iOS remount key are gone; text updates in
845
857
  place.
846
858
  - Android sheets pad their content by the navigation-bar inset, matching the
847
- UIKit sheet's home-indicator inset.
859
+ UIKit sheet's home-indicator inset, and paint that inset strip natively with
860
+ the drawn surface color (the JS tail is not composited below the React
861
+ content root on Android).
848
862
 
849
863
  P1 implementation map:
850
864
 
@@ -54,6 +54,19 @@ export interface INativeOverlayNativeProps extends ViewProps {
54
54
  sheetCornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, 24>;
55
55
  showHandle?: CodegenTypes.WithDefault<boolean, false>;
56
56
  sheetBackgroundColor?: ColorValue;
57
+ /**
58
+ * `sheet` presentation: paints the platform sheet's bottom inset (the
59
+ * navigation-bar strip padded below the fitted content) with the drawn
60
+ * surface color. Android hosts the sheet inside the activity content view,
61
+ * so a JS view below the content root is not composited there; iOS uses the
62
+ * JS safe-area tail instead.
63
+ */
64
+ sheetBottomInsetColor?: ColorValue;
65
+ /**
66
+ * `sheet` presentation: horizontal inset of the drawn surface inside the
67
+ * platform sheet, in points, so the bottom inset paint stops with it.
68
+ */
69
+ sheetBottomInsetHorizontal?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
57
70
  dismissOnPanDown?: CodegenTypes.WithDefault<boolean, true>;
58
71
  /** JSON of the resolved animation (`IResolvedOverlayAnimation`). */
59
72
  animationConfig?: CodegenTypes.WithDefault<string, ''>;
@@ -190,7 +190,13 @@ export function OverlayView(props) {
190
190
  // A max-width sheet draws its own surface, so the platform sheet
191
191
  // stays transparent beside it.
192
192
  ,
193
- sheetBackgroundColor: hasSheetSurface ? 'transparent' : sheet?.backgroundColor,
193
+ sheetBackgroundColor: hasSheetSurface ? 'transparent' : sheet?.backgroundColor
194
+ // Android hosts the sheet inside the activity content view, so the JS
195
+ // safe-area tail below the content root is not composited there. Have
196
+ // native paint the padded bottom inset with the drawn surface color.
197
+ ,
198
+ sheetBottomInsetColor: hasSheetSurface ? sheetSurfaceBackgroundColor : undefined,
199
+ sheetBottomInsetHorizontal: hasSheetSurface ? sheetInset : 0,
194
200
  dismissOnPanDown: sheet?.dismissOnPanDown ?? true,
195
201
  animationConfig: animationConfig,
196
202
  onPresented: onHostPresented,
@@ -1 +1 @@
1
- {"version":3,"names":["useCallback","useMemo","useRef","useState","Platform","PlatformColor","Pressable","StatusBar","StyleSheet","View","useWindowDimensions","NativeOverlay","OverlayLevelProvider","isBlockingLevel","resolveContentSize","resolveSheetWidth","useOverlayController","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_BACKDROP_COLOR","DEFAULT_SHEET_MAX_RATIO","DEFAULT_SHEET_CORNER_RADIUS","SHEET_SURFACE_TAIL_HEIGHT","SHEET_SURFACE_TAIL_OVERLAP","REQUEST_REASONS","back","backdrop","pan","styles","create","host","position","top","left","width","sheetMarginLeft","bottom","sheetMarginRight","right","sheetSurface","borderCurve","overflow","flexGrow","sheetSurfaceTail","height","marginTop","OverlayView","props","level","presentation","blocking","dismissOnBackPress","sheet","keepContentMounted","statusBarStyle","children","testID","windowOffsetRequest","onWindowOffset","contentSize","offsetProbeRef","onHostWindowOrigin","event","x","nativeX","y","nativeY","nativeEvent","current","measureInWindow","isSheet","controller","entry","mounted","presented","ownsStatusBar","scope","hostKey","ownerKey","animation","onHostPresented","onHostDismissed","onHostRequestDismiss","measuredSheetHeight","setMeasuredSheetHeight","reportedSheetWidth","setReportedSheetWidth","containerWidth","sheetContainerWidth","inset","sheetInset","windowWidth","reportedWidth","maxWidth","hasSheetSurface","undefined","sheetSurfaceBackgroundColor","backgroundColor","OS","dismissOnBackdropPress","dismissOnPress","onSheetMarginPress","onSheetLayoutReport","maxSheetHeight","maxHeight","sheetHeight","Math","min","onSheetLayout","layout","animationConfig","JSON","stringify","isBlocking","onDismissed","onRequestDismiss","reason","statusBar","animated","barStyle","ref","collapsable","pointerEvents","style","visible","stackOrder","seq","backdropColor","color","sheetCornerRadius","cornerRadius","showHandle","sheetBackgroundColor","dismissOnPanDown","onPresented","hostOriginRequest","onLayout","paddingHorizontal","flexShrink","accessible","importantForAccessibility","onPress","borderTopLeftRadius","borderTopRightRadius","value","windowHeight"],"sourceRoot":"../../src","sources":["OverlayView.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE9D,SACEC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,mBAAmB,QACd,cAAc;AAErB,OAAOC,aAAa,MAAM,gCAAgC;AAC1D,SA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;cAACwI,KAAK,EAAEhG,KAAM;cAAAO,QAAA,EAChCA;YAAQ,CACW;UAAC,CACnB,CAAC;QAAA,CACP,CAAC,gBAEHzC,IAAA,CAACN,oBAAoB;UAACwI,KAAK,EAAEhG,KAAM;UAAAO,QAAA,EAChCA;QAAQ,CACW;MACvB,CACG,CAAC,gBAEPzC,IAAA,CAACT,IAAI;QACHoH,WAAW,EAAE,KAAM;QACnBC,aAAa,EAAC,UAAU;QACxBC,KAAK,EAAE;UACL,GAAGjH,kBAAkB,CAAC;YACpBiF,WAAW,EAAEzD,KAAK;YAClB+G,YAAY,EAAErG,MAAM;YACpBe;UACF,CAAC,CAAC;UACF+E,UAAU,EAAE;QACd,CAAE;QAAAnF,QAAA,eAEFzC,IAAA,CAACN,oBAAoB;UAACwI,KAAK,EAAEhG,KAAM;UAAAO,QAAA,EAChCA;QAAQ,CACW;MAAC,CACnB;IACP,CACY,CAAC;EAAA,CAChB,CAAC;AAEP","ignoreList":[]}
1
+ {"version":3,"names":["useCallback","useMemo","useRef","useState","Platform","PlatformColor","Pressable","StatusBar","StyleSheet","View","useWindowDimensions","NativeOverlay","OverlayLevelProvider","isBlockingLevel","resolveContentSize","resolveSheetWidth","useOverlayController","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_BACKDROP_COLOR","DEFAULT_SHEET_MAX_RATIO","DEFAULT_SHEET_CORNER_RADIUS","SHEET_SURFACE_TAIL_HEIGHT","SHEET_SURFACE_TAIL_OVERLAP","REQUEST_REASONS","back","backdrop","pan","styles","create","host","position","top","left","width","sheetMarginLeft","bottom","sheetMarginRight","right","sheetSurface","borderCurve","overflow","flexGrow","sheetSurfaceTail","height","marginTop","OverlayView","props","level","presentation","blocking","dismissOnBackPress","sheet","keepContentMounted","statusBarStyle","children","testID","windowOffsetRequest","onWindowOffset","contentSize","offsetProbeRef","onHostWindowOrigin","event","x","nativeX","y","nativeY","nativeEvent","current","measureInWindow","isSheet","controller","entry","mounted","presented","ownsStatusBar","scope","hostKey","ownerKey","animation","onHostPresented","onHostDismissed","onHostRequestDismiss","measuredSheetHeight","setMeasuredSheetHeight","reportedSheetWidth","setReportedSheetWidth","containerWidth","sheetContainerWidth","inset","sheetInset","windowWidth","reportedWidth","maxWidth","hasSheetSurface","undefined","sheetSurfaceBackgroundColor","backgroundColor","OS","dismissOnBackdropPress","dismissOnPress","onSheetMarginPress","onSheetLayoutReport","maxSheetHeight","maxHeight","sheetHeight","Math","min","onSheetLayout","layout","animationConfig","JSON","stringify","isBlocking","onDismissed","onRequestDismiss","reason","statusBar","animated","barStyle","ref","collapsable","pointerEvents","style","visible","stackOrder","seq","backdropColor","color","sheetCornerRadius","cornerRadius","showHandle","sheetBackgroundColor","sheetBottomInsetColor","sheetBottomInsetHorizontal","dismissOnPanDown","onPresented","hostOriginRequest","onLayout","paddingHorizontal","flexShrink","accessible","importantForAccessibility","onPress","borderTopLeftRadius","borderTopRightRadius","value","windowHeight"],"sourceRoot":"../../src","sources":["OverlayView.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE9D,SACEC,QAAQ,EACRC,aAAa,EACbC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,mBAAmB,QACd,cAAc;AAErB,OAAOC,aAAa,MAAM,gCAAgC;AAC1D,SAASC,oBAAoB,QAAQ,0BAAuB;AAC5D,SAASC,eAAe,QAAQ,oBAAiB;AACjD,SAASC,kBAAkB,QAAQ,kBAAe;AAClD,SAASC,iBAAiB,QAAQ,iBAAc;AAChD,SAASC,oBAAoB,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAS9D,MAAMC,sBAAsB,GAAG,oBAAoB;AACnD,MAAMC,uBAAuB,GAAG,IAAI;AACpC,MAAMC,2BAA2B,GAAG,EAAE;AACtC;AACA,MAAMC,yBA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AE,KAAM;QACnBC,aAAa,EAAC,UAAU;QACxBC,KAAK,EAAE;UACL,GAAGjH,kBAAkB,CAAC;YACpBiF,WAAW,EAAEzD,KAAK;YAClBiH,YAAY,EAAEvG,MAAM;YACpBe;UACF,CAAC,CAAC;UACFiF,UAAU,EAAE;QACd,CAAE;QAAArF,QAAA,eAEFzC,IAAA,CAACN,oBAAoB;UAAC0I,KAAK,EAAElG,KAAM;UAAAO,QAAA,EAChCA;QAAQ,CACW;MAAC,CACnB;IACP,CACY,CAAC;EAAA,CAChB,CAAC;AAEP","ignoreList":[]}
@@ -36,6 +36,19 @@ export interface INativeOverlayNativeProps extends ViewProps {
36
36
  sheetCornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, 24>;
37
37
  showHandle?: CodegenTypes.WithDefault<boolean, false>;
38
38
  sheetBackgroundColor?: ColorValue;
39
+ /**
40
+ * `sheet` presentation: paints the platform sheet's bottom inset (the
41
+ * navigation-bar strip padded below the fitted content) with the drawn
42
+ * surface color. Android hosts the sheet inside the activity content view,
43
+ * so a JS view below the content root is not composited there; iOS uses the
44
+ * JS safe-area tail instead.
45
+ */
46
+ sheetBottomInsetColor?: ColorValue;
47
+ /**
48
+ * `sheet` presentation: horizontal inset of the drawn surface inside the
49
+ * platform sheet, in points, so the bottom inset paint stops with it.
50
+ */
51
+ sheetBottomInsetHorizontal?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
39
52
  dismissOnPanDown?: CodegenTypes.WithDefault<boolean, true>;
40
53
  /** JSON of the resolved animation (`IResolvedOverlayAnimation`). */
41
54
  animationConfig?: CodegenTypes.WithDefault<string, ''>;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeOverlayNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/NativeOverlayNativeComponent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,KAAK,4BAA4B,GAAG,Q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IACvD,WAAW,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;IAC5E,WAAW,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;IAC5E,gBAAgB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,iCAAiC,CAAC,CAAC;IACtF,mEAAmE;IACnE,aAAa,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,CAAC;IAChF,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACpE,kBAAkB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,mCAAmC,CAAC,CAAC;CAC3F;wBAOI,aAAa,CAAC,yBAAyB,CAAC;AAH7C,wBAG8C"}
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayView.d.ts","sourceRoot":"","sources":["../../../src/OverlayView.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAiD5B,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,sCAoPnD"}
1
+ {"version":3,"file":"OverlayView.d.ts","sourceRoot":"","sources":["../../../src/OverlayView.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAiD5B,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,sCA2PnD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-native-overlay",
3
- "version": "6.7.0-33",
3
+ "version": "6.7.0-34",
4
4
  "description": "Native and Web overlay hosts with ordered levels, page scope and Fabric measurement",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -54,6 +54,19 @@ export interface INativeOverlayNativeProps extends ViewProps {
54
54
  sheetCornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, 24>;
55
55
  showHandle?: CodegenTypes.WithDefault<boolean, false>;
56
56
  sheetBackgroundColor?: ColorValue;
57
+ /**
58
+ * `sheet` presentation: paints the platform sheet's bottom inset (the
59
+ * navigation-bar strip padded below the fitted content) with the drawn
60
+ * surface color. Android hosts the sheet inside the activity content view,
61
+ * so a JS view below the content root is not composited there; iOS uses the
62
+ * JS safe-area tail instead.
63
+ */
64
+ sheetBottomInsetColor?: ColorValue;
65
+ /**
66
+ * `sheet` presentation: horizontal inset of the drawn surface inside the
67
+ * platform sheet, in points, so the bottom inset paint stops with it.
68
+ */
69
+ sheetBottomInsetHorizontal?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
57
70
  dismissOnPanDown?: CodegenTypes.WithDefault<boolean, true>;
58
71
  /** JSON of the resolved animation (`IResolvedOverlayAnimation`). */
59
72
  animationConfig?: CodegenTypes.WithDefault<string, ''>;
@@ -217,6 +217,13 @@ export function OverlayView(props: IOverlayViewProps) {
217
217
  sheetBackgroundColor={
218
218
  hasSheetSurface ? 'transparent' : sheet?.backgroundColor
219
219
  }
220
+ // Android hosts the sheet inside the activity content view, so the JS
221
+ // safe-area tail below the content root is not composited there. Have
222
+ // native paint the padded bottom inset with the drawn surface color.
223
+ sheetBottomInsetColor={
224
+ hasSheetSurface ? sheetSurfaceBackgroundColor : undefined
225
+ }
226
+ sheetBottomInsetHorizontal={hasSheetSurface ? sheetInset : 0}
220
227
  dismissOnPanDown={sheet?.dismissOnPanDown ?? true}
221
228
  animationConfig={animationConfig}
222
229
  onPresented={onHostPresented}