@insforge/react 1.1.1 → 1.1.2-dev.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.
- package/README.md +1 -1
- package/dist/atoms.cjs +3 -3
- package/dist/atoms.cjs.map +1 -1
- package/dist/atoms.d.cts +5 -3
- package/dist/atoms.d.ts +5 -3
- package/dist/atoms.js +3 -3
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +5 -5
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +3 -2
- package/dist/components.d.ts +3 -2
- package/dist/components.js +5 -5
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +3 -3
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +3 -3
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +62 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +63 -48
- package/dist/index.js.map +1 -1
- package/package.json +114 -114
package/dist/atoms.d.cts
CHANGED
|
@@ -56,12 +56,14 @@ interface AuthHeaderProps {
|
|
|
56
56
|
declare function AuthHeader({ title, subtitle }: AuthHeaderProps): react_jsx_runtime.JSX.Element;
|
|
57
57
|
|
|
58
58
|
interface AuthErrorBannerProps {
|
|
59
|
-
error
|
|
59
|
+
error: string;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Error message banner for authentication forms.
|
|
63
63
|
*/
|
|
64
|
-
declare function AuthErrorBanner({ error }:
|
|
64
|
+
declare function AuthErrorBanner({ error }: {
|
|
65
|
+
error?: string;
|
|
66
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
65
67
|
|
|
66
68
|
interface AuthFormFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
67
69
|
label: string;
|
|
@@ -249,4 +251,4 @@ interface AuthResetPasswordVerificationStepProps {
|
|
|
249
251
|
*/
|
|
250
252
|
declare function AuthResetPasswordVerificationStep({ email, method, onVerifyCode, onResendEmail, }: AuthResetPasswordVerificationStepProps): react_jsx_runtime.JSX.Element;
|
|
251
253
|
|
|
252
|
-
export { AuthBranding, AuthContainer, type AuthContainerProps, AuthDivider, type AuthDividerProps, AuthEmailVerificationStep,
|
|
254
|
+
export { AuthBranding, AuthContainer, type AuthContainerProps, AuthDivider, type AuthDividerProps, AuthEmailVerificationStep, AuthErrorBanner, type AuthErrorBannerProps, AuthFormField, type AuthFormFieldProps, AuthHeader, type AuthHeaderProps, AuthLink, type AuthLinkProps, AuthOAuthButton, type AuthOAuthButtonProps, AuthOAuthProviders, type AuthOAuthProvidersProps, AuthPasswordField, type AuthPasswordFieldProps, AuthPasswordStrengthIndicator, type AuthPasswordStrengthIndicatorProps, AuthResetPasswordVerificationStep, AuthSubmitButton, type AuthSubmitButtonProps, AuthVerificationCodeInput, type AuthVerificationCodeInputProps };
|
package/dist/atoms.d.ts
CHANGED
|
@@ -56,12 +56,14 @@ interface AuthHeaderProps {
|
|
|
56
56
|
declare function AuthHeader({ title, subtitle }: AuthHeaderProps): react_jsx_runtime.JSX.Element;
|
|
57
57
|
|
|
58
58
|
interface AuthErrorBannerProps {
|
|
59
|
-
error
|
|
59
|
+
error: string;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Error message banner for authentication forms.
|
|
63
63
|
*/
|
|
64
|
-
declare function AuthErrorBanner({ error }:
|
|
64
|
+
declare function AuthErrorBanner({ error }: {
|
|
65
|
+
error?: string;
|
|
66
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
65
67
|
|
|
66
68
|
interface AuthFormFieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
67
69
|
label: string;
|
|
@@ -249,4 +251,4 @@ interface AuthResetPasswordVerificationStepProps {
|
|
|
249
251
|
*/
|
|
250
252
|
declare function AuthResetPasswordVerificationStep({ email, method, onVerifyCode, onResendEmail, }: AuthResetPasswordVerificationStepProps): react_jsx_runtime.JSX.Element;
|
|
251
253
|
|
|
252
|
-
export { AuthBranding, AuthContainer, type AuthContainerProps, AuthDivider, type AuthDividerProps, AuthEmailVerificationStep,
|
|
254
|
+
export { AuthBranding, AuthContainer, type AuthContainerProps, AuthDivider, type AuthDividerProps, AuthEmailVerificationStep, AuthErrorBanner, type AuthErrorBannerProps, AuthFormField, type AuthFormFieldProps, AuthHeader, type AuthHeaderProps, AuthLink, type AuthLinkProps, AuthOAuthButton, type AuthOAuthButtonProps, AuthOAuthProviders, type AuthOAuthProvidersProps, AuthPasswordField, type AuthPasswordFieldProps, AuthPasswordStrengthIndicator, type AuthPasswordStrengthIndicatorProps, AuthResetPasswordVerificationStep, AuthSubmitButton, type AuthSubmitButtonProps, AuthVerificationCodeInput, type AuthVerificationCodeInputProps };
|
package/dist/atoms.js
CHANGED
|
@@ -3134,7 +3134,7 @@ function useInsforge() {
|
|
|
3134
3134
|
signOut: () => Promise.resolve(),
|
|
3135
3135
|
updateUser: () => Promise.resolve({ error: "SSR mode" }),
|
|
3136
3136
|
reloadAuth: () => Promise.resolve({ success: false, error: "SSR mode" }),
|
|
3137
|
-
|
|
3137
|
+
resendVerificationEmail: () => Promise.resolve(null),
|
|
3138
3138
|
sendResetPasswordEmail: () => Promise.resolve(null),
|
|
3139
3139
|
resetPassword: () => Promise.resolve(null),
|
|
3140
3140
|
verifyEmail: () => Promise.resolve({ error: "SSR mode" }),
|
|
@@ -3304,7 +3304,7 @@ function AuthEmailVerificationStep({
|
|
|
3304
3304
|
onVerifyCode,
|
|
3305
3305
|
emailSent = false
|
|
3306
3306
|
}) {
|
|
3307
|
-
const {
|
|
3307
|
+
const { resendVerificationEmail } = useInsforge();
|
|
3308
3308
|
const [resendDisabled, setResendDisabled] = useState(emailSent ? true : false);
|
|
3309
3309
|
const [resendCountdown, setResendCountdown] = useState(emailSent ? 60 : 0);
|
|
3310
3310
|
const [isSending, setIsSending] = useState(false);
|
|
@@ -3331,7 +3331,7 @@ function AuthEmailVerificationStep({
|
|
|
3331
3331
|
setResendCountdown(60);
|
|
3332
3332
|
setIsSending(true);
|
|
3333
3333
|
try {
|
|
3334
|
-
await
|
|
3334
|
+
await resendVerificationEmail(email);
|
|
3335
3335
|
} catch {
|
|
3336
3336
|
setResendDisabled(false);
|
|
3337
3337
|
setResendCountdown(0);
|