@insforge/react 0.5.11 → 0.6.1

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.cts 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.cjs';
5
+ import '@insforge/shared';
5
6
 
6
7
  interface SignInFormProps {
7
8
  email: string;
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,7 +624,6 @@ function AuthVerificationCodeInput({
623
624
  index
624
625
  )) });
625
626
  }
626
- var InsforgeContext = createContext(void 0);
627
627
  function useInsforge() {
628
628
  const context = useContext(InsforgeContext);
629
629
  if (!context) {
@@ -633,20 +633,18 @@ function useInsforge() {
633
633
  isSignedIn: false,
634
634
  setUser: () => {
635
635
  },
636
- signIn: async () => ({ error: "SSR mode" }),
637
- signUp: async () => ({ error: "SSR mode" }),
638
- signOut: async () => {
639
- },
640
- updateUser: async () => ({ error: "SSR mode" }),
641
- reloadAuth: async () => ({ success: false, error: "SSR mode" }),
642
- sendVerificationEmail: async () => null,
643
- sendResetPasswordEmail: async () => null,
644
- resetPassword: async () => null,
645
- verifyEmail: async () => null,
646
- exchangeResetPasswordToken: async () => ({ error: { message: "SSR mode" } }),
647
- loginWithOAuth: async () => {
648
- },
649
- 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),
650
648
  baseUrl: "",
651
649
  afterSignInUrl: "/"
652
650
  };