@insforge/react 0.6.0 → 0.6.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/forms.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { OAuthProvidersSchema } from '@insforge/shared-schemas';
3
3
  import { FormEvent } from 'react';
4
4
  import { AuthConfig } from './types.js';
5
+ import '@insforge/shared';
5
6
 
6
7
  interface SignInFormProps {
7
8
  email: string;
package/dist/forms.js CHANGED
@@ -2,6 +2,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { AlertTriangle, EyeOff, Eye, Loader2, CircleCheck, Check } from 'lucide-react';
3
3
  import { createContext, useState, useEffect, useMemo, useCallback, useContext, useRef } from 'react';
4
4
  import '@insforge/sdk';
5
+ import { InsforgeContext } from '@insforge/shared/react';
5
6
 
6
7
  // src/components/atoms/AuthBranding.tsx
7
8
  function AuthBranding() {
@@ -623,8 +624,6 @@ function AuthVerificationCodeInput({
623
624
  index
624
625
  )) });
625
626
  }
626
- var InsforgeContext = createContext(void 0);
627
- InsforgeContext.displayName = "InsforgeContext";
628
627
  function useInsforge() {
629
628
  const context = useContext(InsforgeContext);
630
629
  if (!context) {
@@ -634,20 +633,18 @@ function useInsforge() {
634
633
  isSignedIn: false,
635
634
  setUser: () => {
636
635
  },
637
- signIn: async () => ({ error: "SSR mode" }),
638
- signUp: async () => ({ error: "SSR mode" }),
639
- signOut: async () => {
640
- },
641
- updateUser: async () => ({ error: "SSR mode" }),
642
- reloadAuth: async () => ({ success: false, error: "SSR mode" }),
643
- sendVerificationEmail: async () => null,
644
- sendResetPasswordEmail: async () => null,
645
- resetPassword: async () => null,
646
- verifyEmail: async () => null,
647
- exchangeResetPasswordToken: async () => ({ error: { message: "SSR mode" } }),
648
- loginWithOAuth: async () => {
649
- },
650
- getPublicAuthConfig: async () => null,
636
+ signIn: () => Promise.resolve({ error: "SSR mode" }),
637
+ signUp: () => Promise.resolve({ error: "SSR mode" }),
638
+ signOut: () => Promise.resolve(),
639
+ updateUser: () => Promise.resolve({ error: "SSR mode" }),
640
+ reloadAuth: () => Promise.resolve({ success: false, error: "SSR mode" }),
641
+ sendVerificationEmail: () => Promise.resolve(null),
642
+ sendResetPasswordEmail: () => Promise.resolve(null),
643
+ resetPassword: () => Promise.resolve(null),
644
+ verifyEmail: () => Promise.resolve(null),
645
+ exchangeResetPasswordToken: () => Promise.resolve({ error: { message: "SSR mode" } }),
646
+ loginWithOAuth: () => Promise.resolve(),
647
+ getPublicAuthConfig: () => Promise.resolve(null),
651
648
  baseUrl: "",
652
649
  afterSignInUrl: "/"
653
650
  };