@sparkvault/sdk-js 8.8.1 → 8.8.2

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.
@@ -7962,8 +7962,12 @@ class DialogLauncher {
7962
7962
  if (this.settled)
7963
7963
  return;
7964
7964
  // Blocked (never opened) or closed (gone) - the popup can't be confirmed,
7965
- // so surface the warning so the user can reopen it.
7965
+ // so surface the warning so the user can reopen it. Either way the opener
7966
+ // observed the end with no result, so there is nothing for the next-load
7967
+ // self-heal to recover (a late success message still wins: this branch
7968
+ // leaves the flow unsettled, and onSuccess re-clears regardless).
7966
7969
  if (error instanceof PopupBlockedError || error instanceof UserCancelledError) {
7970
+ this.callbacks.onPopupClosedUnresolved?.();
7967
7971
  this.showAlert();
7968
7972
  return;
7969
7973
  }
@@ -8018,6 +8022,7 @@ class DialogLauncher {
8018
8022
  }
8019
8023
  /** "Try again": close any current popup and reopen a fresh one. */
8020
8024
  retry() {
8025
+ this.callbacks.onPopupReopened?.();
8021
8026
  this.hideAlert();
8022
8027
  this.closePopup();
8023
8028
  this.openPopup();
@@ -8660,6 +8665,11 @@ class IdentityModule {
8660
8665
  onSuccess: (result) => { this.clearSignInPending(); hostCallbacks.onSuccess(result); },
8661
8666
  onError: (error) => { this.clearSignInPending(); hostCallbacks.onError(error); },
8662
8667
  onCancel: () => { this.clearSignInPending(); hostCallbacks.onCancel(); },
8668
+ // Self-heal exists for a result the opener never observed. An observed
8669
+ // no-result end retires the marker (no spurious bounce on a reload
8670
+ // while the retry alert is up); "Try again" re-arms it.
8671
+ onPopupClosedUnresolved: () => this.clearSignInPending(),
8672
+ onPopupReopened: () => this.markSignInPending(),
8663
8673
  });
8664
8674
  this.launcher.start();
8665
8675
  return settledPromise;