rampkit-expo-dev 0.0.78 → 0.0.79
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/build/RampkitOverlay.js +11 -17
- package/package.json +1 -1
package/build/RampkitOverlay.js
CHANGED
|
@@ -1716,7 +1716,14 @@ function Overlay(props) {
|
|
|
1716
1716
|
},
|
|
1717
1717
|
],
|
|
1718
1718
|
// Only the active screen receives touch events
|
|
1719
|
-
pointerEvents: i === index ? 'auto' : 'none', children: (0, jsx_runtime_1.jsx)(react_native_webview_1.WebView, { ref: (r) => (webviewsRef.current[i] = r), style: { width: windowWidth, height: windowHeight }, originWhitelist: ["*"], source: { html: doc }, injectedJavaScriptBeforeContentLoaded:
|
|
1719
|
+
pointerEvents: i === index ? 'auto' : 'none', children: (0, jsx_runtime_1.jsx)(react_native_webview_1.WebView, { ref: (r) => (webviewsRef.current[i] = r), style: { width: windowWidth, height: windowHeight }, originWhitelist: ["*"], source: { html: doc }, injectedJavaScriptBeforeContentLoaded:
|
|
1720
|
+
// CRITICAL: Set visibility flag BEFORE content loads (matches iOS SDK behavior)
|
|
1721
|
+
// Only screen 0 starts as visible, others start hidden.
|
|
1722
|
+
// This prevents review/notification requests from firing on inactive screens at startup.
|
|
1723
|
+
`window.__rampkitScreenVisible = ${i === 0};
|
|
1724
|
+
window.__rampkitScreenIndex = ${i};
|
|
1725
|
+
console.log('[RampKit] Screen ${i} visibility initialized: ' + (${i === 0} ? 'ACTIVE' : 'INACTIVE'));
|
|
1726
|
+
` + exports.injectedHardening + exports.injectedDynamicTapHandler + exports.injectedButtonAnimations, injectedJavaScript: exports.injectedNoSelect + exports.injectedVarsHandler + exports.injectedButtonAnimations, automaticallyAdjustContentInsets: false, contentInsetAdjustmentBehavior: "never", bounces: false, scrollEnabled: false, overScrollMode: "never", scalesPageToFit: false, showsHorizontalScrollIndicator: false, dataDetectorTypes: "none", allowsLinkPreview: false, allowsInlineMediaPlayback: true, mediaPlaybackRequiresUserAction: false, cacheEnabled: true, javaScriptEnabled: true, domStorageEnabled: true, hideKeyboardAccessoryView: true, onLoadEnd: () => {
|
|
1720
1727
|
// Only initialize each screen ONCE to avoid repeated processing
|
|
1721
1728
|
if (initializedScreensRef.current.has(i)) {
|
|
1722
1729
|
if (__DEV__)
|
|
@@ -1745,25 +1752,12 @@ function Overlay(props) {
|
|
|
1745
1752
|
// By sending state to all screens upfront, the DOM is already in its final state
|
|
1746
1753
|
// before any navigation occurs.
|
|
1747
1754
|
sendOnboardingStateToWebView(i);
|
|
1748
|
-
//
|
|
1749
|
-
//
|
|
1750
|
-
//
|
|
1755
|
+
// Visibility flag is already set in injectedJavaScriptBeforeContentLoaded.
|
|
1756
|
+
// For screen 0, dispatch the activation event and process any pending actions.
|
|
1757
|
+
// Other screens will be activated when navigated to.
|
|
1751
1758
|
if (i === 0) {
|
|
1752
|
-
// First screen is immediately active
|
|
1753
1759
|
activateScreen(i);
|
|
1754
1760
|
}
|
|
1755
|
-
else {
|
|
1756
|
-
// Other screens start inactive - inject the flag but don't dispatch event
|
|
1757
|
-
const wv = webviewsRef.current[i];
|
|
1758
|
-
if (wv) {
|
|
1759
|
-
// @ts-ignore: injectJavaScript exists on WebView instance
|
|
1760
|
-
wv.injectJavaScript(`(function() {
|
|
1761
|
-
window.__rampkitScreenVisible = false;
|
|
1762
|
-
window.__rampkitScreenIndex = ${i};
|
|
1763
|
-
console.log('🔒 Screen ${i} loaded but INACTIVE');
|
|
1764
|
-
})();`);
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
1761
|
}, onMessage: (ev) => {
|
|
1768
1762
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1769
1763
|
const raw = ev.nativeEvent.data;
|
package/package.json
CHANGED