@namiml/expo-sdk 3.4.12-dev.202609290126 → 3.4.12-dev.202609300314
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.cjs +18 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +18 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/NamiView.tsx +3 -2
- package/src/components/PaywallScreen.tsx +12 -8
- package/src/context/PaywallContext.tsx +4 -0
package/dist/index.cjs
CHANGED
|
@@ -1936,6 +1936,9 @@ const PaywallProvider = ({ paywall, context, campaign, flow, onFirstFocusReady,
|
|
|
1936
1936
|
setSafeAreaTop: (top) => {
|
|
1937
1937
|
providerRef.current?.setSafeAreaTop(top);
|
|
1938
1938
|
},
|
|
1939
|
+
setSafeAreaBottom: (bottom) => {
|
|
1940
|
+
providerRef.current?.setSafeAreaBottom(bottom);
|
|
1941
|
+
},
|
|
1939
1942
|
setFullScreenPresentation: (full) => {
|
|
1940
1943
|
providerRef.current?.setFullScreenPresentation(full);
|
|
1941
1944
|
},
|
|
@@ -3462,17 +3465,21 @@ const PaywallScreen = ({ paywall, onClose, onCommitted, holdInteractionUntilFocu
|
|
|
3462
3465
|
const ctx = usePaywallContext();
|
|
3463
3466
|
const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
3464
3467
|
const focusReadyCtx = useFirstFocusReadyContext();
|
|
3465
|
-
// Push the measured top safe-area
|
|
3466
|
-
// position chrome via ${state.safeAreaTop} (e.g. header
|
|
3467
|
-
// background topMargin)
|
|
3468
|
-
//
|
|
3469
|
-
//
|
|
3470
|
-
// the
|
|
3471
|
-
//
|
|
3472
|
-
//
|
|
3468
|
+
// Push the measured top and bottom safe-area insets into paywall state so
|
|
3469
|
+
// templates can position chrome via ${state.safeAreaTop} (e.g. header
|
|
3470
|
+
// topPadding, background topMargin) and ${state.safeAreaBottom} (e.g. a
|
|
3471
|
+
// footer clear of the home indicator / gesture bar). Mirrors the native
|
|
3472
|
+
// renderers, which measure the insets and set the same state. The full-bleed
|
|
3473
|
+
// root lets the background extend under the system bars and nothing pads the
|
|
3474
|
+
// footer, so the token is the only bottom offset — no double-padding.
|
|
3475
|
+
// Depend only on the inset values (stable per device/orientation) —
|
|
3476
|
+
// depending on ctx would re-run every render and loop through setState.
|
|
3473
3477
|
require$$0.useEffect(() => {
|
|
3474
3478
|
ctx.setSafeAreaTop(insets.top);
|
|
3475
3479
|
}, [insets.top]);
|
|
3480
|
+
require$$0.useEffect(() => {
|
|
3481
|
+
ctx.setSafeAreaBottom(insets.bottom);
|
|
3482
|
+
}, [insets.bottom]);
|
|
3476
3483
|
const scaleFactor = sdkCore.getDeviceScaleFactor(ctx.state.formFactor);
|
|
3477
3484
|
const userInteractionEnabled = ctx.state.userInteractionEnabled !== false;
|
|
3478
3485
|
const currentPageName = ctx.state.selectedPaywall === paywall
|
|
@@ -4103,8 +4110,9 @@ const NamiView = ({ placement, url, onClose, onSignIn, onDeepLink, onPurchase, o
|
|
|
4103
4110
|
}
|
|
4104
4111
|
return (
|
|
4105
4112
|
// Full-bleed root so the paywall background extends under the status bar and
|
|
4106
|
-
// home indicator (edge-to-edge). Safe-area insets
|
|
4107
|
-
//
|
|
4113
|
+
// home indicator (edge-to-edge). Safe-area insets reach only the chrome:
|
|
4114
|
+
// PaywallScreen pushes them into ${state.safeArea*} for templates to
|
|
4115
|
+
// offset the header/footer, rather than insetting the whole tree — the
|
|
4108
4116
|
// previous core SafeAreaView inset every edge and let the #000 root show
|
|
4109
4117
|
// through as letterbox bands. SafeAreaProvider guarantees an inset context
|
|
4110
4118
|
// even if the host app didn't mount one (nested providers are supported).
|