@edgespark/web 0.0.4 → 0.0.6
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/auth/styles/styles.css +59 -2
- package/dist/auth/local-dev.d.ts +5 -0
- package/dist/auth-ui/ManagedAuthUI.d.ts +8 -0
- package/dist/auth-ui/config.d.ts +5 -0
- package/dist/auth-ui/types.d.ts +7 -0
- package/dist/index.cjs +32 -17
- package/dist/index.es.js +732 -602
- package/package.json +1 -1
package/auth/styles/styles.css
CHANGED
|
@@ -96,6 +96,40 @@
|
|
|
96
96
|
gap: 8px;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
.edgespark-auth__tabs {
|
|
100
|
+
display: grid;
|
|
101
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
102
|
+
gap: 4px;
|
|
103
|
+
min-height: 44px;
|
|
104
|
+
padding: 4px;
|
|
105
|
+
border: 1px solid var(--edgespark-auth-border);
|
|
106
|
+
border-radius: var(--edgespark-auth-radius-control);
|
|
107
|
+
background: var(--edgespark-auth-bg-muted);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.edgespark-auth__tab {
|
|
111
|
+
min-width: 0;
|
|
112
|
+
border: 0;
|
|
113
|
+
border-radius: calc(var(--edgespark-auth-radius-control) - 4px);
|
|
114
|
+
background: transparent;
|
|
115
|
+
color: var(--edgespark-auth-text-muted);
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
font: inherit;
|
|
118
|
+
font-size: 0.92rem;
|
|
119
|
+
font-weight: 600;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.edgespark-auth__tab--active {
|
|
123
|
+
background: var(--edgespark-auth-bg);
|
|
124
|
+
color: var(--edgespark-auth-text);
|
|
125
|
+
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.edgespark-auth__tab:disabled {
|
|
129
|
+
cursor: not-allowed;
|
|
130
|
+
opacity: 0.6;
|
|
131
|
+
}
|
|
132
|
+
|
|
99
133
|
.edgespark-auth__label {
|
|
100
134
|
font-size: 0.9rem;
|
|
101
135
|
font-weight: 600;
|
|
@@ -119,7 +153,8 @@
|
|
|
119
153
|
}
|
|
120
154
|
|
|
121
155
|
.edgespark-auth__button,
|
|
122
|
-
.edgespark-auth__link
|
|
156
|
+
.edgespark-auth__link,
|
|
157
|
+
.edgespark-auth__text-action {
|
|
123
158
|
font: inherit;
|
|
124
159
|
}
|
|
125
160
|
|
|
@@ -136,7 +171,8 @@
|
|
|
136
171
|
}
|
|
137
172
|
|
|
138
173
|
.edgespark-auth__button:disabled,
|
|
139
|
-
.edgespark-auth__link:disabled
|
|
174
|
+
.edgespark-auth__link:disabled,
|
|
175
|
+
.edgespark-auth__text-action:disabled {
|
|
140
176
|
cursor: not-allowed;
|
|
141
177
|
opacity: 0.6;
|
|
142
178
|
}
|
|
@@ -174,6 +210,27 @@
|
|
|
174
210
|
cursor: pointer;
|
|
175
211
|
}
|
|
176
212
|
|
|
213
|
+
.edgespark-auth__text-action {
|
|
214
|
+
justify-self: center;
|
|
215
|
+
padding: 2px 4px;
|
|
216
|
+
border: 0;
|
|
217
|
+
background: transparent;
|
|
218
|
+
color: var(--edgespark-auth-primary);
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
font-size: 0.95rem;
|
|
221
|
+
font-weight: 600;
|
|
222
|
+
line-height: 1.4;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.edgespark-auth__text-action:hover:not(:disabled) {
|
|
226
|
+
color: var(--edgespark-auth-primary-hover);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.edgespark-auth__text-action:disabled {
|
|
230
|
+
color: var(--edgespark-auth-text-muted);
|
|
231
|
+
opacity: 1;
|
|
232
|
+
}
|
|
233
|
+
|
|
177
234
|
.edgespark-auth__divider {
|
|
178
235
|
position: relative;
|
|
179
236
|
text-align: center;
|
package/dist/auth/local-dev.d.ts
CHANGED
|
@@ -29,3 +29,8 @@ export declare function autoVerifyLocalDev(email: string): Promise<boolean>;
|
|
|
29
29
|
* Returns the OTP string or null if not available.
|
|
30
30
|
*/
|
|
31
31
|
export declare function fetchOtpLocalDev(email: string): Promise<string | null>;
|
|
32
|
+
/**
|
|
33
|
+
* Fetch the pending OTP for email sign-in in local dev.
|
|
34
|
+
* Returns the OTP string or null if not available.
|
|
35
|
+
*/
|
|
36
|
+
export declare function fetchSignInOtpLocalDev(email: string): Promise<string | null>;
|
|
@@ -52,6 +52,9 @@ export declare class ManagedAuthUI implements MountedAuthUI {
|
|
|
52
52
|
private bindDOM;
|
|
53
53
|
private switchView;
|
|
54
54
|
private handleSignIn;
|
|
55
|
+
private handleEmailOtpSignIn;
|
|
56
|
+
private sendSignInOtp;
|
|
57
|
+
private resendSignInCode;
|
|
55
58
|
private handleSignUp;
|
|
56
59
|
private handleOAuthSignIn;
|
|
57
60
|
private handleForgotPassword;
|
|
@@ -80,11 +83,16 @@ export declare class ManagedAuthUI implements MountedAuthUI {
|
|
|
80
83
|
private getManagedReturnURL;
|
|
81
84
|
private consumeManagedReturnContext;
|
|
82
85
|
private startCountdown;
|
|
86
|
+
private updateCountdownControls;
|
|
83
87
|
private clearCountdown;
|
|
84
88
|
private captureFocusSnapshot;
|
|
85
89
|
private scheduleFocusRestore;
|
|
86
90
|
private clearFocusRestoreTimer;
|
|
87
91
|
private passwordResetEndpoints;
|
|
92
|
+
private emailOtpSignInEndpoints;
|
|
93
|
+
private resolveInitialSignInMethod;
|
|
94
|
+
private setSignInMethod;
|
|
95
|
+
private canUseEmailOtpSignIn;
|
|
88
96
|
private extractRedirectURL;
|
|
89
97
|
private extractUser;
|
|
90
98
|
private canUsePasswordResetEmailOtp;
|
package/dist/auth-ui/config.d.ts
CHANGED
|
@@ -19,9 +19,13 @@ interface ProviderEmailPassword {
|
|
|
19
19
|
requirePasswordResetEmailVerification?: boolean;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
interface ProviderEmailOtp {
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
}
|
|
22
25
|
interface AuthConfigResponse {
|
|
23
26
|
disableSignUp?: boolean;
|
|
24
27
|
providerEmailPassword?: ProviderEmailPassword;
|
|
28
|
+
providerEmailOtp?: ProviderEmailOtp;
|
|
25
29
|
providerGoogle?: OAuthProviderBlock;
|
|
26
30
|
providerApple?: OAuthProviderBlock;
|
|
27
31
|
providerMicrosoft?: OAuthProviderBlock;
|
|
@@ -32,6 +36,7 @@ interface AuthConfigResponse {
|
|
|
32
36
|
export interface NormalizedAuthUIConfig {
|
|
33
37
|
disableSignUp: boolean;
|
|
34
38
|
emailPasswordEnabled: boolean;
|
|
39
|
+
emailOtpSignInEnabled: boolean;
|
|
35
40
|
minPasswordLength: number;
|
|
36
41
|
requireEmailVerification: boolean;
|
|
37
42
|
passwordResetEmailOtpEnabled: boolean;
|
package/dist/auth-ui/types.d.ts
CHANGED
|
@@ -40,7 +40,14 @@ export interface AuthUILabels {
|
|
|
40
40
|
subtitle: string;
|
|
41
41
|
emailLabel: string;
|
|
42
42
|
passwordLabel: string;
|
|
43
|
+
codeLabel?: string;
|
|
43
44
|
submitButton: string;
|
|
45
|
+
sendCodeButton?: string;
|
|
46
|
+
verifyCodeButton?: string;
|
|
47
|
+
resendCodeButton?: string;
|
|
48
|
+
resendCountdown?: string;
|
|
49
|
+
passwordTab?: string;
|
|
50
|
+
codeTab?: string;
|
|
44
51
|
forgotPassword: string;
|
|
45
52
|
switchToSignUp: string;
|
|
46
53
|
signUpPrompt: string;
|