@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.
- package/README.md +485 -604
- package/dist/atoms.cjs +818 -0
- package/dist/atoms.cjs.map +1 -0
- package/dist/atoms.d.cts +222 -0
- package/dist/atoms.d.ts +72 -237
- package/dist/atoms.js +382 -456
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +2254 -0
- package/dist/components.cjs.map +1 -0
- package/dist/{components.d.mts → components.d.cts} +10 -32
- package/dist/components.d.ts +9 -31
- package/dist/components.js +1046 -1180
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +1287 -0
- package/dist/forms.cjs.map +1 -0
- package/dist/forms.d.cts +138 -0
- package/dist/forms.d.ts +115 -162
- package/dist/forms.js +728 -921
- package/dist/forms.js.map +1 -1
- package/dist/{hooks.mjs → hooks.cjs} +15 -13
- package/dist/hooks.cjs.map +1 -0
- package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
- package/dist/hooks.js +9 -15
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +2674 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +10 -10
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1093 -1235
- package/dist/index.js.map +1 -1
- package/dist/{lib.mjs → lib.cjs} +13 -11
- package/dist/lib.cjs.map +1 -0
- package/dist/{lib.d.mts → lib.d.cts} +1 -8
- package/dist/lib.d.ts +1 -8
- package/dist/lib.js +4 -17
- package/dist/lib.js.map +1 -1
- package/dist/{router.mjs → router.cjs} +14 -16
- package/dist/router.cjs.map +1 -0
- package/dist/router.js +10 -16
- package/dist/router.js.map +1 -1
- package/dist/styles.css +655 -2
- package/dist/types.cjs +4 -0
- package/dist/{types.mjs.map → types.cjs.map} +1 -1
- package/dist/{types.d.mts → types.d.cts} +2 -2
- package/dist/types.d.ts +2 -2
- package/dist/types.js +0 -1
- package/package.json +106 -98
- package/dist/atoms.d.mts +0 -387
- package/dist/atoms.mjs +0 -861
- package/dist/atoms.mjs.map +0 -1
- package/dist/components.mjs +0 -2327
- package/dist/components.mjs.map +0 -1
- package/dist/forms.d.mts +0 -185
- package/dist/forms.mjs +0 -1468
- package/dist/forms.mjs.map +0 -1
- package/dist/hooks.mjs.map +0 -1
- package/dist/index.mjs +0 -2724
- package/dist/index.mjs.map +0 -1
- package/dist/lib.mjs.map +0 -1
- package/dist/router.mjs.map +0 -1
- package/dist/types.mjs +0 -3
- package/src/styles.css +0 -15
- /package/dist/{router.d.mts → router.d.cts} +0 -0
package/dist/components.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { SignInProps, SignUpProps,
|
|
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
|
|
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?:
|
|
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
|
|
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.
|