@sparkvault/sdk-js 8.8.1 → 8.8.3
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/products/identity/dialog-launcher.d.ts +10 -0
- package/dist/sparkvault.cjs.js +16 -8
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +16 -8
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
|
@@ -28,6 +28,16 @@ interface LauncherCallbacks {
|
|
|
28
28
|
onSuccess: (result: VerifyResult) => void;
|
|
29
29
|
onError: (error: Error) => void;
|
|
30
30
|
onCancel: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* The opener OBSERVED the popup end with no result (window closed, or it
|
|
33
|
+
* never opened) while the retry alert keeps the flow alive. There is no lost
|
|
34
|
+
* result to self-heal, so the owner retires its pending sign-in marker —
|
|
35
|
+
* without this, a reload while the alert is up fires a spurious recovery
|
|
36
|
+
* bounce. Deliberately NOT onCancel: the flow is unsettled, retry may follow.
|
|
37
|
+
*/
|
|
38
|
+
onPopupClosedUnresolved?: () => void;
|
|
39
|
+
/** "Try again" opened a fresh popup: a sign-in is in flight again, re-arm. */
|
|
40
|
+
onPopupReopened?: () => void;
|
|
31
41
|
}
|
|
32
42
|
/**
|
|
33
43
|
* Opens the sign-in popup for dialog-mode `verify()` and bridges its result
|
package/dist/sparkvault.cjs.js
CHANGED
|
@@ -2487,13 +2487,6 @@ function getStyles(options) {
|
|
|
2487
2487
|
text-align: left;
|
|
2488
2488
|
padding: 15px 40px 15px 14px;
|
|
2489
2489
|
margin-bottom: 9px;
|
|
2490
|
-
/* Inset 2px on either side so the focus ring (drawn outside the
|
|
2491
|
-
border-box) has room to render without clipping against the
|
|
2492
|
-
dialog's container edges. width:auto pairs with this to prevent
|
|
2493
|
-
the row from forcing horizontal overflow. */
|
|
2494
|
-
margin-left: 2px;
|
|
2495
|
-
margin-right: 2px;
|
|
2496
|
-
width: calc(100% - 4px);
|
|
2497
2490
|
transition: background var(--sv-dur-fast) var(--sv-ease-standard), border-color var(--sv-dur-fast) var(--sv-ease-standard);
|
|
2498
2491
|
}
|
|
2499
2492
|
|
|
@@ -3450,6 +3443,11 @@ function getStyles(options) {
|
|
|
3450
3443
|
min-height: 0;
|
|
3451
3444
|
padding-left: 0;
|
|
3452
3445
|
padding-right: 0;
|
|
3446
|
+
/* The host page owns the scroll and the surrounding padding in bare
|
|
3447
|
+
mode, so this body never scrolls internally. Keep overflow visible
|
|
3448
|
+
so a focused control's ring paints into the host padding instead of
|
|
3449
|
+
being clipped flat against this edgeless body's sides. */
|
|
3450
|
+
overflow: visible;
|
|
3453
3451
|
}
|
|
3454
3452
|
|
|
3455
3453
|
/* ========================================
|
|
@@ -7966,8 +7964,12 @@ class DialogLauncher {
|
|
|
7966
7964
|
if (this.settled)
|
|
7967
7965
|
return;
|
|
7968
7966
|
// Blocked (never opened) or closed (gone) - the popup can't be confirmed,
|
|
7969
|
-
// so surface the warning so the user can reopen it.
|
|
7967
|
+
// so surface the warning so the user can reopen it. Either way the opener
|
|
7968
|
+
// observed the end with no result, so there is nothing for the next-load
|
|
7969
|
+
// self-heal to recover (a late success message still wins: this branch
|
|
7970
|
+
// leaves the flow unsettled, and onSuccess re-clears regardless).
|
|
7970
7971
|
if (error instanceof PopupBlockedError || error instanceof UserCancelledError) {
|
|
7972
|
+
this.callbacks.onPopupClosedUnresolved?.();
|
|
7971
7973
|
this.showAlert();
|
|
7972
7974
|
return;
|
|
7973
7975
|
}
|
|
@@ -8022,6 +8024,7 @@ class DialogLauncher {
|
|
|
8022
8024
|
}
|
|
8023
8025
|
/** "Try again": close any current popup and reopen a fresh one. */
|
|
8024
8026
|
retry() {
|
|
8027
|
+
this.callbacks.onPopupReopened?.();
|
|
8025
8028
|
this.hideAlert();
|
|
8026
8029
|
this.closePopup();
|
|
8027
8030
|
this.openPopup();
|
|
@@ -8664,6 +8667,11 @@ class IdentityModule {
|
|
|
8664
8667
|
onSuccess: (result) => { this.clearSignInPending(); hostCallbacks.onSuccess(result); },
|
|
8665
8668
|
onError: (error) => { this.clearSignInPending(); hostCallbacks.onError(error); },
|
|
8666
8669
|
onCancel: () => { this.clearSignInPending(); hostCallbacks.onCancel(); },
|
|
8670
|
+
// Self-heal exists for a result the opener never observed. An observed
|
|
8671
|
+
// no-result end retires the marker (no spurious bounce on a reload
|
|
8672
|
+
// while the retry alert is up); "Try again" re-arms it.
|
|
8673
|
+
onPopupClosedUnresolved: () => this.clearSignInPending(),
|
|
8674
|
+
onPopupReopened: () => this.markSignInPending(),
|
|
8667
8675
|
});
|
|
8668
8676
|
this.launcher.start();
|
|
8669
8677
|
return settledPromise;
|