@insforge/react 0.5.8 → 0.5.10

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/index.d.cts CHANGED
@@ -115,7 +115,8 @@ interface InsforgeProviderProps {
115
115
  * </InsforgeProvider>
116
116
  * ```
117
117
  */
118
- declare function InsforgeProvider({ children, baseUrl, afterSignInUrl, onAuthChange, onSignIn, onSignOut, }: InsforgeProviderProps): react_jsx_runtime.JSX.Element;
118
+ declare function InsforgeProviderCore({ children, baseUrl, afterSignInUrl, onAuthChange, onSignIn, onSignOut, }: InsforgeProviderProps): react_jsx_runtime.JSX.Element;
119
+ declare function InsforgeProvider(props: InsforgeProviderProps): react_jsx_runtime.JSX.Element;
119
120
  /**
120
121
  * Hook to access Insforge context
121
122
  *
@@ -147,4 +148,4 @@ declare function getProviderConfig(provider: OAuthProvider): OAuthProviderConfig
147
148
  */
148
149
  declare function getAllProviderConfigs(): Partial<Record<OAuthProvider, OAuthProviderConfig>>;
149
150
 
150
- export { InsforgeProvider, type InsforgeProviderProps, InsforgeUser, OAUTH_PROVIDER_CONFIG, OAuthProvider, OAuthProviderConfig, getAllProviderConfigs, getProviderConfig, useInsforge };
151
+ export { InsforgeProvider, InsforgeProviderCore, type InsforgeProviderProps, InsforgeUser, OAUTH_PROVIDER_CONFIG, OAuthProvider, OAuthProviderConfig, getAllProviderConfigs, getProviderConfig, useInsforge };
package/dist/index.d.ts CHANGED
@@ -115,7 +115,8 @@ interface InsforgeProviderProps {
115
115
  * </InsforgeProvider>
116
116
  * ```
117
117
  */
118
- declare function InsforgeProvider({ children, baseUrl, afterSignInUrl, onAuthChange, onSignIn, onSignOut, }: InsforgeProviderProps): react_jsx_runtime.JSX.Element;
118
+ declare function InsforgeProviderCore({ children, baseUrl, afterSignInUrl, onAuthChange, onSignIn, onSignOut, }: InsforgeProviderProps): react_jsx_runtime.JSX.Element;
119
+ declare function InsforgeProvider(props: InsforgeProviderProps): react_jsx_runtime.JSX.Element;
119
120
  /**
120
121
  * Hook to access Insforge context
121
122
  *
@@ -147,4 +148,4 @@ declare function getProviderConfig(provider: OAuthProvider): OAuthProviderConfig
147
148
  */
148
149
  declare function getAllProviderConfigs(): Partial<Record<OAuthProvider, OAuthProviderConfig>>;
149
150
 
150
- export { InsforgeProvider, type InsforgeProviderProps, InsforgeUser, OAUTH_PROVIDER_CONFIG, OAuthProvider, OAuthProviderConfig, getAllProviderConfigs, getProviderConfig, useInsforge };
151
+ export { InsforgeProvider, InsforgeProviderCore, type InsforgeProviderProps, InsforgeUser, OAUTH_PROVIDER_CONFIG, OAuthProvider, OAuthProviderConfig, getAllProviderConfigs, getProviderConfig, useInsforge };
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ function useSearchParams() {
63
63
  return adapter.useSearchParams();
64
64
  }
65
65
  var InsforgeContext = createContext(void 0);
66
- function InsforgeProvider({
66
+ function InsforgeProviderCore({
67
67
  children,
68
68
  baseUrl,
69
69
  afterSignInUrl = "/",
@@ -392,7 +392,7 @@ function InsforgeProvider({
392
392
  },
393
393
  [insforge, afterSignInUrl]
394
394
  );
395
- return /* @__PURE__ */ jsx(NavigationProvider, { adapter: BrowserNavigationAdapter, children: /* @__PURE__ */ jsx(
395
+ return /* @__PURE__ */ jsx(
396
396
  InsforgeContext.Provider,
397
397
  {
398
398
  value: {
@@ -417,7 +417,10 @@ function InsforgeProvider({
417
417
  },
418
418
  children
419
419
  }
420
- ) });
420
+ );
421
+ }
422
+ function InsforgeProvider(props) {
423
+ return /* @__PURE__ */ jsx(NavigationProvider, { adapter: BrowserNavigationAdapter, children: /* @__PURE__ */ jsx(InsforgeProviderCore, { ...props }) });
421
424
  }
422
425
  function useInsforge() {
423
426
  const context = useContext(InsforgeContext);
@@ -1079,7 +1082,7 @@ function AuthEmailVerificationStep({
1079
1082
  emailSent = false
1080
1083
  }) {
1081
1084
  const { sendVerificationEmail } = useInsforge();
1082
- const [resendDisabled, setResendDisabled] = useState(true);
1085
+ const [resendDisabled, setResendDisabled] = useState(emailSent ? true : false);
1083
1086
  const [resendCountdown, setResendCountdown] = useState(emailSent ? 60 : 0);
1084
1087
  const [isSending, setIsSending] = useState(false);
1085
1088
  const [verificationCode, setVerificationCode] = useState("");
@@ -2512,6 +2515,6 @@ function useUser() {
2512
2515
  return { user, isLoaded, updateUser, setUser };
2513
2516
  }
2514
2517
 
2515
- export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, BrowserNavigationAdapter, ForgotPassword, ForgotPasswordForm, InsforgeProvider, NavigationProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInButton, SignInForm, SignUp, SignUpButton, SignUpForm, SignedIn, SignedOut, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getProviderConfig, passwordSchema, resolveAuthPath, resolveAuthUrl, useAuth, useInsforge, useNavigationAdapter, usePublicAuthConfig, useSearchParams, useUser, validateEmail, validatePassword };
2518
+ export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, BrowserNavigationAdapter, ForgotPassword, ForgotPasswordForm, InsforgeProvider, InsforgeProviderCore, NavigationProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInButton, SignInForm, SignUp, SignUpButton, SignUpForm, SignedIn, SignedOut, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getProviderConfig, passwordSchema, resolveAuthPath, resolveAuthUrl, useAuth, useInsforge, useNavigationAdapter, usePublicAuthConfig, useSearchParams, useUser, validateEmail, validatePassword };
2516
2519
  //# sourceMappingURL=index.js.map
2517
2520
  //# sourceMappingURL=index.js.map