@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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { NAMI_SDK_PACKAGE_VERSION, registerPlatformAdapters, registerPurchaseAdapter, logger, NamiPaywallManager, Nami as Nami$1, PaywallState, initialState, getUrlParams, SMART_TEXT_PATTERN, VAR_REGEX, LIQUID_VARIABLE_REGEX, isAnonymousMode, NamiAPI, storageService, getDeviceScaleFactor, NamiEventEmitter, PAYWALL_ACTION_EVENT, NamiPaywallAction, NamiReservedActions, _internal, isValidUrl, isNamiFlowCampaign, hasAllPaywalls, getPaywallDataFromLabel, getPaywall } from '@namiml/sdk-core';
2
2
  export { NamiCampaignManager, NamiCustomerManager, NamiEntitlementManager, NamiFlowManager, NamiHandoffTag, NamiPaywallManager, NamiPermissionOutcome, NamiPurchaseManager } from '@namiml/sdk-core';
3
- import { Platform, Dimensions, StyleSheet, View, ScrollView, ImageBackground, BackHandler, ActivityIndicator, StatusBar, Animated } from 'react-native';
3
+ import { Platform, Dimensions, StyleSheet, View, ScrollView, ImageBackground, BackHandler, ActivityIndicator, Pressable, Keyboard, StatusBar, Animated } from 'react-native';
4
4
  import require$$0, { createContext, useRef, useState, useEffect, useMemo, useContext, useCallback, useLayoutEffect } from 'react';
5
5
  import { useSafeAreaInsets, SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context';
6
6
 
@@ -3380,7 +3380,14 @@ const PaywallScreen = ({ paywall, onClose, onCommitted, holdInteractionUntilFocu
3380
3380
  if (fontGateState === 'pending') {
3381
3381
  return (jsxRuntimeExports.jsx(View, { style: [styles$1.screen, styles$1.pendingScreen, { backgroundColor: waitingOverlayColor }], children: jsxRuntimeExports.jsx(ActivityIndicator, { size: "large", color: "#FFFFFF" }) }));
3382
3382
  }
3383
- return (jsxRuntimeExports.jsx(View, { style: [styles$1.screen, { backgroundColor: bgColor }], pointerEvents: interactionEnabled ? 'auto' : 'none', children: jsxRuntimeExports.jsxs(PageFocusWrapper, { ...pageFocusWrapperProps, children: [backgroundContainer && (jsxRuntimeExports.jsx(NamiBackgroundContainer, { component: backgroundContainer, scaleFactor: scaleFactor, onClose: onClose })), hasHeader && (jsxRuntimeExports.jsx(NamiHeader, { components: header, scaleFactor: scaleFactor, onClose: onClose })), contentContainer && (jsxRuntimeExports.jsx(NamiContentContainer, { component: contentContainer, scaleFactor: scaleFactor, onClose: onClose })), hasFooter && (jsxRuntimeExports.jsx(NamiFooter, { components: footer, scaleFactor: scaleFactor, onClose: onClose })), shouldHoldForFocus && !focusReady && (jsxRuntimeExports.jsx(View, { pointerEvents: "none", style: [styles$1.waitingOverlay, { backgroundColor: waitingOverlayColor }] }))] }, `${paywall.id}:${page.name ?? currentPageName}`) }));
3383
+ // NAM-1933: on phone/tablet, tapping the paywall background (empty area above
3384
+ // the keyboard) dismisses the keyboard. A Pressable wrapping the page content
3385
+ // yields the responder to interactive children (buttons, the text field), so
3386
+ // its onPress fires only for taps on non-interactive/empty areas. TV has no
3387
+ // keyboard, so it renders the content without the Pressable.
3388
+ const isTelevision = ctx.state.formFactor === 'television';
3389
+ const pageContent = (jsxRuntimeExports.jsxs(PageFocusWrapper, { ...pageFocusWrapperProps, children: [backgroundContainer && (jsxRuntimeExports.jsx(NamiBackgroundContainer, { component: backgroundContainer, scaleFactor: scaleFactor, onClose: onClose })), hasHeader && (jsxRuntimeExports.jsx(NamiHeader, { components: header, scaleFactor: scaleFactor, onClose: onClose })), contentContainer && (jsxRuntimeExports.jsx(NamiContentContainer, { component: contentContainer, scaleFactor: scaleFactor, onClose: onClose })), hasFooter && (jsxRuntimeExports.jsx(NamiFooter, { components: footer, scaleFactor: scaleFactor, onClose: onClose })), shouldHoldForFocus && !focusReady && (jsxRuntimeExports.jsx(View, { pointerEvents: "none", style: [styles$1.waitingOverlay, { backgroundColor: waitingOverlayColor }] }))] }, `${paywall.id}:${page.name ?? currentPageName}`));
3390
+ return (jsxRuntimeExports.jsx(View, { style: [styles$1.screen, { backgroundColor: bgColor }], pointerEvents: interactionEnabled ? 'auto' : 'none', children: isTelevision ? (pageContent) : (jsxRuntimeExports.jsx(Pressable, { style: styles$1.screen, onPress: () => Keyboard.dismiss(), accessible: false, children: pageContent })) }));
3384
3391
  };
3385
3392
  const styles$1 = StyleSheet.create({
3386
3393
  screen: { flex: 1 },