rampkit-expo-dev 0.0.34 → 0.0.35

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.
@@ -777,16 +777,14 @@ function Overlay(props) {
777
777
  if (__DEV__)
778
778
  console.log("[Rampkit] received variables from page", i, data.vars);
779
779
  // Check if this page is within the stale value window
780
- // (we recently sent vars to it and it's echoing back defaults)
780
+ // (we recently sent vars to it and it may be echoing back defaults)
781
781
  const now = Date.now();
782
782
  const lastSendTime = lastVarsSendTimeRef.current[i] || 0;
783
783
  const timeSinceSend = now - lastSendTime;
784
784
  const isWithinStaleWindow = timeSinceSend < STALE_VALUE_WINDOW_MS;
785
- const isActiveScreen = i === index;
786
785
  if (__DEV__) {
787
786
  console.log("[Rampkit] stale check:", {
788
787
  pageIndex: i,
789
- isActiveScreen,
790
788
  isWithinStaleWindow,
791
789
  timeSinceSend,
792
790
  });
@@ -797,12 +795,11 @@ function Overlay(props) {
797
795
  const hasHostVal = Object.prototype.hasOwnProperty.call(varsRef.current, key);
798
796
  const hostVal = varsRef.current[key];
799
797
  // Stale value filtering (matches iOS SDK behavior):
800
- // If we're within the stale window AND this is NOT the active screen,
801
- // don't let empty/default values overwrite existing host values.
802
- // This prevents preloaded pages from clobbering user input with cached defaults.
803
- if (isWithinStaleWindow && !isActiveScreen && hasHostVal) {
804
- // If host has a non-empty value and page is sending empty/default,
805
- // keep the host value (don't overwrite with stale data)
798
+ // If we're within the stale window, don't let empty/default values
799
+ // overwrite existing non-empty host values.
800
+ // This prevents pages from clobbering user input with cached defaults
801
+ // when they first become active/visible.
802
+ if (isWithinStaleWindow && hasHostVal) {
806
803
  const hostIsNonEmpty = hostVal !== "" && hostVal !== null && hostVal !== undefined;
807
804
  const incomingIsEmpty = value === "" || value === null || value === undefined;
808
805
  if (hostIsNonEmpty && incomingIsEmpty) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rampkit-expo-dev",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "The Expo SDK for RampKit. Build, test, and personalize app onboardings with instant updates.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",