react-native-my-survey-sdk 2.2.2 → 2.2.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-my-survey-sdk",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "Xebo survey collection SDK for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -28,8 +28,15 @@ import { XeboMultiNPSView } from './XeboMultiNPSView';
28
28
  import { XeboRatingView } from './XeboRatingView';
29
29
  import { XeboMultiRatingView } from './XeboMultiRatingView';
30
30
 
31
- // 'screen' includes the Android system navigation bar; 'window' excludes it.
32
- const SCREEN_HEIGHT = Dimensions.get('screen').height;
31
+ // 'window' excludes the Android navigation bar; 'screen' includes it.
32
+ // Using window height so sheets are sized relative to the usable area.
33
+ const SCREEN_HEIGHT = Dimensions.get('window').height;
34
+
35
+ // Android navigation bar height = difference between screen and window.
36
+ // Used as bottomInset so content isn't hidden behind the nav bar.
37
+ const _androidNavBar = Platform.OS === 'android'
38
+ ? Math.max(0, Dimensions.get('screen').height - Dimensions.get('window').height)
39
+ : 0;
33
40
 
34
41
  function computeSheetHeight(question: XeboQuestion | null, screen: ModalScreen): number {
35
42
  if (screen === 'thankYou') return SCREEN_HEIGHT * 0.32;
@@ -68,8 +75,8 @@ type ModalScreen = 'intro' | 'question' | 'thankYou';
68
75
 
69
76
  export const XeboSurveyModal: React.FC = () => {
70
77
  const theme = getTheme();
71
- // Static bottom inset no SafeAreaProvider needed
72
- const bottomInset = Platform.OS === 'ios' ? 34 : 16;
78
+ // Bottom inset: iOS home indicator (34) or Android nav bar height (min 16)
79
+ const bottomInset = Platform.OS === 'ios' ? 34 : Math.max(16, _androidNavBar);
73
80
 
74
81
  const [visible, setVisible] = useState(false);
75
82
  const [survey, setSurvey] = useState<XeboSurvey | null>(null);