@marianmeres/stuic 3.76.4 → 3.76.5

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.
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  --stuic-email-verify-form-gap: 1rem;
3
- --stuic-email-verify-form-subheading-color: var(--stuic-color-muted-foreground);
3
+ --stuic-email-verify-form-subheading-color: var(--stuic-color-foreground);
4
4
  --stuic-email-verify-form-attempts-color: var(--stuic-color-muted-foreground);
5
5
  --stuic-email-verify-form-resend-color: var(--stuic-color-muted-foreground);
6
6
  --stuic-email-verify-form-resend-flash-color: var(--stuic-color-primary);
@@ -21,6 +21,7 @@
21
21
  margin: 0;
22
22
  color: var(--stuic-email-verify-form-subheading-color);
23
23
  font-size: var(--text-sm);
24
+ text-align: center;
24
25
  }
25
26
 
26
27
  .stuic-email-verify-form-otp {
@@ -168,6 +168,20 @@
168
168
  export function close() {
169
169
  modal.close();
170
170
  }
171
+
172
+ // Reset terminal `verify` state when the modal *closes* — otherwise a
173
+ // register → OTP → logout → re-open cycle resumes on the stale 6-digit-code
174
+ // screen. Keyed on the visible: true → false transition (not a static
175
+ // `!visible && mode==="verify"` test) so consumers can still programmatically
176
+ // open the modal in verify mode by setting `mode = "verify"` before `open()`.
177
+ let _wasVisible = false;
178
+ $effect(() => {
179
+ if (_wasVisible && !visible && mode === "verify") {
180
+ mode = "login";
181
+ verifyEmail = "";
182
+ }
183
+ _wasVisible = visible;
184
+ });
171
185
  </script>
172
186
 
173
187
  {#if trigger}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "3.76.4",
3
+ "version": "3.76.5",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",