@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/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?: string;
59
+ error: string;
60
60
  }
61
61
  /**
62
62
  * Error message banner for authentication forms.
63
63
  */
64
- declare function AuthErrorBanner({ error }: AuthErrorBannerProps): react_jsx_runtime.JSX.Element | null;
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, type AuthEmailVerificationStepProps, 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, type AuthResetPasswordVerificationStepProps, AuthSubmitButton, type AuthSubmitButtonProps, AuthVerificationCodeInput, type AuthVerificationCodeInputProps };
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?: string;
59
+ error: string;
60
60
  }
61
61
  /**
62
62
  * Error message banner for authentication forms.
63
63
  */
64
- declare function AuthErrorBanner({ error }: AuthErrorBannerProps): react_jsx_runtime.JSX.Element | null;
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, type AuthEmailVerificationStepProps, 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, type AuthResetPasswordVerificationStepProps, AuthSubmitButton, type AuthSubmitButtonProps, AuthVerificationCodeInput, type AuthVerificationCodeInputProps };
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
- sendVerificationEmail: () => Promise.resolve(null),
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 { sendVerificationEmail } = useInsforge();
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 sendVerificationEmail(email);
3334
+ await resendVerificationEmail(email);
3335
3335
  } catch {
3336
3336
  setResendDisabled(false);
3337
3337
  setResendCountdown(0);