@insforge/react 0.3.2 → 0.3.4
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 +604 -604
- package/dist/atoms.d.mts +5 -5
- package/dist/atoms.d.ts +5 -5
- package/dist/atoms.js +4 -12
- package/dist/atoms.js.map +1 -1
- package/dist/atoms.mjs +4 -12
- package/dist/atoms.mjs.map +1 -1
- package/dist/components.d.mts +2 -1
- package/dist/components.d.ts +2 -1
- package/dist/components.js +52 -59
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +52 -59
- package/dist/components.mjs.map +1 -1
- package/dist/forms.d.mts +4 -4
- package/dist/forms.d.ts +4 -4
- package/dist/forms.js +12 -20
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +12 -20
- package/dist/forms.mjs.map +1 -1
- package/dist/hooks.d.mts +8 -21
- package/dist/hooks.d.ts +8 -21
- package/dist/hooks.js +4 -4
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +4 -4
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +6 -22
- package/dist/index.d.ts +6 -22
- package/dist/index.js +55 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -62
- package/dist/index.mjs.map +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.mjs.map +1 -1
- package/dist/router.js.map +1 -1
- package/dist/router.mjs.map +1 -1
- package/dist/types.d.mts +6 -6
- package/dist/types.d.ts +6 -6
- package/package.json +98 -98
- package/src/styles.css +15 -15
package/dist/forms.d.mts
CHANGED
|
@@ -37,7 +37,7 @@ import '@insforge/shared-schemas';
|
|
|
37
37
|
* />
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick,
|
|
40
|
+
declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, appearance, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, forgotPasswordText, forgotPasswordUrl, submitButtonText, loadingButtonText, signUpText, signUpLinkText, signUpUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignInFormProps): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Pre-built sign-up form component (UI only, no business logic).
|
|
@@ -73,7 +73,7 @@ declare function SignInForm({ email, password, onEmailChange, onPasswordChange,
|
|
|
73
73
|
* />
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick,
|
|
76
|
+
declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, appearance, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, submitButtonText, loadingButtonText, signInText, signInLinkText, signInUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignUpFormProps): react_jsx_runtime.JSX.Element;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Pre-built forgot password form component (UI only, no business logic).
|
|
@@ -146,11 +146,11 @@ declare function ForgotPasswordForm({ email, onEmailChange, onSubmit, error, loa
|
|
|
146
146
|
* onSubmit={handleSubmit}
|
|
147
147
|
* error={error}
|
|
148
148
|
* loading={loading}
|
|
149
|
-
*
|
|
149
|
+
* authConfig={config}
|
|
150
150
|
* />
|
|
151
151
|
* ```
|
|
152
152
|
*/
|
|
153
|
-
declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success,
|
|
153
|
+
declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success, authConfig, appearance, title, subtitle, newPasswordLabel, newPasswordPlaceholder, confirmPasswordLabel, confirmPasswordPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, successTitle, successMessage, }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
156
|
* Email verification status display component (UI only, no business logic).
|
package/dist/forms.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ import '@insforge/shared-schemas';
|
|
|
37
37
|
* />
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick,
|
|
40
|
+
declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, appearance, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, forgotPasswordText, forgotPasswordUrl, submitButtonText, loadingButtonText, signUpText, signUpLinkText, signUpUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignInFormProps): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Pre-built sign-up form component (UI only, no business logic).
|
|
@@ -73,7 +73,7 @@ declare function SignInForm({ email, password, onEmailChange, onPasswordChange,
|
|
|
73
73
|
* />
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick,
|
|
76
|
+
declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, appearance, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, submitButtonText, loadingButtonText, signInText, signInLinkText, signInUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignUpFormProps): react_jsx_runtime.JSX.Element;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Pre-built forgot password form component (UI only, no business logic).
|
|
@@ -146,11 +146,11 @@ declare function ForgotPasswordForm({ email, onEmailChange, onSubmit, error, loa
|
|
|
146
146
|
* onSubmit={handleSubmit}
|
|
147
147
|
* error={error}
|
|
148
148
|
* loading={loading}
|
|
149
|
-
*
|
|
149
|
+
* authConfig={config}
|
|
150
150
|
* />
|
|
151
151
|
* ```
|
|
152
152
|
*/
|
|
153
|
-
declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success,
|
|
153
|
+
declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success, authConfig, appearance, title, subtitle, newPasswordLabel, newPasswordPlaceholder, confirmPasswordLabel, confirmPasswordPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, successTitle, successMessage, }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
156
|
* Email verification status display component (UI only, no business logic).
|
package/dist/forms.js
CHANGED
|
@@ -237,7 +237,7 @@ function AuthPasswordField({
|
|
|
237
237
|
label,
|
|
238
238
|
id,
|
|
239
239
|
showStrengthIndicator = false,
|
|
240
|
-
|
|
240
|
+
authConfig,
|
|
241
241
|
forgotPasswordLink,
|
|
242
242
|
value,
|
|
243
243
|
appearance = {},
|
|
@@ -315,7 +315,7 @@ function AuthPasswordField({
|
|
|
315
315
|
AuthPasswordStrengthIndicator,
|
|
316
316
|
{
|
|
317
317
|
password: String(value || ""),
|
|
318
|
-
config:
|
|
318
|
+
config: authConfig
|
|
319
319
|
}
|
|
320
320
|
)
|
|
321
321
|
]
|
|
@@ -759,11 +759,7 @@ function AuthEmailVerificationStep({
|
|
|
759
759
|
react.useEffect(() => {
|
|
760
760
|
const sendInitialEmail = async () => {
|
|
761
761
|
try {
|
|
762
|
-
|
|
763
|
-
await insforge.auth.sendVerificationCode({ email });
|
|
764
|
-
} else {
|
|
765
|
-
await insforge.auth.sendVerificationLink({ email });
|
|
766
|
-
}
|
|
762
|
+
await insforge.auth.sendVerificationEmail({ email });
|
|
767
763
|
} catch {
|
|
768
764
|
}
|
|
769
765
|
};
|
|
@@ -789,11 +785,7 @@ function AuthEmailVerificationStep({
|
|
|
789
785
|
setIsSending(true);
|
|
790
786
|
setVerificationError("");
|
|
791
787
|
try {
|
|
792
|
-
|
|
793
|
-
await insforge.auth.sendVerificationCode({ email });
|
|
794
|
-
} else {
|
|
795
|
-
await insforge.auth.sendVerificationLink({ email });
|
|
796
|
-
}
|
|
788
|
+
await insforge.auth.sendVerificationEmail({ email });
|
|
797
789
|
} catch {
|
|
798
790
|
setResendDisabled(false);
|
|
799
791
|
setResendCountdown(0);
|
|
@@ -871,7 +863,7 @@ function SignInForm({
|
|
|
871
863
|
oauthLoading = null,
|
|
872
864
|
availableProviders = [],
|
|
873
865
|
onOAuthClick,
|
|
874
|
-
|
|
866
|
+
authConfig,
|
|
875
867
|
appearance = {},
|
|
876
868
|
title = "Welcome Back",
|
|
877
869
|
subtitle = "Login to your account",
|
|
@@ -961,7 +953,7 @@ function SignInForm({
|
|
|
961
953
|
onChange: (e) => onPasswordChange(e.target.value),
|
|
962
954
|
required: true,
|
|
963
955
|
autoComplete: "current-password",
|
|
964
|
-
|
|
956
|
+
authConfig,
|
|
965
957
|
forgotPasswordLink: forgotPasswordUrl ? {
|
|
966
958
|
href: forgotPasswordUrl,
|
|
967
959
|
text: forgotPasswordText
|
|
@@ -1036,7 +1028,7 @@ function SignUpForm({
|
|
|
1036
1028
|
oauthLoading = null,
|
|
1037
1029
|
availableProviders = [],
|
|
1038
1030
|
onOAuthClick,
|
|
1039
|
-
|
|
1031
|
+
authConfig,
|
|
1040
1032
|
appearance = {},
|
|
1041
1033
|
title = "Get Started",
|
|
1042
1034
|
subtitle = "Create your account",
|
|
@@ -1123,10 +1115,10 @@ function SignUpForm({
|
|
|
1123
1115
|
value: password,
|
|
1124
1116
|
onChange: (e) => onPasswordChange(e.target.value),
|
|
1125
1117
|
required: true,
|
|
1126
|
-
minLength:
|
|
1118
|
+
minLength: authConfig.passwordMinLength,
|
|
1127
1119
|
autoComplete: "new-password",
|
|
1128
1120
|
showStrengthIndicator: true,
|
|
1129
|
-
|
|
1121
|
+
authConfig,
|
|
1130
1122
|
appearance: {
|
|
1131
1123
|
containerClassName: appearance.form?.passwordField?.container,
|
|
1132
1124
|
labelClassName: appearance.form?.passwordField?.label,
|
|
@@ -1311,7 +1303,7 @@ function ResetPasswordForm({
|
|
|
1311
1303
|
error,
|
|
1312
1304
|
loading = false,
|
|
1313
1305
|
success = false,
|
|
1314
|
-
|
|
1306
|
+
authConfig,
|
|
1315
1307
|
appearance = {},
|
|
1316
1308
|
title = "Reset Password",
|
|
1317
1309
|
subtitle = "Enter your new password below.",
|
|
@@ -1388,7 +1380,7 @@ function ResetPasswordForm({
|
|
|
1388
1380
|
required: true,
|
|
1389
1381
|
autoComplete: "new-password",
|
|
1390
1382
|
showStrengthIndicator: true,
|
|
1391
|
-
|
|
1383
|
+
authConfig,
|
|
1392
1384
|
appearance: {
|
|
1393
1385
|
containerClassName: appearance.form?.newPasswordField?.container,
|
|
1394
1386
|
labelClassName: appearance.form?.newPasswordField?.label,
|
|
@@ -1406,7 +1398,7 @@ function ResetPasswordForm({
|
|
|
1406
1398
|
onChange: (e) => onConfirmPasswordChange(e.target.value),
|
|
1407
1399
|
required: true,
|
|
1408
1400
|
autoComplete: "new-password",
|
|
1409
|
-
|
|
1401
|
+
authConfig,
|
|
1410
1402
|
appearance: {
|
|
1411
1403
|
containerClassName: appearance.form?.confirmPasswordField?.container,
|
|
1412
1404
|
labelClassName: appearance.form?.confirmPasswordField?.label,
|