@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.cjs CHANGED
@@ -4,6 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var lucideReact = require('lucide-react');
5
5
  var react = require('react');
6
6
  require('@insforge/sdk');
7
+ var react$1 = require('@insforge/shared/react');
7
8
 
8
9
  // src/components/atoms/AuthBranding.tsx
9
10
  function AuthBranding() {
@@ -625,9 +626,8 @@ function AuthVerificationCodeInput({
625
626
  index
626
627
  )) });
627
628
  }
628
- var InsforgeContext = react.createContext(void 0);
629
629
  function useInsforge() {
630
- const context = react.useContext(InsforgeContext);
630
+ const context = react.useContext(react$1.InsforgeContext);
631
631
  if (!context) {
632
632
  return {
633
633
  user: null,
@@ -635,20 +635,18 @@ function useInsforge() {
635
635
  isSignedIn: false,
636
636
  setUser: () => {
637
637
  },
638
- signIn: async () => ({ error: "SSR mode" }),
639
- signUp: async () => ({ error: "SSR mode" }),
640
- signOut: async () => {
641
- },
642
- updateUser: async () => ({ error: "SSR mode" }),
643
- reloadAuth: async () => ({ success: false, error: "SSR mode" }),
644
- sendVerificationEmail: async () => null,
645
- sendResetPasswordEmail: async () => null,
646
- resetPassword: async () => null,
647
- verifyEmail: async () => null,
648
- exchangeResetPasswordToken: async () => ({ error: { message: "SSR mode" } }),
649
- loginWithOAuth: async () => {
650
- },
651
- getPublicAuthConfig: async () => null,
638
+ signIn: () => Promise.resolve({ error: "SSR mode" }),
639
+ signUp: () => Promise.resolve({ error: "SSR mode" }),
640
+ signOut: () => Promise.resolve(),
641
+ updateUser: () => Promise.resolve({ error: "SSR mode" }),
642
+ reloadAuth: () => Promise.resolve({ success: false, error: "SSR mode" }),
643
+ sendVerificationEmail: () => Promise.resolve(null),
644
+ sendResetPasswordEmail: () => Promise.resolve(null),
645
+ resetPassword: () => Promise.resolve(null),
646
+ verifyEmail: () => Promise.resolve(null),
647
+ exchangeResetPasswordToken: () => Promise.resolve({ error: { message: "SSR mode" } }),
648
+ loginWithOAuth: () => Promise.resolve(),
649
+ getPublicAuthConfig: () => Promise.resolve(null),
652
650
  baseUrl: "",
653
651
  afterSignInUrl: "/"
654
652
  };