rampkit-expo-dev 0.0.103 → 0.0.104
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 +24 -0
- package/package.json +1 -1
package/build/RampkitOverlay.js
CHANGED
|
@@ -2063,6 +2063,10 @@ function Overlay(props) {
|
|
|
2063
2063
|
}
|
|
2064
2064
|
// 5) Onboarding finished event from page
|
|
2065
2065
|
if ((data === null || data === void 0 ? void 0 : data.type) === "rampkit:onboarding-finished") {
|
|
2066
|
+
// Only process from active screen to prevent duplicate events
|
|
2067
|
+
if (!isScreenActive(i)) {
|
|
2068
|
+
return;
|
|
2069
|
+
}
|
|
2066
2070
|
setOnboardingCompleted(true);
|
|
2067
2071
|
try {
|
|
2068
2072
|
(_a = props.onOnboardingFinished) === null || _a === void 0 ? void 0 : _a.call(props, data === null || data === void 0 ? void 0 : data.payload);
|
|
@@ -2073,6 +2077,10 @@ function Overlay(props) {
|
|
|
2073
2077
|
}
|
|
2074
2078
|
// 6) Request to show paywall
|
|
2075
2079
|
if ((data === null || data === void 0 ? void 0 : data.type) === "rampkit:show-paywall") {
|
|
2080
|
+
// Only process from active screen to prevent duplicate events
|
|
2081
|
+
if (!isScreenActive(i)) {
|
|
2082
|
+
return;
|
|
2083
|
+
}
|
|
2076
2084
|
try {
|
|
2077
2085
|
(_b = props.onShowPaywall) === null || _b === void 0 ? void 0 : _b.call(props, data === null || data === void 0 ? void 0 : data.payload);
|
|
2078
2086
|
}
|
|
@@ -2120,6 +2128,10 @@ function Overlay(props) {
|
|
|
2120
2128
|
return;
|
|
2121
2129
|
}
|
|
2122
2130
|
if ((data === null || data === void 0 ? void 0 : data.type) === "rampkit:close") {
|
|
2131
|
+
// Only process from active screen to prevent duplicate events
|
|
2132
|
+
if (!isScreenActive(i)) {
|
|
2133
|
+
return;
|
|
2134
|
+
}
|
|
2123
2135
|
// Track close action for onboarding completion
|
|
2124
2136
|
try {
|
|
2125
2137
|
(_c = props.onCloseAction) === null || _c === void 0 ? void 0 : _c.call(props, i, ((_d = props.screens[i]) === null || _d === void 0 ? void 0 : _d.id) || "");
|
|
@@ -2170,6 +2182,10 @@ function Overlay(props) {
|
|
|
2170
2182
|
return;
|
|
2171
2183
|
}
|
|
2172
2184
|
if (raw === "rampkit:onboarding-finished") {
|
|
2185
|
+
// Only process from active screen to prevent duplicate events
|
|
2186
|
+
if (!isScreenActive(i)) {
|
|
2187
|
+
return;
|
|
2188
|
+
}
|
|
2173
2189
|
setOnboardingCompleted(true);
|
|
2174
2190
|
try {
|
|
2175
2191
|
(_e = props.onOnboardingFinished) === null || _e === void 0 ? void 0 : _e.call(props, undefined);
|
|
@@ -2179,6 +2195,10 @@ function Overlay(props) {
|
|
|
2179
2195
|
return;
|
|
2180
2196
|
}
|
|
2181
2197
|
if (raw === "rampkit:show-paywall") {
|
|
2198
|
+
// Only process from active screen to prevent duplicate events
|
|
2199
|
+
if (!isScreenActive(i)) {
|
|
2200
|
+
return;
|
|
2201
|
+
}
|
|
2182
2202
|
try {
|
|
2183
2203
|
(_f = props.onShowPaywall) === null || _f === void 0 ? void 0 : _f.call(props);
|
|
2184
2204
|
}
|
|
@@ -2217,6 +2237,10 @@ function Overlay(props) {
|
|
|
2217
2237
|
return;
|
|
2218
2238
|
}
|
|
2219
2239
|
if (raw === "rampkit:close") {
|
|
2240
|
+
// Only process from active screen to prevent duplicate events
|
|
2241
|
+
if (!isScreenActive(i)) {
|
|
2242
|
+
return;
|
|
2243
|
+
}
|
|
2220
2244
|
// Track close action for onboarding completion
|
|
2221
2245
|
try {
|
|
2222
2246
|
(_g = props.onCloseAction) === null || _g === void 0 ? void 0 : _g.call(props, i, ((_h = props.screens[i]) === null || _h === void 0 ? void 0 : _h.id) || "");
|
package/package.json
CHANGED