@insforge/react 0.4.6 → 0.4.8
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/atoms.cjs +79 -62
- package/dist/atoms.cjs.map +1 -1
- package/dist/atoms.d.cts +1 -2
- package/dist/atoms.d.ts +1 -2
- package/dist/atoms.js +80 -63
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +96 -98
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +97 -99
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +86 -86
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +87 -87
- package/dist/forms.js.map +1 -1
- package/dist/index.cjs +110 -120
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +110 -122
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +24 -0
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.cts +36 -1
- package/dist/lib.d.ts +36 -1
- package/dist/lib.js +23 -1
- package/dist/lib.js.map +1 -1
- package/dist/router.cjs +11 -21
- package/dist/router.cjs.map +1 -1
- package/dist/router.d.cts +5 -4
- package/dist/router.d.ts +5 -4
- package/dist/router.js +11 -21
- package/dist/router.js.map +1 -1
- package/dist/styles.css +43 -63
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ import { InsforgeUser, OAuthProvider, OAuthProviderConfig } from './types.cjs';
|
|
|
8
8
|
export { AuthConfig, EmailVerificationMethod } from './types.cjs';
|
|
9
9
|
import { CreateSessionResponse, CreateUserResponse, ResetPasswordResponse, GetPublicAuthConfigResponse } from '@insforge/shared-schemas';
|
|
10
10
|
export { useAuth, usePublicAuthConfig, useUser } from './hooks.cjs';
|
|
11
|
-
export { checkPasswordStrength, createPasswordSchema, emailSchema, passwordSchema, validateEmail, validatePassword } from './lib.cjs';
|
|
11
|
+
export { checkPasswordStrength, createPasswordSchema, emailSchema, passwordSchema, resolveAuthPath, resolveAuthUrl, validateEmail, validatePassword } from './lib.cjs';
|
|
12
12
|
export { getInsforgeRoutes } from './router.cjs';
|
|
13
13
|
import 'zod';
|
|
14
14
|
import 'react-router-dom';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { InsforgeUser, OAuthProvider, OAuthProviderConfig } from './types.js';
|
|
|
8
8
|
export { AuthConfig, EmailVerificationMethod } from './types.js';
|
|
9
9
|
import { CreateSessionResponse, CreateUserResponse, ResetPasswordResponse, GetPublicAuthConfigResponse } from '@insforge/shared-schemas';
|
|
10
10
|
export { useAuth, usePublicAuthConfig, useUser } from './hooks.js';
|
|
11
|
-
export { checkPasswordStrength, createPasswordSchema, emailSchema, passwordSchema, validateEmail, validatePassword } from './lib.js';
|
|
11
|
+
export { checkPasswordStrength, createPasswordSchema, emailSchema, passwordSchema, resolveAuthPath, resolveAuthUrl, validateEmail, validatePassword } from './lib.js';
|
|
12
12
|
export { getInsforgeRoutes } from './router.js';
|
|
13
13
|
import 'zod';
|
|
14
14
|
import 'react-router-dom';
|
package/dist/index.js
CHANGED
|
@@ -5,14 +5,14 @@ if (typeof document !== 'undefined' && typeof window !== 'undefined') {
|
|
|
5
5
|
if (!document.getElementById(styleId)) {
|
|
6
6
|
const style = document.createElement('style');
|
|
7
7
|
style.id = styleId;
|
|
8
|
-
style.textContent = "/**\n * InsForge React Component Library Styles\n * Traditional CSS with scoped class names (no Tailwind)\n */\n\n/* ============================================\n FONTS\n ============================================ */\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');\n@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');\n\n/* ============================================\n CSS VARIABLES\n ============================================ */\n:root {\n /* Colors */\n --if-color-primary: #000000;\n --if-color-primary-hover: #1f1f1f;\n --if-color-text: #000000;\n --if-color-text-secondary: #828282;\n --if-color-text-muted: #a3a3a3;\n --if-color-border: #d4d4d4;\n --if-color-border-focus: #000000;\n --if-color-bg-white: #ffffff;\n --if-color-bg-light: #fafafa;\n --if-color-bg-hover: #f9fafb;\n --if-color-error: #dc2626;\n --if-color-error-bg: #fee2e2;\n --if-color-success: #16a34a;\n\n /* Spacing */\n --if-space-1: 0.25rem; /* 4px */\n --if-space-2: 0.5rem; /* 8px */\n --if-space-3: 0.75rem; /* 12px */\n --if-space-4: 1rem; /* 16px */\n --if-space-6: 1.5rem; /* 24px */\n --if-space-8: 2rem; /* 32px */\n\n /* Border Radius */\n --if-radius-xs: 0.125rem; /* 2px */\n --if-radius-sm: 0.25rem; /* 4px */\n --if-radius-md: 0.375rem; /* 6px */\n --if-radius-lg: 0.5rem; /* 8px */\n --if-radius-xl: 0.75rem; /* 12px */\n\n /* Typography */\n --if-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n --if-font-family-manrope:\n 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n --if-font-size-xs: 0.75rem; /* 12px */\n --if-font-size-sm: 0.875rem; /* 14px */\n --if-font-size-base: 1rem; /* 16px */\n --if-font-size-lg: 1.125rem; /* 18px */\n --if-font-size-xl: 1.25rem; /* 20px */\n --if-font-size-2xl: 1.5rem; /* 24px */\n\n /* Shadows */\n --if-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --if-shadow-md: 0 1px 2px 0 rgba(0, 0, 0, 0.1);\n --if-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n\n /* Transitions */\n --if-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n --if-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* ============================================\n AUTH CONTAINER\n ============================================ */\n.if-authContainer {\n width: 100%;\n max-width: 400px;\n border-radius: var(--if-radius-xl);\n overflow: hidden;\n box-shadow: var(--if-shadow-lg);\n}\n\n.if-authCard {\n background-color: var(--if-color-bg-white);\n padding: var(--if-space-6);\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n gap: var(--if-space-6);\n}\n\n/* ============================================\n AUTH HEADER\n ============================================ */\n.if-authHeader {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: var(--if-space-2);\n}\n\n.if-authHeader-title {\n font-size: var(--if-font-size-2xl);\n font-weight: 600;\n color: var(--if-color-text);\n line-height: 2rem;\n margin: 0;\n font-family: var(--if-font-family);\n}\n\n.if-authHeader-subtitle {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text-secondary);\n line-height: 1.5rem;\n margin: 0;\n font-family: var(--if-font-family);\n}\n\n/* ============================================\n FORM FIELD\n ============================================ */\n.if-formField {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n gap: var(--if-space-1);\n}\n\n.if-formField-label {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text);\n line-height: 1.5rem;\n font-family: var(--if-font-family);\n}\n\n.if-formField-input {\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n align-self: stretch;\n padding: var(--if-space-2) var(--if-space-3);\n border-radius: var(--if-radius-sm);\n border: 1px solid var(--if-color-border);\n background-color: var(--if-color-bg-white);\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n line-height: 1.25rem;\n color: var(--if-color-text);\n font-family: var(--if-font-family);\n transition: border-color var(--if-transition-base);\n}\n\n.if-formField-input::placeholder {\n color: var(--if-color-text-muted);\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n}\n\n.if-formField-input:focus {\n outline: none;\n border-color: var(--if-color-border-focus);\n}\n\n/* ============================================\n PASSWORD FIELD\n ============================================ */\n.if-passwordField {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n gap: var(--if-space-1);\n}\n\n.if-passwordField-labelRow {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.if-passwordField-label {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text);\n line-height: 1.5rem;\n font-family: var(--if-font-family);\n}\n\n.if-passwordField-forgotLink {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text-secondary);\n text-decoration: none;\n transition: color var(--if-transition-fast);\n font-family: var(--if-font-family);\n}\n\n.if-passwordField-inputWrapper {\n position: relative;\n width: 100%;\n}\n\n.if-passwordField-input {\n width: 100%;\n display: flex;\n align-items: center;\n align-self: stretch;\n padding: var(--if-space-2) var(--if-space-3);\n padding-right: 2.5rem; /* Space for toggle button */\n border-radius: var(--if-radius-sm);\n border: 1px solid var(--if-color-border);\n background-color: var(--if-color-bg-white);\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n line-height: 1.25rem;\n color: var(--if-color-text);\n font-family: var(--if-font-family);\n transition: border-color var(--if-transition-base);\n}\n\n.if-passwordField-input::placeholder {\n color: var(--if-color-text-muted);\n}\n\n.if-passwordField-input:focus {\n outline: none;\n border-color: var(--if-color-border-focus);\n}\n\n.if-passwordField-toggleButton {\n position: absolute;\n right: var(--if-space-1);\n top: 50%;\n transform: translateY(-50%);\n background: none;\n border: none;\n cursor: pointer;\n padding: var(--if-space-1);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--if-color-text-secondary);\n transition: color var(--if-transition-fast);\n}\n\n/* ============================================\n SUBMIT BUTTON\n ============================================ */\n.if-submitButton {\n border-radius: var(--if-radius-sm);\n background-color: var(--if-color-primary);\n height: 2.5rem;\n width: 100%;\n display: flex;\n margin-top: var(--if-space-4);\n padding: var(--if-space-2) var(--if-space-4);\n justify-content: center;\n align-items: center;\n gap: 0.625rem;\n align-self: stretch;\n color: var(--if-color-bg-white);\n font-weight: 600;\n font-family: var(--if-font-family-manrope);\n font-size: var(--if-font-size-base);\n line-height: normal;\n border: none;\n cursor: pointer;\n transition: background-color var(--if-transition-base);\n}\n\n.if-submitButton:hover:not(:disabled) {\n background-color: var(--if-color-primary-hover);\n}\n\n.if-submitButton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.if-submitButton-icon {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n/* Spinner animation */\n@keyframes if-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.if-submitButton-spinner {\n animation: if-spin 1s linear infinite;\n}\n\n/* ============================================\n OAUTH BUTTON\n ============================================ */\n.if-oauthButton {\n display: flex;\n width: 100%;\n height: 2.25rem;\n padding: var(--if-space-2) var(--if-space-3);\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--if-space-3);\n border-radius: var(--if-radius-md);\n border: 1px solid #e4e4e7;\n background-color: var(--if-color-bg-white);\n box-shadow: var(--if-shadow-md);\n color: #09090b;\n text-align: center;\n font-size: var(--if-font-size-sm);\n font-weight: 500;\n line-height: 1.25rem;\n cursor: pointer;\n transition: all var(--if-transition-base);\n font-family: var(--if-font-family);\n}\n\n.if-oauthButton:hover:not(:disabled) {\n background-color: var(--if-color-bg-hover);\n border-color: #9ca3af;\n}\n\n.if-oauthButton:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.if-oauthButton-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1.125rem;\n height: 1.125rem;\n}\n\n.if-oauthButton-full {\n justify-content: center;\n}\n\n.if-oauthButton-short {\n justify-content: center;\n padding: var(--if-space-2);\n gap: var(--if-space-2);\n}\n\n.if-oauthButton-icon-only {\n justify-content: center;\n gap: 0;\n}\n\n/* ============================================\n OAUTH PROVIDERS CONTAINER\n ============================================ */\n.if-oauthProviders {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-3);\n width: 100%;\n}\n\n/* ============================================\n AUTH LINK\n ============================================ */\n.if-authLink {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: var(--if-space-1);\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-authLink-text {\n font-weight: 400;\n}\n\n.if-authLink-link {\n font-weight: 600;\n color: var(--if-color-text);\n text-decoration: none;\n transition: opacity var(--if-transition-fast);\n}\n\n/* ============================================\n AUTH DIVIDER\n ============================================ */\n.if-authDivider {\n display: flex;\n align-items: center;\n text-align: center;\n width: 100%;\n gap: var(--if-space-3);\n}\n\n.if-authDivider-line {\n flex: 1;\n border-top: 1px solid var(--if-color-border);\n}\n\n.if-authDivider-text {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n font-weight: 400;\n font-family: var(--if-font-family-manrope);\n}\n\n/* ============================================\n ERROR BANNER\n ============================================ */\n.if-errorBanner {\n padding: var(--if-space-3);\n background-color: var(--if-color-error-bg);\n border-radius: var(--if-radius-md);\n border: 1px solid var(--if-color-error);\n}\n\n.if-errorBanner-content {\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n}\n\n.if-errorBanner-icon {\n width: 1.5rem;\n height: 1.5rem;\n flex-shrink: 0;\n color: var(--if-color-error);\n}\n\n.if-errorBanner-text {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-error);\n font-weight: 400;\n font-family: var(--if-font-family);\n margin: 0;\n}\n\n/* ============================================\n AUTH BRANDING\n ============================================ */\n.if-authBranding {\n background-color: var(--if-color-bg-light);\n padding: var(--if-space-4) var(--if-space-2);\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--if-space-1);\n}\n\n.if-authBranding-text {\n font-size: var(--if-font-size-xs);\n font-weight: 500;\n color: var(--if-color-text);\n font-family: var(--if-font-family-manrope);\n margin: 0;\n}\n\n/* ============================================\n VERIFICATION CODE INPUT\n ============================================ */\n.if-verificationCode {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-4);\n}\n\n.if-verificationCode-description {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n text-align: center;\n font-family: var(--if-font-family);\n}\n\n.if-verificationCode-email {\n font-weight: 600;\n color: var(--if-color-text);\n}\n\n.if-verificationCode-inputContainer {\n display: flex;\n gap: var(--if-space-2);\n justify-content: center;\n}\n\n.if-verificationCode-input {\n width: 3rem;\n height: 3rem;\n text-align: center;\n font-size: var(--if-font-size-xl);\n font-weight: 600;\n border: 2px solid var(--if-color-border);\n border-radius: var(--if-radius-md);\n transition: border-color var(--if-transition-base);\n font-family: var(--if-font-family);\n}\n\n.if-verificationCode-input:focus {\n outline: none;\n border-color: var(--if-color-border-focus);\n}\n\n/* ============================================\n VERIFICATION STEP\n ============================================ */\n.if-verificationStep {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-6);\n align-items: stretch;\n}\n\n.if-verificationStep-description {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n text-align: center;\n margin: 0;\n font-family: var(--if-font-family);\n}\n\n.if-verificationStep-codeContainer {\n width: 100%;\n background-color: #f5f5f5;\n border-radius: var(--if-radius-lg);\n padding: var(--if-space-4) var(--if-space-4) var(--if-space-6);\n display: flex;\n flex-direction: column;\n gap: var(--if-space-4);\n}\n\n.if-verificationStep-codeInputWrapper {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-3);\n margin-top: var(--if-space-2);\n}\n\n.if-verificationStep-verifyingText {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n text-align: center;\n font-family: var(--if-font-family);\n}\n\n.if-verificationStep-resendContainer {\n width: 100%;\n font-size: var(--if-font-size-sm);\n text-align: center;\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-verificationStep-resendButton {\n color: var(--if-color-text);\n font-weight: 500;\n transition: all var(--if-transition-base);\n background: none;\n border: none;\n padding: 0;\n font-family: var(--if-font-family);\n font-size: var(--if-font-size-sm);\n}\n\n.if-verificationStep-resendButton:not(:disabled) {\n cursor: pointer;\n text-decoration: underline;\n}\n\n.if-verificationStep-resendButton:disabled {\n cursor: not-allowed;\n text-decoration: none;\n opacity: 0.5;\n}\n\n/* ============================================\n PASSWORD STRENGTH INDICATOR\n ============================================ */\n.if-passwordStrength {\n margin-top: var(--if-space-2);\n}\n\n.if-passwordStrength-bar {\n height: 4px;\n background-color: #e5e7eb;\n border-radius: 2px;\n overflow: hidden;\n margin-bottom: var(--if-space-2);\n}\n\n.if-passwordStrength-fill {\n height: 100%;\n transition:\n width var(--if-transition-base),\n background-color var(--if-transition-base);\n}\n\n.if-passwordStrength-fill.weak {\n background-color: #ef4444;\n width: 33%;\n}\n\n.if-passwordStrength-fill.medium {\n background-color: #f59e0b;\n width: 66%;\n}\n\n.if-passwordStrength-fill.strong {\n background-color: var(--if-color-success);\n width: 100%;\n}\n\n.if-passwordStrength-text {\n font-size: var(--if-font-size-xs);\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-passwordStrength-requirements {\n margin-top: var(--if-space-2);\n font-size: var(--if-font-size-xs);\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-passwordStrength-requirement {\n display: flex;\n align-items: center;\n gap: var(--if-space-1);\n margin-bottom: var(--if-space-1);\n}\n\n.if-passwordStrength-requirement.met {\n color: var(--if-color-success);\n}\n\n.if-passwordStrength-requirement.unmet {\n color: var(--if-color-text-muted);\n}\n\n/* ============================================\n FORM CONTAINER\n ============================================ */\n.if-form {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n gap: var(--if-space-6);\n}\n\n/* ============================================\n USER BUTTON\n ============================================ */\n.if-userButton-container {\n position: relative;\n display: inline-block;\n}\n\n.if-userButton {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--if-space-2);\n padding: var(--if-space-2);\n border-radius: 9999px;\n background-color: transparent;\n border: none;\n cursor: pointer;\n transition: all var(--if-transition-base);\n}\n\n.if-userButton:hover {\n opacity: 0.8;\n}\n\n.if-userButton-detailed {\n background-color: var(--if-color-bg-white);\n border: 1px solid var(--if-color-border);\n border-radius: var(--if-radius-sm);\n padding: var(--if-space-2);\n}\n\n.if-userButton-detailed:hover {\n background-color: var(--if-color-bg-light);\n opacity: 1;\n}\n\n.if-userButton-avatar {\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n background-color: var(--if-color-primary);\n color: var(--if-color-bg-white);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: var(--if-font-size-sm);\n font-family: var(--if-font-family);\n overflow: hidden;\n}\n\n.if-userButton-avatarImage {\n border-radius: 9999px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.if-userButton-avatarInitials {\n color: var(--if-color-bg-white);\n font-weight: 600;\n font-size: var(--if-font-size-sm);\n}\n\n.if-userButton-info {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 0.125rem;\n}\n\n.if-userButton-name {\n font-size: var(--if-font-size-sm);\n font-weight: 600;\n color: var(--if-color-text);\n line-height: 1.25rem;\n text-align: left;\n font-family: var(--if-font-family);\n}\n\n.if-userButton-email {\n font-size: var(--if-font-size-xs);\n color: var(--if-color-text-secondary);\n line-height: 1rem;\n text-align: left;\n font-family: var(--if-font-family);\n}\n\n.if-userButton-menu {\n position: absolute;\n margin-top: var(--if-space-2);\n background-color: var(--if-color-bg-white);\n border: 1px solid var(--if-color-border);\n border-radius: var(--if-radius-md);\n box-shadow: var(--if-shadow-lg);\n padding: var(--if-space-2);\n min-width: 200px;\n z-index: 50;\n}\n\n.if-userButton-menuItem {\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n padding: var(--if-space-2);\n border-radius: var(--if-radius-sm);\n cursor: pointer;\n transition: background-color var(--if-transition-fast);\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text);\n font-family: var(--if-font-family);\n background: none;\n border: none;\n width: 100%;\n text-align: left;\n}\n\n.if-userButton-menuItem:hover {\n background-color: var(--if-color-bg-light);\n}\n\n.if-userButton-menuItem-signout {\n color: var(--if-color-error);\n}\n\n.if-userButton-menuItem-icon {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n/* ============================================\n EMAIL VERIFICATION STATUS\n ============================================ */\n.if-verifyStatus-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--if-space-6);\n}\n\n.if-verifyStatus-container-stretch {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n gap: var(--if-space-6);\n}\n\n.if-verifyStatus-spinner {\n border-radius: 9999px;\n height: 3rem;\n width: 3rem;\n border-bottom: 2px solid var(--if-color-primary);\n}\n\n.if-verifyStatus-successContent {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--if-space-4);\n}\n\n.if-verifyStatus-successIcon {\n width: 4rem;\n height: 4rem;\n border-radius: 9999px;\n background-color: #d1fae5;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.if-verifyStatus-successIconSvg {\n width: 2rem;\n height: 2rem;\n color: #059669;\n}\n\n.if-verifyStatus-textCenter {\n text-align: center;\n}\n\n/* ============================================\n UTILITY CLASSES\n ============================================ */\n.if-hidden {\n display: none;\n}\n\n.if-visuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n";
|
|
8
|
+
style.textContent = "/**\n * InsForge React Component Library Styles\n * Traditional CSS with scoped class names (no Tailwind)\n */\n\n/* ============================================\n FONTS\n ============================================ */\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');\n@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap');\n\n/* ============================================\n CSS VARIABLES\n ============================================ */\n:root {\n /* Colors */\n --if-color-primary: #000000;\n --if-color-primary-hover: #1f1f1f;\n --if-color-text: #000000;\n --if-color-text-secondary: #828282;\n --if-color-text-muted: #a3a3a3;\n --if-color-border: #d4d4d4;\n --if-color-border-focus: #000000;\n --if-color-bg-white: #ffffff;\n --if-color-bg-light: #fafafa;\n --if-color-bg-hover: #f9fafb;\n --if-color-error: #dc2626;\n --if-color-error-bg: #fee2e2;\n --if-color-success: #16a34a;\n\n /* Spacing */\n --if-space-1: 0.25rem; /* 4px */\n --if-space-2: 0.5rem; /* 8px */\n --if-space-3: 0.75rem; /* 12px */\n --if-space-4: 1rem; /* 16px */\n --if-space-6: 1.5rem; /* 24px */\n --if-space-8: 2rem; /* 32px */\n\n /* Border Radius */\n --if-radius-xs: 0.125rem; /* 2px */\n --if-radius-sm: 0.25rem; /* 4px */\n --if-radius-md: 0.375rem; /* 6px */\n --if-radius-lg: 0.5rem; /* 8px */\n --if-radius-xl: 0.75rem; /* 12px */\n\n /* Typography */\n --if-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n --if-font-family-manrope:\n 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n --if-font-size-xs: 0.75rem; /* 12px */\n --if-font-size-sm: 0.875rem; /* 14px */\n --if-font-size-base: 1rem; /* 16px */\n --if-font-size-lg: 1.125rem; /* 18px */\n --if-font-size-xl: 1.25rem; /* 20px */\n --if-font-size-2xl: 1.5rem; /* 24px */\n\n /* Shadows */\n --if-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --if-shadow-md: 0 1px 2px 0 rgba(0, 0, 0, 0.1);\n --if-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n\n /* Transitions */\n --if-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);\n --if-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n/* ============================================\n AUTH CONTAINER\n ============================================ */\n.if-authContainer {\n width: 100%;\n max-width: 400px;\n border-radius: var(--if-radius-xl);\n overflow: hidden;\n box-shadow: var(--if-shadow-lg);\n}\n\n.if-authCard {\n background-color: var(--if-color-bg-white);\n padding: var(--if-space-6);\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n gap: var(--if-space-6);\n}\n\n/* ============================================\n AUTH HEADER\n ============================================ */\n.if-authHeader {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: var(--if-space-2);\n}\n\n.if-authHeader-title {\n font-size: var(--if-font-size-2xl);\n font-weight: 600;\n color: var(--if-color-text);\n line-height: 2rem;\n margin: 0;\n font-family: var(--if-font-family);\n}\n\n.if-authHeader-subtitle {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text-secondary);\n line-height: 1.5rem;\n margin: 0;\n font-family: var(--if-font-family);\n}\n\n/* ============================================\n FORM FIELD\n ============================================ */\n.if-formField {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n gap: var(--if-space-1);\n}\n\n.if-formField-label {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text);\n line-height: 1.5rem;\n font-family: var(--if-font-family);\n}\n\n.if-formField-input {\n width: 100%;\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n align-self: stretch;\n padding: var(--if-space-2) var(--if-space-3);\n border-radius: var(--if-radius-sm);\n border: 1px solid var(--if-color-border);\n background-color: var(--if-color-bg-white);\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n line-height: 1.25rem;\n color: var(--if-color-text);\n font-family: var(--if-font-family);\n transition: border-color var(--if-transition-base);\n}\n\n.if-formField-input::placeholder {\n color: var(--if-color-text-muted);\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n}\n\n.if-formField-input:focus {\n outline: none;\n border-color: var(--if-color-border-focus);\n}\n\n/* ============================================\n PASSWORD FIELD\n ============================================ */\n.if-passwordField {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: stretch;\n gap: var(--if-space-1);\n}\n\n.if-passwordField-labelRow {\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.if-passwordField-label {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text);\n line-height: 1.5rem;\n font-family: var(--if-font-family);\n}\n\n.if-passwordField-forgotLink {\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n color: var(--if-color-text-secondary);\n text-decoration: none;\n transition: color var(--if-transition-fast);\n font-family: var(--if-font-family);\n}\n\n.if-passwordField-inputWrapper {\n position: relative;\n width: 100%;\n}\n\n.if-passwordField-input {\n width: 100%;\n display: flex;\n align-items: center;\n align-self: stretch;\n padding: var(--if-space-2) var(--if-space-3);\n padding-right: 2.5rem; /* Space for toggle button */\n border-radius: var(--if-radius-sm);\n border: 1px solid var(--if-color-border);\n background-color: var(--if-color-bg-white);\n font-size: var(--if-font-size-sm);\n font-weight: 400;\n line-height: 1.25rem;\n color: var(--if-color-text);\n font-family: var(--if-font-family);\n transition: border-color var(--if-transition-base);\n}\n\n.if-passwordField-input::placeholder {\n color: var(--if-color-text-muted);\n}\n\n.if-passwordField-input:focus {\n outline: none;\n border-color: var(--if-color-border-focus);\n}\n\n.if-passwordField-toggleButton {\n position: absolute;\n right: var(--if-space-1);\n top: 50%;\n transform: translateY(-50%);\n background: none;\n border: none;\n cursor: pointer;\n padding: var(--if-space-1);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--if-color-text-secondary);\n transition: color var(--if-transition-fast);\n}\n\n/* ============================================\n SUBMIT BUTTON\n ============================================ */\n.if-submitButton {\n border-radius: var(--if-radius-sm);\n background-color: var(--if-color-primary);\n height: 2.5rem;\n width: 100%;\n display: flex;\n margin-top: var(--if-space-4);\n padding: var(--if-space-2) var(--if-space-4);\n justify-content: center;\n align-items: center;\n gap: 0.625rem;\n align-self: stretch;\n color: var(--if-color-bg-white);\n font-weight: 600;\n font-family: var(--if-font-family-manrope);\n font-size: var(--if-font-size-base);\n line-height: normal;\n border: none;\n cursor: pointer;\n transition: background-color var(--if-transition-base);\n}\n\n.if-submitButton:hover:not(:disabled) {\n background-color: var(--if-color-primary-hover);\n}\n\n.if-submitButton:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.if-submitButton-icon {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n/* Spinner animation */\n@keyframes if-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n\n.if-submitButton-spinner {\n animation: if-spin 1s linear infinite;\n}\n\n/* ============================================\n OAUTH BUTTON\n ============================================ */\n.if-oauthButton {\n display: flex;\n width: 100%;\n height: 2.25rem;\n padding: var(--if-space-2) var(--if-space-3);\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--if-space-3);\n border-radius: var(--if-radius-md);\n border: 1px solid #e4e4e7;\n background-color: var(--if-color-bg-white);\n box-shadow: var(--if-shadow-md);\n color: #09090b;\n text-align: center;\n font-size: var(--if-font-size-sm);\n font-weight: 500;\n line-height: 1.25rem;\n cursor: pointer;\n transition: all var(--if-transition-base);\n font-family: var(--if-font-family);\n}\n\n.if-oauthButton:hover:not(:disabled) {\n background-color: var(--if-color-bg-hover);\n border-color: #9ca3af;\n}\n\n.if-oauthButton:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.if-oauthButton-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 1.125rem;\n height: 1.125rem;\n}\n\n.if-oauthButton-full {\n justify-content: center;\n}\n\n.if-oauthButton-short {\n justify-content: center;\n padding: var(--if-space-2);\n gap: var(--if-space-2);\n}\n\n.if-oauthButton-icon-only {\n justify-content: center;\n gap: 0;\n}\n\n/* ============================================\n OAUTH PROVIDERS CONTAINER\n ============================================ */\n.if-oauthProviders {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-3);\n width: 100%;\n}\n\n/* ============================================\n AUTH LINK\n ============================================ */\n.if-authLink {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: var(--if-space-1);\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-authLink-text {\n font-weight: 400;\n}\n\n.if-authLink-link {\n font-weight: 600;\n color: var(--if-color-text);\n text-decoration: none;\n transition: opacity var(--if-transition-fast);\n}\n\n/* ============================================\n AUTH DIVIDER\n ============================================ */\n.if-authDivider {\n display: flex;\n align-items: center;\n text-align: center;\n width: 100%;\n gap: var(--if-space-3);\n}\n\n.if-authDivider-line {\n flex: 1;\n border-top: 1px solid var(--if-color-border);\n}\n\n.if-authDivider-text {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n font-weight: 400;\n font-family: var(--if-font-family-manrope);\n}\n\n/* ============================================\n ERROR BANNER\n ============================================ */\n.if-errorBanner {\n padding: var(--if-space-3);\n background-color: var(--if-color-error-bg);\n border-radius: var(--if-radius-md);\n border: 1px solid var(--if-color-error);\n}\n\n.if-errorBanner-content {\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n}\n\n.if-errorBanner-icon {\n width: 1.5rem;\n height: 1.5rem;\n flex-shrink: 0;\n color: var(--if-color-error);\n}\n\n.if-errorBanner-text {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-error);\n font-weight: 400;\n font-family: var(--if-font-family);\n margin: 0;\n}\n\n/* ============================================\n AUTH BRANDING\n ============================================ */\n.if-authBranding {\n background-color: var(--if-color-bg-light);\n padding: var(--if-space-4) var(--if-space-2);\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: var(--if-space-1);\n}\n\n.if-authBranding-text {\n font-size: var(--if-font-size-xs);\n font-weight: 500;\n color: var(--if-color-text);\n font-family: var(--if-font-family-manrope);\n margin: 0;\n}\n\n/* ============================================\n VERIFICATION CODE INPUT\n ============================================ */\n.if-verificationCode-inputContainer {\n display: flex;\n gap: var(--if-space-3);\n justify-content: center;\n}\n\n.if-verificationCode-input {\n width: 3rem;\n height: 3rem;\n text-align: center;\n font-size: var(--if-font-size-base);\n font-weight: 600;\n border: 1px solid var(--if-color-border);\n border-radius: var(--if-radius-sm);\n transition: border-color var(--if-transition-base);\n font-family: var(--if-font-family-manrope);\n}\n\n.if-verificationCode-input:focus {\n outline: none;\n border-color: var(--if-color-border-focus);\n}\n\n/* ============================================\n VERIFICATION STEP\n ============================================ */\n.if-verificationStep {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-6);\n align-items: stretch;\n}\n\n.if-verificationStep-descriptionContainer {\n width: 100%;\n background-color: #f5f5f5;\n border-radius: var(--if-radius-lg);\n padding: var(--if-space-3) var(--if-space-3) var(--if-space-6) var(--if-space-3);\n display: flex;\n flex-direction: column;\n gap: var(--if-space-3);\n}\n\n.if-verificationStep-descriptionTitle {\n color: var(--black, #000);\n font-family: var(--if-font-family);\n font-size: var(--if-font-size-base);\n font-style: normal;\n font-weight: 600;\n line-height: 24px;\n}\n\n.if-verificationStep-description,\n.if-verificationStep-codeDescription {\n font-size: var(--if-font-size-sm);\n color: #525252;\n text-align: left;\n font-family: var(--if-font-family);\n margin: 0;\n}\n\n.if-verificationLink-email,\n.if-verificationCode-email {\n font-weight: 500;\n color: var(--if-color-text);\n}\n\n.if-verificationStep-codeContainer {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 40px;\n}\n\n.if-verificationStep-codeInputWrapper {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-6);\n}\n\n.if-verificationStep-verifyingText {\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text-secondary);\n text-align: center;\n font-family: var(--if-font-family);\n}\n\n.if-verificationStep-resendContainer {\n width: 100%;\n font-size: var(--if-font-size-sm);\n text-align: center;\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-verificationStep-resendButton {\n color: var(--if-color-text);\n font-weight: 500;\n transition: all var(--if-transition-base);\n background: none;\n border: none;\n padding: 0;\n font-family: var(--if-font-family);\n font-size: var(--if-font-size-sm);\n}\n\n.if-verificationStep-resendButton:not(:disabled) {\n cursor: pointer;\n}\n\n.if-verificationStep-resendButton:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* ============================================\n PASSWORD STRENGTH INDICATOR\n ============================================ */\n.if-passwordStrength {\n margin-top: var(--if-space-2);\n}\n\n.if-passwordStrength-fill {\n height: 100%;\n transition:\n width var(--if-transition-base),\n background-color var(--if-transition-base);\n}\n\n.if-passwordStrength-text {\n font-size: var(--if-font-size-xs);\n color: var(--if-color-text-secondary);\n font-family: var(--if-font-family);\n}\n\n.if-passwordStrength-requirements {\n display: flex;\n flex-direction: column;\n gap: var(--if-space-2);\n font-size: var(--if-font-size-sm);\n color: #525252;\n font-family: var(--if-font-family);\n}\n\n.if-passwordStrength-requirement {\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n}\n\n.if-passwordStrength-requirement.met {\n color: var(--if-color-success);\n}\n\n.if-passwordStrength-requirement.unmet {\n color: var(--if-color-text-muted);\n}\n\n/* ============================================\n FORM CONTAINER\n ============================================ */\n.if-form {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n gap: var(--if-space-6);\n}\n\n/* ============================================\n USER BUTTON\n ============================================ */\n.if-userButton-container {\n position: relative;\n display: inline-block;\n}\n\n.if-userButton {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--if-space-2);\n padding: var(--if-space-2);\n border-radius: 9999px;\n background-color: transparent;\n border: none;\n cursor: pointer;\n transition: all var(--if-transition-base);\n}\n\n.if-userButton:hover {\n opacity: 0.8;\n}\n\n.if-userButton-detailed {\n background-color: var(--if-color-bg-white);\n border: 1px solid var(--if-color-border);\n border-radius: var(--if-radius-sm);\n padding: var(--if-space-2);\n}\n\n.if-userButton-detailed:hover {\n background-color: var(--if-color-bg-light);\n opacity: 1;\n}\n\n.if-userButton-avatar {\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n background-color: var(--if-color-primary);\n color: var(--if-color-bg-white);\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: 600;\n font-size: var(--if-font-size-sm);\n font-family: var(--if-font-family);\n overflow: hidden;\n}\n\n.if-userButton-avatarImage {\n border-radius: 9999px;\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.if-userButton-avatarInitials {\n color: var(--if-color-bg-white);\n font-weight: 600;\n font-size: var(--if-font-size-sm);\n}\n\n.if-userButton-info {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 0.125rem;\n}\n\n.if-userButton-name {\n font-size: var(--if-font-size-sm);\n font-weight: 600;\n color: var(--if-color-text);\n line-height: 1.25rem;\n text-align: left;\n font-family: var(--if-font-family);\n}\n\n.if-userButton-email {\n font-size: var(--if-font-size-xs);\n color: var(--if-color-text-secondary);\n line-height: 1rem;\n text-align: left;\n font-family: var(--if-font-family);\n}\n\n.if-userButton-menu {\n position: absolute;\n margin-top: var(--if-space-2);\n background-color: var(--if-color-bg-white);\n border: 1px solid var(--if-color-border);\n border-radius: var(--if-radius-md);\n box-shadow: var(--if-shadow-lg);\n padding: var(--if-space-2);\n min-width: 200px;\n z-index: 50;\n}\n\n.if-userButton-menuItem {\n display: flex;\n align-items: center;\n gap: var(--if-space-2);\n padding: var(--if-space-2);\n border-radius: var(--if-radius-sm);\n cursor: pointer;\n transition: background-color var(--if-transition-fast);\n font-size: var(--if-font-size-sm);\n color: var(--if-color-text);\n font-family: var(--if-font-family);\n background: none;\n border: none;\n width: 100%;\n text-align: left;\n}\n\n.if-userButton-menuItem:hover {\n background-color: var(--if-color-bg-light);\n}\n\n.if-userButton-menuItem-signout {\n color: var(--if-color-error);\n}\n\n.if-userButton-menuItem-icon {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n/* ============================================\n EMAIL VERIFICATION STATUS\n ============================================ */\n.if-verifyStatus-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--if-space-6);\n}\n\n.if-verifyStatus-container-stretch {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n gap: var(--if-space-6);\n}\n\n.if-verifyStatus-spinner {\n border-radius: 9999px;\n height: 3rem;\n width: 3rem;\n border-bottom: 2px solid var(--if-color-primary);\n}\n\n.if-verifyStatus-successContent {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--if-space-4);\n}\n\n.if-verifyStatus-successIcon {\n width: 4rem;\n height: 4rem;\n border-radius: 9999px;\n background-color: #d1fae5;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.if-verifyStatus-successIconSvg {\n width: 2rem;\n height: 2rem;\n color: #059669;\n}\n\n.if-verifyStatus-textCenter {\n text-align: center;\n}\n\n/* ============================================\n UTILITY CLASSES\n ============================================ */\n.if-hidden {\n display: none;\n}\n\n.if-visuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n";
|
|
9
9
|
if (document.head) {
|
|
10
10
|
document.head.appendChild(style);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
import { createContext, useState, useRef, useCallback, useEffect, useContext } from 'react';
|
|
15
|
+
import { createContext, useState, useRef, useCallback, useEffect, useContext, useMemo } from 'react';
|
|
16
16
|
import { useSearchParams } from 'react-router-dom';
|
|
17
17
|
import { createClient } from '@insforge/sdk';
|
|
18
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -558,6 +558,28 @@ function createRequirements(config) {
|
|
|
558
558
|
}
|
|
559
559
|
return requirements;
|
|
560
560
|
}
|
|
561
|
+
|
|
562
|
+
// src/lib/path-utils.ts
|
|
563
|
+
function resolveAuthPath(targetPath) {
|
|
564
|
+
if (typeof window === "undefined") {
|
|
565
|
+
return targetPath;
|
|
566
|
+
}
|
|
567
|
+
const currentPath = window.location.pathname;
|
|
568
|
+
if (currentPath.startsWith("/auth/")) {
|
|
569
|
+
if (targetPath.startsWith("/auth/")) {
|
|
570
|
+
return targetPath;
|
|
571
|
+
}
|
|
572
|
+
return `/auth${targetPath}`;
|
|
573
|
+
}
|
|
574
|
+
return targetPath;
|
|
575
|
+
}
|
|
576
|
+
function resolveAuthUrl(targetPath, searchParams) {
|
|
577
|
+
const resolvedPath = resolveAuthPath(targetPath);
|
|
578
|
+
if (!searchParams || searchParams.toString() === "") {
|
|
579
|
+
return resolvedPath;
|
|
580
|
+
}
|
|
581
|
+
return `${resolvedPath}?${searchParams.toString()}`;
|
|
582
|
+
}
|
|
561
583
|
function AuthPasswordField({
|
|
562
584
|
label,
|
|
563
585
|
id,
|
|
@@ -570,6 +592,10 @@ function AuthPasswordField({
|
|
|
570
592
|
}) {
|
|
571
593
|
const [showPassword, setShowPassword] = useState(false);
|
|
572
594
|
const [showStrength, setShowStrength] = useState(false);
|
|
595
|
+
const resolvedForgotPasswordHref = useMemo(
|
|
596
|
+
() => forgotPasswordLink ? resolveAuthPath(forgotPasswordLink.href) : void 0,
|
|
597
|
+
[forgotPasswordLink]
|
|
598
|
+
);
|
|
573
599
|
const handleFocus = (e) => {
|
|
574
600
|
if (showStrengthIndicator) {
|
|
575
601
|
setShowStrength(true);
|
|
@@ -579,7 +605,7 @@ function AuthPasswordField({
|
|
|
579
605
|
return /* @__PURE__ */ jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
|
|
580
606
|
(label || forgotPasswordLink) && /* @__PURE__ */ jsxs("div", { className: "if-passwordField-labelRow", children: [
|
|
581
607
|
/* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
|
|
582
|
-
forgotPasswordLink && /* @__PURE__ */ jsx("a", { href:
|
|
608
|
+
forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx("a", { href: resolvedForgotPasswordHref, className: "if-passwordField-forgotLink", children: forgotPasswordLink.text || "Forget Password?" })
|
|
583
609
|
] }),
|
|
584
610
|
/* @__PURE__ */ jsxs("div", { className: "if-passwordField-inputWrapper", children: [
|
|
585
611
|
/* @__PURE__ */ jsx(
|
|
@@ -632,19 +658,7 @@ function AuthSubmitButton({
|
|
|
632
658
|
}
|
|
633
659
|
function AuthLink({ text, linkText, href }) {
|
|
634
660
|
const [searchParams] = useSearchParams();
|
|
635
|
-
const
|
|
636
|
-
const finalHref = (() => {
|
|
637
|
-
if (!currentSearch) {
|
|
638
|
-
return href;
|
|
639
|
-
}
|
|
640
|
-
try {
|
|
641
|
-
const url = new URL(href, window.location.origin);
|
|
642
|
-
url.search = currentSearch;
|
|
643
|
-
return url.pathname + url.search;
|
|
644
|
-
} catch {
|
|
645
|
-
return href;
|
|
646
|
-
}
|
|
647
|
-
})();
|
|
661
|
+
const finalHref = resolveAuthUrl(href, searchParams);
|
|
648
662
|
return /* @__PURE__ */ jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
|
|
649
663
|
text && /* @__PURE__ */ jsx("span", { className: "if-authLink-text", children: text }),
|
|
650
664
|
text && " ",
|
|
@@ -921,7 +935,6 @@ function AuthOAuthProviders({
|
|
|
921
935
|
function AuthVerificationCodeInput({
|
|
922
936
|
length = 6,
|
|
923
937
|
value,
|
|
924
|
-
email,
|
|
925
938
|
onChange,
|
|
926
939
|
disabled = false,
|
|
927
940
|
onComplete
|
|
@@ -969,33 +982,25 @@ function AuthVerificationCodeInput({
|
|
|
969
982
|
}
|
|
970
983
|
}
|
|
971
984
|
};
|
|
972
|
-
return /* @__PURE__ */
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
". Enter it below to proceed."
|
|
978
|
-
] }),
|
|
979
|
-
/* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
|
|
980
|
-
"input",
|
|
981
|
-
{
|
|
982
|
-
ref: (el) => {
|
|
983
|
-
inputRefs.current[index] = el;
|
|
984
|
-
},
|
|
985
|
-
type: "text",
|
|
986
|
-
inputMode: "numeric",
|
|
987
|
-
maxLength: 1,
|
|
988
|
-
value: value[index] || "",
|
|
989
|
-
onChange: (e) => handleChange(index, e.target.value),
|
|
990
|
-
onKeyDown: (e) => handleKeyDown(index, e),
|
|
991
|
-
onPaste: handlePaste,
|
|
992
|
-
disabled,
|
|
993
|
-
className: "if-verificationCode-input",
|
|
994
|
-
autoComplete: "one-time-code"
|
|
985
|
+
return /* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
|
|
986
|
+
"input",
|
|
987
|
+
{
|
|
988
|
+
ref: (el) => {
|
|
989
|
+
inputRefs.current[index] = el;
|
|
995
990
|
},
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
991
|
+
type: "text",
|
|
992
|
+
inputMode: "numeric",
|
|
993
|
+
maxLength: 1,
|
|
994
|
+
value: value[index] || "",
|
|
995
|
+
onChange: (e) => handleChange(index, e.target.value),
|
|
996
|
+
onKeyDown: (e) => handleKeyDown(index, e),
|
|
997
|
+
onPaste: handlePaste,
|
|
998
|
+
disabled,
|
|
999
|
+
className: "if-verificationCode-input",
|
|
1000
|
+
autoComplete: "one-time-code"
|
|
1001
|
+
},
|
|
1002
|
+
index
|
|
1003
|
+
)) });
|
|
999
1004
|
}
|
|
1000
1005
|
function AuthEmailVerificationStep({
|
|
1001
1006
|
email,
|
|
@@ -1008,7 +1013,8 @@ function AuthEmailVerificationStep({
|
|
|
1008
1013
|
const [isSending, setIsSending] = useState(false);
|
|
1009
1014
|
const [verificationCode, setVerificationCode] = useState("");
|
|
1010
1015
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
1011
|
-
const
|
|
1016
|
+
const isLinkMethod = method === "link";
|
|
1017
|
+
const displayDescription = isLinkMethod ? "We have sent an email to {email}. Please check your email to confirm your account before signing in. The confirmation link expires in 10 minutes." : "We've sent a verification code to your inbox at {email}. Enter it below to proceed.";
|
|
1012
1018
|
useEffect(() => {
|
|
1013
1019
|
const sendInitialEmail = async () => {
|
|
1014
1020
|
try {
|
|
@@ -1058,23 +1064,29 @@ function AuthEmailVerificationStep({
|
|
|
1058
1064
|
setVerificationCode("");
|
|
1059
1065
|
}
|
|
1060
1066
|
};
|
|
1061
|
-
const displayDescription = defaultDescription;
|
|
1062
|
-
const isLinkMethod = method === "link";
|
|
1063
1067
|
return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
+
isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
|
|
1069
|
+
/* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Verify Your Email" }),
|
|
1070
|
+
/* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
|
|
1071
|
+
part,
|
|
1072
|
+
index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
|
|
1073
|
+
] }, index)) })
|
|
1074
|
+
] }),
|
|
1068
1075
|
!isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
|
|
1069
|
-
/* @__PURE__ */
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1076
|
+
/* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeInputWrapper", children: [
|
|
1077
|
+
/* @__PURE__ */ jsx("p", { className: "if-verificationStep-codeDescription", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
|
|
1078
|
+
part,
|
|
1079
|
+
index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email })
|
|
1080
|
+
] }, index)) }),
|
|
1081
|
+
/* @__PURE__ */ jsx(
|
|
1082
|
+
AuthVerificationCodeInput,
|
|
1083
|
+
{
|
|
1084
|
+
value: verificationCode,
|
|
1085
|
+
onChange: setVerificationCode,
|
|
1086
|
+
disabled: isVerifying
|
|
1087
|
+
}
|
|
1088
|
+
)
|
|
1089
|
+
] }),
|
|
1078
1090
|
/* @__PURE__ */ jsx(
|
|
1079
1091
|
AuthSubmitButton,
|
|
1080
1092
|
{
|
|
@@ -1084,7 +1096,7 @@ function AuthEmailVerificationStep({
|
|
|
1084
1096
|
onClick: () => {
|
|
1085
1097
|
void handleSubmit();
|
|
1086
1098
|
},
|
|
1087
|
-
children: isVerifying ? "Verifying..." : "
|
|
1099
|
+
children: isVerifying ? "Verifying..." : "Continue"
|
|
1088
1100
|
}
|
|
1089
1101
|
)
|
|
1090
1102
|
] }),
|
|
@@ -1116,6 +1128,8 @@ function AuthResetPasswordVerificationStep({
|
|
|
1116
1128
|
const [isSending, setIsSending] = useState(false);
|
|
1117
1129
|
const [verificationCode, setVerificationCode] = useState("");
|
|
1118
1130
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
1131
|
+
const isLinkMethod = method === "link";
|
|
1132
|
+
const displayDescription = isLinkMethod ? "We have sent an email to {email}. Please check your email to reset your password. The link expires in 10 minutes." : "We've sent a reset password code to your inbox at {email}. Enter it below to proceed.";
|
|
1119
1133
|
useEffect(() => {
|
|
1120
1134
|
if (resendCountdown > 0) {
|
|
1121
1135
|
const timer = setInterval(() => {
|
|
@@ -1155,17 +1169,20 @@ function AuthResetPasswordVerificationStep({
|
|
|
1155
1169
|
setVerificationCode("");
|
|
1156
1170
|
}
|
|
1157
1171
|
};
|
|
1158
|
-
const isLinkMethod = method === "link";
|
|
1159
|
-
const description = isLinkMethod ? `We've sent a password reset link to ${email}. Please check your email and click the link to reset your password. The link will expire in 10 minutes.` : `We've sent a 6-digit verification code to ${email}. Please enter it below to reset your password. The code will expire in 10 minutes.`;
|
|
1160
1172
|
return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
|
|
1161
|
-
/* @__PURE__ */
|
|
1173
|
+
isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
|
|
1174
|
+
/* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Check Your Email" }),
|
|
1175
|
+
/* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
|
|
1176
|
+
part,
|
|
1177
|
+
index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
|
|
1178
|
+
] }, index)) })
|
|
1179
|
+
] }),
|
|
1162
1180
|
!isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
|
|
1163
1181
|
/* @__PURE__ */ jsx("div", { className: "if-verificationStep-codeInputWrapper", children: /* @__PURE__ */ jsx(
|
|
1164
1182
|
AuthVerificationCodeInput,
|
|
1165
1183
|
{
|
|
1166
1184
|
value: verificationCode,
|
|
1167
1185
|
onChange: setVerificationCode,
|
|
1168
|
-
email,
|
|
1169
1186
|
disabled: isVerifying
|
|
1170
1187
|
}
|
|
1171
1188
|
) }),
|
|
@@ -1218,7 +1235,7 @@ function SignInForm({
|
|
|
1218
1235
|
passwordLabel = "Password",
|
|
1219
1236
|
passwordPlaceholder = "\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
1220
1237
|
forgotPasswordText = "Forget Password?",
|
|
1221
|
-
forgotPasswordUrl,
|
|
1238
|
+
forgotPasswordUrl = "/forgot-password",
|
|
1222
1239
|
submitButtonText = "Sign In",
|
|
1223
1240
|
loadingButtonText = "Signing in...",
|
|
1224
1241
|
signUpText = "Don't have an account?",
|
|
@@ -1229,13 +1246,7 @@ function SignInForm({
|
|
|
1229
1246
|
onVerifyCode
|
|
1230
1247
|
}) {
|
|
1231
1248
|
return /* @__PURE__ */ jsxs(AuthContainer, { children: [
|
|
1232
|
-
/* @__PURE__ */ jsx(
|
|
1233
|
-
AuthHeader,
|
|
1234
|
-
{
|
|
1235
|
-
title: showVerificationStep ? "Verify Your Email" : title,
|
|
1236
|
-
subtitle: showVerificationStep ? "" : subtitle
|
|
1237
|
-
}
|
|
1238
|
-
),
|
|
1249
|
+
/* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
|
|
1239
1250
|
/* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
|
|
1240
1251
|
showVerificationStep ? /* @__PURE__ */ jsx(AuthEmailVerificationStep, { email, onVerifyCode }) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
|
|
1241
1252
|
/* @__PURE__ */ jsx(
|
|
@@ -1334,7 +1345,7 @@ function SignIn({ onError, ...uiProps }) {
|
|
|
1334
1345
|
async function handleVerifyCode(code) {
|
|
1335
1346
|
setError("");
|
|
1336
1347
|
try {
|
|
1337
|
-
const result = await verifyEmail(
|
|
1348
|
+
const result = await verifyEmail(code, email);
|
|
1338
1349
|
if (result?.error) {
|
|
1339
1350
|
throw new Error(result.error.message || "Verification failed");
|
|
1340
1351
|
}
|
|
@@ -1405,13 +1416,7 @@ function SignUpForm({
|
|
|
1405
1416
|
onVerifyCode
|
|
1406
1417
|
}) {
|
|
1407
1418
|
return /* @__PURE__ */ jsxs(AuthContainer, { children: [
|
|
1408
|
-
/* @__PURE__ */ jsx(
|
|
1409
|
-
AuthHeader,
|
|
1410
|
-
{
|
|
1411
|
-
title: showVerificationStep ? "Verify Your Email" : title,
|
|
1412
|
-
subtitle: showVerificationStep ? "" : subtitle
|
|
1413
|
-
}
|
|
1414
|
-
),
|
|
1419
|
+
/* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
|
|
1415
1420
|
/* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
|
|
1416
1421
|
showVerificationStep ? /* @__PURE__ */ jsx(AuthEmailVerificationStep, { email, onVerifyCode }) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
|
|
1417
1422
|
/* @__PURE__ */ jsx(
|
|
@@ -1604,7 +1609,7 @@ function SignUp({ onError, ...uiProps }) {
|
|
|
1604
1609
|
async function handleVerifyCode(code) {
|
|
1605
1610
|
setError("");
|
|
1606
1611
|
try {
|
|
1607
|
-
const result = await verifyEmail(
|
|
1612
|
+
const result = await verifyEmail(code, email);
|
|
1608
1613
|
if (result?.error) {
|
|
1609
1614
|
throw new Error(result.error.message || "Verification failed");
|
|
1610
1615
|
}
|
|
@@ -1654,10 +1659,10 @@ function ForgotPasswordForm({
|
|
|
1654
1659
|
error,
|
|
1655
1660
|
loading = false,
|
|
1656
1661
|
title = "Forgot Password?",
|
|
1657
|
-
subtitle = "Enter your email address and we'll send you a
|
|
1662
|
+
subtitle = "Enter your email address and we'll send you a {method} to reset your password.",
|
|
1658
1663
|
emailLabel = "Email",
|
|
1659
1664
|
emailPlaceholder = "example@email.com",
|
|
1660
|
-
submitButtonText = "
|
|
1665
|
+
submitButtonText = "Reset Password",
|
|
1661
1666
|
loadingButtonText = "Sending...",
|
|
1662
1667
|
backToSignInText = "Remember your password?",
|
|
1663
1668
|
backToSignInUrl = "/sign-in",
|
|
@@ -1666,14 +1671,9 @@ function ForgotPasswordForm({
|
|
|
1666
1671
|
onVerifyCode,
|
|
1667
1672
|
onResendEmail
|
|
1668
1673
|
}) {
|
|
1674
|
+
const displaySubtitle = subtitle.replace("{method}", resetPasswordMethod);
|
|
1669
1675
|
return /* @__PURE__ */ jsxs(AuthContainer, { children: [
|
|
1670
|
-
/* @__PURE__ */ jsx(
|
|
1671
|
-
AuthHeader,
|
|
1672
|
-
{
|
|
1673
|
-
title: showVerificationStep ? resetPasswordMethod === "link" ? "Check Your Email" : "Enter Reset Code" : title,
|
|
1674
|
-
subtitle: showVerificationStep ? "" : subtitle
|
|
1675
|
-
}
|
|
1676
|
-
),
|
|
1676
|
+
/* @__PURE__ */ jsx(AuthHeader, { title, subtitle: displaySubtitle }),
|
|
1677
1677
|
/* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
|
|
1678
1678
|
showVerificationStep ? /* @__PURE__ */ jsx(
|
|
1679
1679
|
AuthResetPasswordVerificationStep,
|
|
@@ -1900,12 +1900,9 @@ function ForgotPassword({ onError, ...uiProps }) {
|
|
|
1900
1900
|
const result = await resetPassword(resetToken, newPassword);
|
|
1901
1901
|
if (result?.message) {
|
|
1902
1902
|
setSuccess(true);
|
|
1903
|
-
const signInUrl =
|
|
1904
|
-
searchParams.forEach((value, key) => {
|
|
1905
|
-
signInUrl.searchParams.set(key, value);
|
|
1906
|
-
});
|
|
1903
|
+
const signInUrl = resolveAuthUrl("/sign-in", searchParams);
|
|
1907
1904
|
setTimeout(() => {
|
|
1908
|
-
window.location.href = signInUrl
|
|
1905
|
+
window.location.href = signInUrl;
|
|
1909
1906
|
}, 2e3);
|
|
1910
1907
|
} else {
|
|
1911
1908
|
const errorMessage = "Failed to reset password";
|
|
@@ -2323,23 +2320,24 @@ function Protect({
|
|
|
2323
2320
|
onRedirect
|
|
2324
2321
|
}) {
|
|
2325
2322
|
const { isSignedIn, isLoaded, user } = useInsforge();
|
|
2323
|
+
const resolvedRedirectTo = useMemo(() => resolveAuthPath(redirectTo), [redirectTo]);
|
|
2326
2324
|
useEffect(() => {
|
|
2327
2325
|
if (isLoaded && !isSignedIn) {
|
|
2328
2326
|
if (onRedirect) {
|
|
2329
|
-
onRedirect(
|
|
2327
|
+
onRedirect(resolvedRedirectTo);
|
|
2330
2328
|
} else {
|
|
2331
|
-
window.location.href =
|
|
2329
|
+
window.location.href = resolvedRedirectTo;
|
|
2332
2330
|
}
|
|
2333
2331
|
} else if (isLoaded && isSignedIn && condition && user) {
|
|
2334
2332
|
if (!condition(user)) {
|
|
2335
2333
|
if (onRedirect) {
|
|
2336
|
-
onRedirect(
|
|
2334
|
+
onRedirect(resolvedRedirectTo);
|
|
2337
2335
|
} else {
|
|
2338
|
-
window.location.href =
|
|
2336
|
+
window.location.href = resolvedRedirectTo;
|
|
2339
2337
|
}
|
|
2340
2338
|
}
|
|
2341
2339
|
}
|
|
2342
|
-
}, [isLoaded, isSignedIn,
|
|
2340
|
+
}, [isLoaded, isSignedIn, resolvedRedirectTo, condition, user, onRedirect]);
|
|
2343
2341
|
if (!isLoaded) {
|
|
2344
2342
|
return fallback || /* @__PURE__ */ jsx("div", { className: "insforge-loading", children: "Loading..." });
|
|
2345
2343
|
}
|
|
@@ -2383,52 +2381,42 @@ function useUser() {
|
|
|
2383
2381
|
const { user, isLoaded, updateUser, setUser } = useInsforge();
|
|
2384
2382
|
return { user, isLoaded, updateUser, setUser };
|
|
2385
2383
|
}
|
|
2386
|
-
function RedirectToAuth({
|
|
2384
|
+
function RedirectToAuth({
|
|
2385
|
+
baseUrl,
|
|
2386
|
+
path,
|
|
2387
|
+
afterSignInUrl
|
|
2388
|
+
}) {
|
|
2387
2389
|
useEffect(() => {
|
|
2388
|
-
const currentUrl = window.location.
|
|
2390
|
+
const currentUrl = window.location.origin + afterSignInUrl;
|
|
2389
2391
|
const authUrl = new URL(path, baseUrl);
|
|
2390
2392
|
authUrl.searchParams.set("redirect", currentUrl);
|
|
2391
2393
|
window.location.replace(authUrl.toString());
|
|
2392
|
-
}, [baseUrl, path]);
|
|
2394
|
+
}, [baseUrl, path, afterSignInUrl]);
|
|
2393
2395
|
return null;
|
|
2394
2396
|
}
|
|
2395
2397
|
function getInsforgeRoutes(config) {
|
|
2396
|
-
const { baseUrl, builtInAuth = true, paths = {} } = config;
|
|
2397
|
-
const {
|
|
2398
|
-
signIn = "/sign-in",
|
|
2399
|
-
signUp = "/sign-up",
|
|
2400
|
-
verifyEmail = "/verify-email",
|
|
2401
|
-
forgotPassword = "/forgot-password",
|
|
2402
|
-
resetPassword = "/reset-password"
|
|
2403
|
-
} = paths;
|
|
2398
|
+
const { baseUrl, builtInAuth = true, paths = {}, afterSignInUrl = "/" } = config;
|
|
2399
|
+
const { signIn = "/sign-in", signUp = "/sign-up", forgotPassword = "/forgot-password" } = paths;
|
|
2404
2400
|
const routes = [];
|
|
2405
2401
|
if (builtInAuth) {
|
|
2406
2402
|
routes.push(
|
|
2407
2403
|
{
|
|
2408
2404
|
path: signIn,
|
|
2409
|
-
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/sign-in" })
|
|
2405
|
+
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/sign-in", afterSignInUrl })
|
|
2410
2406
|
},
|
|
2411
2407
|
{
|
|
2412
2408
|
path: signUp,
|
|
2413
|
-
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/sign-up" })
|
|
2414
|
-
},
|
|
2415
|
-
{
|
|
2416
|
-
path: verifyEmail,
|
|
2417
|
-
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/verify-email" })
|
|
2409
|
+
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/sign-up", afterSignInUrl })
|
|
2418
2410
|
},
|
|
2419
2411
|
{
|
|
2420
2412
|
path: forgotPassword,
|
|
2421
2413
|
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/forgot-password" })
|
|
2422
|
-
},
|
|
2423
|
-
{
|
|
2424
|
-
path: resetPassword,
|
|
2425
|
-
element: /* @__PURE__ */ jsx(RedirectToAuth, { baseUrl, path: "/auth/reset-password" })
|
|
2426
2414
|
}
|
|
2427
2415
|
);
|
|
2428
2416
|
}
|
|
2429
2417
|
return routes;
|
|
2430
2418
|
}
|
|
2431
2419
|
|
|
2432
|
-
export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, ForgotPassword, ForgotPasswordForm, InsforgeProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInForm, SignUp, SignUpForm, SignedIn, SignedOut, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getInsforgeRoutes, getProviderConfig, passwordSchema, useAuth, useInsforge, usePublicAuthConfig, useUser, validateEmail, validatePassword };
|
|
2420
|
+
export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, ForgotPassword, ForgotPasswordForm, InsforgeProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInForm, SignUp, SignUpForm, SignedIn, SignedOut, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getInsforgeRoutes, getProviderConfig, passwordSchema, resolveAuthPath, resolveAuthUrl, useAuth, useInsforge, usePublicAuthConfig, useUser, validateEmail, validatePassword };
|
|
2433
2421
|
//# sourceMappingURL=index.js.map
|
|
2434
2422
|
//# sourceMappingURL=index.js.map
|