@momo-kits/foundation 0.161.2-beta.7 → 0.161.2-test.1

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,7 +37,10 @@ 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 keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
40
+ // AI-GENERATED START: iOS caps at 21pt (home indicator), Android uses full nav bar height
41
+ const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
42
+ const keyboardOffset = heightHeader - bottomInset;
43
+ // AI-GENERATED END
41
44
 
42
45
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
43
46
 
@@ -311,7 +314,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
311
314
  {useBottomInset && (
312
315
  <View
313
316
  style={{
314
- height: Math.min(insets.bottom, 21),
317
+ height: bottomInset,
315
318
  backgroundColor: backgroundColor,
316
319
  }}
317
320
  />
@@ -296,7 +296,9 @@ const BottomTab: React.FC<BottomTabProps> = ({
296
296
  activeTintColor={theme.colors.primary}
297
297
  style={[
298
298
  {
299
- height: 64 + Math.min(insets.bottom, 21),
299
+ // AI-GENERATED START: iOS caps at 21pt (home indicator), Android uses full nav bar height
300
+ height: 64 + (Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom),
301
+ // AI-GENERATED END
300
302
  },
301
303
  ]}
302
304
  />
package/Layout/Screen.tsx CHANGED
@@ -209,9 +209,15 @@ const Screen = forwardRef(
209
209
  let handleScroll: any;
210
210
  let Component: any = View;
211
211
 
212
- let keyboardOffset = heightHeader - Math.min(insets.bottom, 21);
212
+ // AI-GENERATED START
213
+ // On iOS the home indicator is ~34pt but visual safe area needs only ~21pt cap.
214
+ // On Android 15+ edge-to-edge the nav bar can be 48dp — no cap needed.
215
+ const bottomInset = Platform.OS === 'ios' ? Math.min(insets.bottom, 21) : insets.bottom;
216
+ // AI-GENERATED END
217
+
218
+ let keyboardOffset = heightHeader - bottomInset;
213
219
  if (headerType === 'extended' || animatedHeader || inputSearchProps) {
214
- keyboardOffset = -Math.min(insets.bottom, 21);
220
+ keyboardOffset = -bottomInset;
215
221
  }
216
222
 
217
223
  /**
@@ -620,7 +626,7 @@ const Screen = forwardRef(
620
626
  {...floatingButtonProps}
621
627
  animatedValue={animatedValue}
622
628
  bottom={
623
- Footer || isTab ? 12 : Math.min(insets.bottom, 21) + Spacing.S
629
+ Footer || isTab ? 12 : bottomInset + Spacing.S
624
630
  }
625
631
  />
626
632
  </View>
@@ -631,7 +637,7 @@ const Screen = forwardRef(
631
637
  style={[
632
638
  styles.shadow,
633
639
  {
634
- paddingBottom: Math.min(insets.bottom, 21) + Spacing.S,
640
+ paddingBottom: bottomInset + Spacing.S,
635
641
  backgroundColor: theme.colors.background.surface,
636
642
  },
637
643
  ]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.161.2-beta.7",
3
+ "version": "0.161.2-test.1",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},