@momo-kits/foundation 0.161.2-beta.23 → 0.161.2-beta.25

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.
@@ -37,8 +37,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
37
37
  const action = useRef<undefined | string>(undefined);
38
38
  const insets = useSafeAreaInsets();
39
39
  const heightHeader = useHeaderHeight();
40
- const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
41
- const keyboardOffset = heightHeader - bottomInset;
40
+ const keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
42
41
 
43
42
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
44
43
 
@@ -312,7 +311,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
312
311
  {useBottomInset && (
313
312
  <View
314
313
  style={{
315
- height: bottomInset,
314
+ height: Math.min(insets.bottom, 21),
316
315
  backgroundColor: backgroundColor,
317
316
  }}
318
317
  />
@@ -320,7 +320,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
320
320
  activeTintColor={theme.colors.primary}
321
321
  style={[
322
322
  {
323
- height: 64 + (Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom),
323
+ height: 64 + Math.min(insets.bottom, 21),
324
324
  },
325
325
  ]}
326
326
  />
package/Layout/Screen.tsx CHANGED
@@ -204,27 +204,9 @@ const Screen = forwardRef(
204
204
  let handleScroll;
205
205
  let Component: any = View;
206
206
 
207
- // Only on Android 16+ (API 36), matching the native WindowUtils.syncImePaddingWithAnimation gate.
208
- // The IME transition can momentarily report a smaller bottom inset; latch the largest seen so
209
- // the footer keeps a constant nav-bar gap. The native side animates only the keyboard portion
210
- // (ime - navBar), so the footer slides smoothly during hide instead of jumping after the
211
- // keyboard is fully gone. Android <16 / iOS keep the original inset behavior untouched.
212
- const useNativeKeyboardSync =
213
- Platform.OS === 'android' && Number(Platform.Version) >= 36;
214
- const maxBottomInset = useRef(0);
215
- if (insets.bottom > maxBottomInset.current) {
216
- maxBottomInset.current = insets.bottom;
217
- }
218
- const bottomInset =
219
- Platform.OS === 'ios'
220
- ? Math.min(insets.bottom, 21)
221
- : useNativeKeyboardSync
222
- ? maxBottomInset.current
223
- : insets.bottom;
224
- // AI-GENERATED END: stabilize Android bottom inset so the footer's nav-bar gap doesn't jump
225
- let keyboardOffset = heightHeader - bottomInset;
207
+ let keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
226
208
  if (headerType === 'extended' || animatedHeader || inputSearchProps) {
227
- keyboardOffset = -bottomInset;
209
+ keyboardOffset = -Math.min(insets.bottom, 21);
228
210
  }
229
211
 
230
212
  /**
@@ -634,7 +616,7 @@ const Screen = forwardRef(
634
616
  {...floatingButtonProps}
635
617
  animatedValue={animatedValue.current}
636
618
  bottom={
637
- Footer || isTab ? 12 : bottomInset + Spacing.S
619
+ Footer || isTab ? 12 : Math.min(insets.bottom, 21) + Spacing.S
638
620
  }
639
621
  />
640
622
  </View>
@@ -645,7 +627,7 @@ const Screen = forwardRef(
645
627
  style={[
646
628
  styles.shadow,
647
629
  {
648
- paddingBottom: bottomInset + Spacing.S,
630
+ paddingBottom: Math.min(insets.bottom, 21) + Spacing.S,
649
631
  backgroundColor: theme.colors.background.surface,
650
632
  },
651
633
  ]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.161.2-beta.23",
3
+ "version": "0.161.2-beta.25",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},