@namiml/expo-sdk 3.4.6 → 3.4.7-dev.202607230540

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": "@namiml/expo-sdk",
3
- "version": "3.4.6",
3
+ "version": "3.4.7-dev.202607230540",
4
4
  "type": "module",
5
5
  "description": "Nami Expo SDK — paywall and subscription management for Expo apps",
6
6
  "main": "./dist/index.cjs",
@@ -29,8 +29,8 @@
29
29
  "prepublishOnly": "yarn clean && yarn build:prod"
30
30
  },
31
31
  "dependencies": {
32
- "@namiml/expo-nami-iap": "3.4.6",
33
- "@namiml/sdk-core": "3.4.6",
32
+ "@namiml/expo-nami-iap": "3.4.7-dev.202607230540",
33
+ "@namiml/sdk-core": "3.4.7-dev.202607230540",
34
34
  "react-native-qrcode-svg": "^6.3.21",
35
35
  "react-native-safe-area-context": "^5.6.0",
36
36
  "react-native-svg": "^15.15.4"
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
- import { ActivityIndicator, BackHandler, View, StyleSheet } from 'react-native';
2
+ import { ActivityIndicator, BackHandler, Keyboard, Pressable, View, StyleSheet } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
4
  import type { IPaywall, TPages } from '@namiml/sdk-core';
5
5
  import { useFirstFocusReadyContext, usePaywallContext } from '../context/PaywallContext';
@@ -199,46 +199,63 @@ export const PaywallScreen: React.FC<Props> = ({
199
199
  );
200
200
  }
201
201
 
202
+ // NAM-1933: on phone/tablet, tapping the paywall background (empty area above
203
+ // the keyboard) dismisses the keyboard. A Pressable wrapping the page content
204
+ // yields the responder to interactive children (buttons, the text field), so
205
+ // its onPress fires only for taps on non-interactive/empty areas. TV has no
206
+ // keyboard, so it renders the content without the Pressable.
207
+ const isTelevision = ctx.state.formFactor === 'television';
208
+
209
+ const pageContent = (
210
+ <PageFocusWrapper
211
+ key={`${paywall.id}:${page.name ?? currentPageName}`}
212
+ {...pageFocusWrapperProps}
213
+ >
214
+ {backgroundContainer && (
215
+ <NamiBackgroundContainer component={backgroundContainer as any} scaleFactor={scaleFactor} onClose={onClose} />
216
+ )}
217
+
218
+ {hasHeader && (
219
+ <NamiHeader
220
+ components={header as any}
221
+ scaleFactor={scaleFactor}
222
+ onClose={onClose}
223
+ />
224
+ )}
225
+
226
+ {contentContainer && (
227
+ <NamiContentContainer
228
+ component={contentContainer as any}
229
+ scaleFactor={scaleFactor}
230
+ onClose={onClose}
231
+ />
232
+ )}
233
+
234
+ {hasFooter && (
235
+ <NamiFooter components={footer as any} scaleFactor={scaleFactor} onClose={onClose} />
236
+ )}
237
+
238
+ {shouldHoldForFocus && !focusReady && (
239
+ <View
240
+ pointerEvents="none"
241
+ style={[styles.waitingOverlay, { backgroundColor: waitingOverlayColor }]}
242
+ />
243
+ )}
244
+ </PageFocusWrapper>
245
+ );
246
+
202
247
  return (
203
248
  <View
204
249
  style={[styles.screen, { backgroundColor: bgColor }]}
205
250
  pointerEvents={interactionEnabled ? 'auto' : 'none'}
206
251
  >
207
- <PageFocusWrapper
208
- key={`${paywall.id}:${page.name ?? currentPageName}`}
209
- {...pageFocusWrapperProps}
210
- >
211
- {backgroundContainer && (
212
- <NamiBackgroundContainer component={backgroundContainer as any} scaleFactor={scaleFactor} onClose={onClose} />
213
- )}
214
-
215
- {hasHeader && (
216
- <NamiHeader
217
- components={header as any}
218
- scaleFactor={scaleFactor}
219
- onClose={onClose}
220
- />
221
- )}
222
-
223
- {contentContainer && (
224
- <NamiContentContainer
225
- component={contentContainer as any}
226
- scaleFactor={scaleFactor}
227
- onClose={onClose}
228
- />
229
- )}
230
-
231
- {hasFooter && (
232
- <NamiFooter components={footer as any} scaleFactor={scaleFactor} onClose={onClose} />
233
- )}
234
-
235
- {shouldHoldForFocus && !focusReady && (
236
- <View
237
- pointerEvents="none"
238
- style={[styles.waitingOverlay, { backgroundColor: waitingOverlayColor }]}
239
- />
240
- )}
241
- </PageFocusWrapper>
252
+ {isTelevision ? (
253
+ pageContent
254
+ ) : (
255
+ <Pressable style={styles.screen} onPress={() => Keyboard.dismiss()} accessible={false}>
256
+ {pageContent}
257
+ </Pressable>
258
+ )}
242
259
  </View>
243
260
  );
244
261
  };