@insforge/react 0.3.5 → 0.4.0

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.
Files changed (63) hide show
  1. package/README.md +485 -604
  2. package/dist/atoms.cjs +818 -0
  3. package/dist/atoms.cjs.map +1 -0
  4. package/dist/atoms.d.cts +222 -0
  5. package/dist/atoms.d.ts +72 -237
  6. package/dist/atoms.js +382 -456
  7. package/dist/atoms.js.map +1 -1
  8. package/dist/components.cjs +2254 -0
  9. package/dist/components.cjs.map +1 -0
  10. package/dist/{components.d.mts → components.d.cts} +10 -32
  11. package/dist/components.d.ts +9 -31
  12. package/dist/components.js +1046 -1180
  13. package/dist/components.js.map +1 -1
  14. package/dist/forms.cjs +1287 -0
  15. package/dist/forms.cjs.map +1 -0
  16. package/dist/forms.d.cts +138 -0
  17. package/dist/forms.d.ts +115 -162
  18. package/dist/forms.js +728 -921
  19. package/dist/forms.js.map +1 -1
  20. package/dist/{hooks.mjs → hooks.cjs} +15 -13
  21. package/dist/hooks.cjs.map +1 -0
  22. package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
  23. package/dist/hooks.js +9 -15
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.cjs +2674 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/{index.d.mts → index.d.cts} +10 -10
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +1093 -1235
  30. package/dist/index.js.map +1 -1
  31. package/dist/{lib.mjs → lib.cjs} +13 -11
  32. package/dist/lib.cjs.map +1 -0
  33. package/dist/{lib.d.mts → lib.d.cts} +1 -8
  34. package/dist/lib.d.ts +1 -8
  35. package/dist/lib.js +4 -17
  36. package/dist/lib.js.map +1 -1
  37. package/dist/{router.mjs → router.cjs} +14 -16
  38. package/dist/router.cjs.map +1 -0
  39. package/dist/router.js +10 -16
  40. package/dist/router.js.map +1 -1
  41. package/dist/styles.css +655 -2
  42. package/dist/types.cjs +4 -0
  43. package/dist/{types.mjs.map → types.cjs.map} +1 -1
  44. package/dist/{types.d.mts → types.d.cts} +2 -2
  45. package/dist/types.d.ts +2 -2
  46. package/dist/types.js +0 -1
  47. package/package.json +106 -98
  48. package/dist/atoms.d.mts +0 -387
  49. package/dist/atoms.mjs +0 -861
  50. package/dist/atoms.mjs.map +0 -1
  51. package/dist/components.mjs +0 -2327
  52. package/dist/components.mjs.map +0 -1
  53. package/dist/forms.d.mts +0 -185
  54. package/dist/forms.mjs +0 -1468
  55. package/dist/forms.mjs.map +0 -1
  56. package/dist/hooks.mjs.map +0 -1
  57. package/dist/index.mjs +0 -2724
  58. package/dist/index.mjs.map +0 -1
  59. package/dist/lib.mjs.map +0 -1
  60. package/dist/router.mjs.map +0 -1
  61. package/dist/types.mjs +0 -3
  62. package/src/styles.css +0 -15
  63. /package/dist/{router.d.mts → router.d.cts} +0 -0
@@ -1,9 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SignInProps, SignUpProps, ForgotPasswordAppearance, ResetPasswordAppearance, VerifyEmailStatusProps, UserButtonProps, ProtectProps, ConditionalProps } from './types.js';
2
+ import { SignInProps, SignUpProps, ProtectProps, ConditionalProps } from './types.js';
3
+ import { UserSchema } from '@insforge/sdk';
3
4
  import * as react from 'react';
4
5
  import { ReactNode } from 'react';
5
6
  export { ForgotPasswordForm, ResetPasswordForm, SignInForm, SignUpForm, VerifyEmailStatus } from './forms.js';
6
- export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthSubmitButton, AuthVerificationCodeInput, validatePasswordStrength } from './atoms.js';
7
+ export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthSubmitButton, AuthVerificationCodeInput } from './atoms.js';
7
8
  import '@insforge/shared-schemas';
8
9
 
9
10
  /**
@@ -38,8 +39,6 @@ declare function SignIn({ afterSignInUrl, onSuccess, onError, ...uiProps }: Sign
38
39
  declare function SignUp({ afterSignUpUrl, onSuccess, onError, ...uiProps }: SignUpProps): react_jsx_runtime.JSX.Element | null;
39
40
 
40
41
  interface ForgotPasswordProps {
41
- /** Hierarchical appearance configuration for deep customization */
42
- appearance?: ForgotPasswordAppearance;
43
42
  /** Text customization */
44
43
  title?: string;
45
44
  subtitle?: string;
@@ -78,8 +77,6 @@ declare function ForgotPassword({ backToSignInUrl, onSuccess, onError, ...uiProp
78
77
  interface ResetPasswordProps {
79
78
  /** Reset password token (from URL query params) */
80
79
  token: string;
81
- /** Hierarchical appearance configuration for deep customization */
82
- appearance?: ResetPasswordAppearance;
83
80
  /** Text customization */
84
81
  title?: string;
85
82
  subtitle?: string;
@@ -117,8 +114,6 @@ declare function ResetPassword({ token, backToSignInUrl, onSuccess, onError, ...
117
114
  interface VerifyEmailProps {
118
115
  /** Verification token (from URL query params) */
119
116
  token: string;
120
- /** Appearance configuration */
121
- appearance?: VerifyEmailStatusProps["appearance"];
122
117
  /** Text customization */
123
118
  verifyingTitle?: string;
124
119
  successTitle?: string;
@@ -127,7 +122,7 @@ interface VerifyEmailProps {
127
122
  /** Callback when verification is successful */
128
123
  onSuccess?: (data: {
129
124
  accessToken: string;
130
- user?: any;
125
+ user?: UserSchema;
131
126
  redirectTo?: string;
132
127
  }) => void;
133
128
  /** Callback when verification fails */
@@ -155,31 +150,14 @@ interface VerifyEmailProps {
155
150
  */
156
151
  declare function VerifyEmail({ token, onSuccess, onError, ...uiProps }: VerifyEmailProps): react_jsx_runtime.JSX.Element;
157
152
 
153
+ interface UserButtonProps {
154
+ afterSignOutUrl?: string;
155
+ mode?: 'detailed' | 'simple';
156
+ }
158
157
  /**
159
158
  * User profile button with dropdown menu and sign-out functionality.
160
- *
161
- * @component
162
- * @example
163
- * ```tsx
164
- * <UserButton afterSignOutUrl="/" />
165
- *
166
- * // Simple mode
167
- * <UserButton mode="simple" />
168
- *
169
- * // With custom styling
170
- * <UserButton
171
- * appearance={{
172
- * buttonClassName: "hover:bg-white/10",
173
- * dropdownClassName: "bg-gray-900"
174
- * }}
175
- * />
176
- * ```
177
- *
178
- * @param {string} [afterSignOutUrl='/'] - URL to redirect to after sign-out
179
- * @param {'detailed'|'simple'} [mode='detailed'] - Display mode
180
- * @param {object} [appearance] - Custom Tailwind classes
181
159
  */
182
- declare function UserButton({ afterSignOutUrl, mode, appearance, }: UserButtonProps): react_jsx_runtime.JSX.Element | null;
160
+ declare function UserButton({ afterSignOutUrl, mode }: UserButtonProps): react_jsx_runtime.JSX.Element | null;
183
161
 
184
162
  /**
185
163
  * Protected route component that redirects unauthenticated users.