@donotdev/auth 0.2.2 → 0.2.3

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 (39) hide show
  1. package/dist/AuthStore.d.ts.map +1 -1
  2. package/dist/AuthStore.js +1 -1
  3. package/dist/components/AuthPartnerButton.d.ts.map +1 -1
  4. package/dist/components/EmailPasswordForm.d.ts +8 -18
  5. package/dist/components/EmailPasswordForm.d.ts.map +1 -1
  6. package/dist/components/EmailPasswordForm.js +1 -2
  7. package/dist/components/Feature.js +1 -1
  8. package/dist/components/MultipleAuthProviders.js +1 -1
  9. package/dist/components/PasswordResetCallback.d.ts.map +1 -1
  10. package/dist/components/PasswordResetCallback.js +1 -2
  11. package/dist/components/PasswordStrengthIndicator.d.ts.map +1 -1
  12. package/dist/components/PasswordStrengthIndicator.js +1 -1
  13. package/dist/constants.d.ts.map +1 -1
  14. package/dist/emailAuth/fields.d.ts +108 -0
  15. package/dist/emailAuth/fields.d.ts.map +1 -0
  16. package/dist/emailAuth/fields.js +1 -0
  17. package/dist/emailAuth/flows.d.ts +120 -0
  18. package/dist/emailAuth/flows.d.ts.map +1 -0
  19. package/dist/emailAuth/flows.js +1 -0
  20. package/dist/emailAuth/rules.d.ts +36 -0
  21. package/dist/emailAuth/rules.d.ts.map +1 -0
  22. package/dist/emailAuth/rules.js +2 -0
  23. package/dist/hooks/useAuthPartner.d.ts.map +1 -1
  24. package/dist/hooks/useAuthPartner.js +1 -1
  25. package/dist/hooks/useDeleteAccount.d.ts +15 -1
  26. package/dist/hooks/useDeleteAccount.d.ts.map +1 -1
  27. package/dist/hooks/useDeleteAccount.js +1 -1
  28. package/dist/hooks/useGoogleOneTap.d.ts +2 -1
  29. package/dist/hooks/useGoogleOneTap.d.ts.map +1 -1
  30. package/dist/hooks/useNetworkStatus.d.ts.map +1 -1
  31. package/dist/index.d.ts +6 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/symbol-index.json +1 -1
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/dist/useAuth.d.ts.map +1 -1
  37. package/dist/useAuth.js +1 -1
  38. package/guidelines/AUTH.md +14 -0
  39. package/package.json +5 -5
@@ -1 +1 @@
1
- "use client";import{useState as o}from"react";import{useAuth as f}from"../useAuth";function A(){const c=f("deleteAccount"),[r,e]=o(!1),[u,t]=o(!1),[i,n]=o(!1),[m,l]=o(null);return{showConfirmDialog:r,showPasswordDialog:u,isDeleting:i,error:m,startDeleteFlow:()=>{l(null),e(!0)},confirmDelete:async D=>{n(!0),l(null);try{await c(D),e(!1),t(!1)}catch(a){const s=a.message||a.message;s==="REQUIRES_PASSWORD"?(e(!1),t(!0)):s==="REAUTH_CANCELLED"?(e(!1),t(!1)):l(s||"Failed to delete account")}finally{n(!1)}},cancel:()=>{e(!1),t(!1),l(null)}}}export{A as useDeleteAccount};
1
+ "use client";import{useState as l}from"react";import{useTranslation as D}from"@donotdev/core";import{useAuth as h}from"../useAuth";const f="deleteAccount.errors.",E=/^[A-Za-z0-9_-]+$/;function w(e){const s=typeof e=="object"&&e!==null&&"details"in e?e.details:void 0;return[s?.serverCode,s?.serverMessage,e instanceof Error?e.message:void 0].filter(o=>typeof o=="string"&&E.test(o))}function y(){const e=h("deleteAccount"),{t:s}=D("auth"),[o,t]=l(!1),[d,n]=l(!1),[m,c]=l(!1),[A,r]=l(null);return{showConfirmDialog:o,showPasswordDialog:d,isDeleting:m,error:A,startDeleteFlow:()=>{r(null),t(!0)},confirmDelete:async g=>{c(!0),r(null);try{await e(g),t(!1),n(!1)}catch(u){const a=u.message;if(a==="REQUIRES_PASSWORD")t(!1),n(!0);else if(a==="REAUTH_CANCELLED")t(!1),n(!1);else{const p=w(u).map(i=>s(`${f}${i}`)).find(i=>!i.startsWith(f));r(p??(a||"Failed to delete account"))}}finally{c(!1)}},cancel:()=>{t(!1),n(!1),r(null)}}}export{y as useDeleteAccount};
@@ -1,3 +1,4 @@
1
+ import type { AuthAPI } from '@donotdev/core';
1
2
  /**
2
3
  * Hook options
3
4
  */
@@ -34,7 +35,7 @@ interface UseGoogleOneTapReturn {
34
35
  /** Any error during initialization */
35
36
  error: Error | null;
36
37
  /** Current authenticated user */
37
- user: any;
38
+ user: AuthAPI['user'];
38
39
  /** Whether dark mode is active */
39
40
  isDark: boolean;
40
41
  /** Whether browser supports FedCM */
@@ -1 +1 @@
1
- {"version":3,"file":"useGoogleOneTap.d.ts","sourceRoot":"","sources":["../../src/hooks/useGoogleOneTap.ts"],"names":[],"mappings":"AA6IA;;GAEG;AACH,UAAU,sBAAsB;IAC9B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,uCAAuC;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,4CAA4C;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,uBAAuB;IACvB,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,qBAAqB;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,sCAAsC;IACtC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAElB,2CAA2C;IAC3C,SAAS,EAAE,OAAO,CAAC;IAEnB,sCAAsC;IACtC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAEpB,iCAAiC;IACjC,IAAI,EAAE,GAAG,CAAC;IAEV,kCAAkC;IAClC,MAAM,EAA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W,EAAE,MAAM,IAAI,CAAC;IAExB,6CAA6C;IAC7C,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,UAAiB,EACjB,kBAAyB,EACzB,cAAc,EACd,QAAgB,EAChB,SAAS,EACT,OAAO,EACP,oBAAoB,EACpB,QAAQ,EACR,UAAkB,GACnB,GAAE,sBAA2B,GAAG,qBAAqB,CAkWrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useNetworkStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useNetworkStatus.ts"],"names":[],"mappings":"AAsBA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAiDzD"}
1
+ {"version":3,"file":"useNetworkStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useNetworkStatus.ts"],"names":[],"mappings":"AAsBA,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAoDzD"}
package/dist/index.d.ts CHANGED
@@ -11,12 +11,17 @@ export type { DeleteAccountState } from './hooks/useDeleteAccount';
11
11
  export { getAuthState, subscribeToAuth } from './authHelpers';
12
12
  export { AuthPartnerButton, ConfirmDeleteDialog, FeatureGuard, GoogleOneTap, LoginModal, MultipleAuthProviders, // Added for AuthHeader and future LoginTemplate
13
13
  PasswordResetCallback, ReauthDialog, } from './components';
14
+ export { default as EmailPasswordForm } from './components/EmailPasswordForm';
15
+ export { AUTH_FIELD, useEmailSignIn, useEmailSignUp, usePasswordResetRequest, } from './emailAuth/flows';
16
+ export type { AuthFieldErrors, EmailAuthFlow, EmailAuthFlowOptions, EmailAuthMode, EmailSignUpOptions, EmailSignUpOutcome, } from './emailAuth/flows';
17
+ export { AuthConfirmPasswordField, AuthConsentField, AuthEmailField, AuthForm, AuthFormAlerts, AuthPasswordField, AuthRememberMeField, AuthSubmitButton, } from './emailAuth/fields';
18
+ export type { AuthConsentFieldProps, AuthFormProps, AuthLegalDocument, AuthRememberMeFieldProps, AuthSubmitButtonProps, AuthTextFieldProps, } from './emailAuth/fields';
14
19
  export type { AuthError, // Explicitly import AuthError from core
15
20
  AuthUser as User, // Rename AuthUser to User for public API simplicity
16
21
  UserRole, SubscriptionTier, } from '@donotdev/core';
17
22
  export { getAuthMethod, PARTNER_STATE, EMAIL_VERIFICATION_STATUS, } from './constants';
18
23
  export type { AuthMethod } from './constants';
19
- export type { AuthPartnerButtonProps, GoogleOneTapProps, LoginModalProps, } from './constants';
24
+ export type { AuthPartnerButtonProps, EmailPasswordFormProps, GoogleOneTapProps, LoginModalProps, } from './constants';
20
25
  export type { MultipleAuthProvidersProps } from './components/MultipleAuthProviders';
21
26
  export type { FeatureGuardProps } from './components/FeatureGuard';
22
27
  export type { ConfirmDeleteDialogProps, ReauthDialogProps, } from './components/DeleteAccountDialogs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,e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EACV,cAAc,EACd,cAAc,EACd,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,SAAS,EAAE,wCAAwC;AACnD,QAAQ,IAAI,IAAI,EAAE,oDAAoD;AACtE,QAAQ,EACR,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,aAAa,EACb,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG9C,YAAY,EACV,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,YAAY,EACV,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,mCAAmC,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{useAuth as a}from"./useAuth";import{useDeleteAccount as t}from"./hooks/useDeleteAccount";import{getAuthState as e,subscribeToAuth as s}from"./authHelpers";import{AuthPartnerButton as o,ConfirmDeleteDialog as u,FeatureGuard as r,GoogleOneTap as A,LoginModal as l,MultipleAuthProviders as i,PasswordResetCallback as h,ReauthDialog as T}from"./components";import{getAuthMethod as g,PARTNER_STATE as m,EMAIL_VERIFICATION_STATUS as n}from"./constants";export{o as AuthPartnerButton,u as ConfirmDeleteDialog,n as EMAIL_VERIFICATION_STATUS,r as FeatureGuard,A as GoogleOneTap,l as LoginModal,i as MultipleAuthProviders,m as PARTNER_STATE,h as PasswordResetCallback,T as ReauthDialog,g as getAuthMethod,e as getAuthState,s as subscribeToAuth,a as useAuth,t as useDeleteAccount};
1
+ import{useAuth as s}from"./useAuth";import{useDeleteAccount as a}from"./hooks/useDeleteAccount";import{getAuthState as e,subscribeToAuth as t}from"./authHelpers";import{AuthPartnerButton as o,ConfirmDeleteDialog as u,FeatureGuard as r,GoogleOneTap as i,LoginModal as A,MultipleAuthProviders as l,PasswordResetCallback as m,ReauthDialog as h}from"./components";import{default as d}from"./components/EmailPasswordForm";import{AUTH_FIELD as n,useEmailSignIn as F,useEmailSignUp as T,usePasswordResetRequest as E}from"./emailAuth/flows";import{AuthConfirmPasswordField as g,AuthConsentField as R,AuthEmailField as p,AuthForm as P,AuthFormAlerts as S,AuthPasswordField as f,AuthRememberMeField as I,AuthSubmitButton as b}from"./emailAuth/fields";import{getAuthMethod as C,PARTNER_STATE as D,EMAIL_VERIFICATION_STATUS as M}from"./constants";export{n as AUTH_FIELD,g as AuthConfirmPasswordField,R as AuthConsentField,p as AuthEmailField,P as AuthForm,S as AuthFormAlerts,o as AuthPartnerButton,f as AuthPasswordField,I as AuthRememberMeField,b as AuthSubmitButton,u as ConfirmDeleteDialog,M as EMAIL_VERIFICATION_STATUS,d as EmailPasswordForm,r as FeatureGuard,i as GoogleOneTap,A as LoginModal,l as MultipleAuthProviders,D as PARTNER_STATE,m as PasswordResetCallback,h as ReauthDialog,C as getAuthMethod,e as getAuthState,t as subscribeToAuth,s as useAuth,a as useDeleteAccount,F as useEmailSignIn,T as useEmailSignUp,E as usePasswordResetRequest};
@@ -1 +1 @@
1
- {"useAuth":"/**\n * React hook for authentication with property-based access\n *\n * Single entry point for all authentication operations.\n * Lazy loads FirebaseAuth on first call and connects to store.\n * Uses unified FeatureStatus enum for lifecycle management.\n *\n * **Property-based access (clean and simple):**\n * ```typescript\n * // ✅ State from store (reactive, re-renders on change)\n * const user = useAuth('user');\n * const status = useAuth('status'); // 'initializing' | 'ready' | 'degraded' | 'error'\n * const loading = useAuth('loading');\n * const error = useAuth('error');\n *\n * // ✅ Methods from instance (stable, never re-renders)\n * const signIn = useAuth('signInWithEmail');\n * const signOut = useAuth('signOut');\n * ```\n *\n * **How it works:**\n * - Store properties (user, status, loading, etc.) → Subscribe via Zustand (reactive)\n * - Methods (signInWithEmail, etc.) → Get from FirebaseAuth instance (stable)\n *\n * **Status-based behavior:**\n * - `initializing`: Auth is loading (returns degraded API until ready)\n * - `ready`: Auth fully operational (returns real API)\n * - `degraded`: Auth unavailable (returns degraded API)\n * - `error`: Auth encountered error (returns degraded API)\n *\n * **Error Handling:**\n * All async methods throw DoNotDevError (already wrapped by FirebaseAuth/SmartRecovery).\n *\n * @template K - The property key from AuthAPI\n * @param key - Property name to access\n * @returns The value of the specified property\n *\n * @example\n * ```typescript\n * // Get status (re-renders when status changes)\n * const status = useAuth('status');\n * if (status === 'initializing') return <Spinner overlay />;\n * if (status === 'degraded') return <Error>Auth unavailable</Error>;\n *\n * // Get user (re-renders when user changes)\n * const user = useAuth('user');\n * if (!user) return <LoginButton />;\n *\n * // Get sign-in method (stable, never re-renders)\n * const signIn = useAuth('signInWithEmail');\n * await signIn(email, password);\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function useAuth<K extends keyof AuthAPI>(key: K): AuthAPI[K];","useDeleteAccount":"/**\n * Hook for managing account deletion flow\n *\n * Handles:\n * - Confirmation dialog\n * - Password dialog (when password is required for reauthentication)\n * - Error states\n * - Loading states\n *\n * Reauthentication is handled internally by FirebaseAuth.deleteAccount():\n * - OAuth providers: Automatically triggers popup\n * - Password providers: Requires password parameter\n *\n * @example\n * ```tsx\n * const deletion = useDeleteAccount();\n *\n * // Start flow\n * <Button onClick={deletion.startDeleteFlow}>Delete Account</Button>\n *\n * // Dialogs\n * <ReauthDialog\n * open={deletion.showPasswordDialog}\n * onReauth={(password) => deletion.confirmDelete(password)}\n * onCancel={deletion.cancel}\n * />\n * <ConfirmDeleteDialog\n * open={deletion.showConfirmDialog}\n * onConfirm={() => deletion.confirmDelete()}\n * onCancel={deletion.cancel}\n * />\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n * @returns Account deletion state and actions\n */\nexport declare function useDeleteAccount(): DeleteAccountState;","DeleteAccountState":"/**\n * Account deletion state and actions\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface DeleteAccountState {\n /** Whether confirmation dialog is visible */\n showConfirmDialog: boolean;\n /** Whether account deletion is in progress */\n isDeleting: boolean;\n /** Whether password re-authentication dialog is visible */\n showPasswordDialog: boolean;\n /** Error message if any */\n error: string | null;\n /** Start the deletion flow (shows confirmation dialog) */\n startDeleteFlow: () => void;\n /** Confirm deletion (executes actual deletion, handles reauthentication internally) */\n confirmDelete: (password?: string) => Promise<void>;\n /** Cancel deletion flow (closes dialogs) */\n cancel: () => void;\n}","getAuthState":"/**\n * Get current auth state synchronously\n * Use this in Zustand stores or other non-React contexts\n *\n * **Behavior:**\n * - Always returns valid state (never throws)\n * - Returns initial state if auth is not initialized: `{ user: null, initialized: false, ... }`\n * - Works in both client and server contexts (server returns initial state)\n * - No graceful degradation needed - store always exists with valid initial state\n *\n * @returns Current auth state (or initial state if not initialized)\n *\n * @example\n * ```typescript\n * const authState = getAuthState();\n * const userId = authState.userId; // null if not authenticated\n * const user = authState.user; // null if not authenticated\n * const isInitialized = authState.initialized; // false until auth initializes\n * ```\n */\nexport declare function getAuthState(): AuthState & AuthActions;","subscribeToAuth":"/**\n * Subscribe to auth state changes\n * Use this in Zustand stores or other non-React contexts\n *\n * **Behavior:**\n * - Always returns unsubscribe function (never throws)\n * - Subscriptions work even if auth is not initialized\n * - On server, subscription is a no-op (returns empty unsubscribe function)\n * - Listener receives initial state immediately, then updates as auth state changes\n *\n * **Important:** Always call the returned unsubscribe function to prevent memory leaks.\n *\n * @param listener - Callback function that receives (state, prevState)\n * @returns Unsubscribe function (call to remove listener)\n *\n * @example\n * ```typescript\n * const unsubscribe = subscribeToAuth((state, prevState) => {\n * if (state.user?.id !== prevState.user?.id) {\n * // User changed - handle accordingly\n * if (state.user) {\n * console.log('User signed in:', state.user.id);\n * } else {\n * console.log('User signed out');\n * }\n * }\n * });\n *\n * // Later, cleanup\n * unsubscribe();\n * ```\n */\nexport declare function subscribeToAuth(listener: (state: AuthState & AuthActions, prevState: AuthState & AuthActions) => void): () => void;","AuthPartnerButton":"/**\n * AuthPartnerButton - Authentication button component\n *\n * Provides a unified button interface for authentication with various partners\n * (Google, Facebook, etc.) and methods (OAuth, email/password, email link).\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\ndeclare function AuthPartnerButton({ partnerId, method, onSuccess, onError, className, children, disabled, display, style, ...props }","ConfirmDeleteDialog":"/**\n * Confirmation dialog for account deletion\n *\n * Shows warning, lists what will be deleted, and requires explicit confirmation.\n *\n * @example\n * ```tsx\n * <ConfirmDeleteDialog\n * open={showConfirmDialog}\n * isLoading={isDeleting}\n * error={error}\n * onConfirm={confirmDelete}\n * onCancel={cancel}\n * />\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function ConfirmDeleteDialog({ open, isLoading, error, onConfirm, onCancel, }","FeatureGuard":"/**\n * FeatureGuard component that protects individual components based on user permissions\n *\n * Provides granular feature access control within pages, allowing developers to show/hide\n * features based on user permissions without manual hook management. This complements\n * the route-level AuthGuard by providing component-level protection within pages.\n *\n * **Key Features:**\n * - Role-based access control (user, admin)\n * - Subscription tier validation (free, pro, premium)\n * - Active subscription requirement checking\n * - Custom validation functions\n * - Automatic fallback components with context\n * - Graceful degradation when auth unavailable\n * - Loading state handling\n *\n * **Fallback Behavior:**\n * - Shows loading skeleton while auth state loads\n * - Displays AuthFallback for unauthenticated users (if showLoginPrompt=true)\n * - Shows UpgradePrompt for tier restrictions (if showUpgradePrompt=true)\n * - Displays AccessDenied for role restrictions\n * - Shows SubscriptionExpired for subscription requirements\n * - Renders custom fallback if provided\n * - Returns null if no fallback should be shown\n *\n * **Performance:**\n * - Uses useAuth() hook for reactive updates\n * - Memoizes permission checks\n * - Minimal re-renders on auth state changes\n * - Lazy loading compatible\n *\n * @param props - FeatureGuard configuration\n * @returns Protected component or fallback component\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function FeatureGuard({ children, role, tier, subscription, validate, fallback: CustomFallback, message, showUpgradePrompt, showLoginPrompt, }","GoogleOneTap":"/**\n * Google One Tap authentication component\n *\n * @description\n * Displays Google One Tap prompt for seamless authentication.\n * As of October 2024, FedCM is mandatory - shows clear browser\n * compatibility message if not supported.\n *\n * **Positioning:**\n * Fixed to top-right, below header/breadcrumbs automatically.\n *\n * **States:**\n * - Loading: Shows spinner while initializing\n * - Error: Shows error message with details\n * - Not Supported: Shows browser upgrade message\n * - Ready: Invisible container for Google prompt\n *\n * @param props - Component configuration\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\ndeclare function GoogleOneTap({ clientId, onSuccess, onError, autoSelect, cancelOnTapOutside, className, disabled, promptParentId, allowedParentOrigins, cspNonce, clientOnly, showErrorDetails, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, browserNotSupportedComponent: BrowserNotSupportedComponent, }","LoginModal":"declare const LoginModal: (props: LoginModalProps) => import(\"react\").JSX.Element;","MultipleAuthProviders":"/**\n * Multiple auth providers component with automatic fallback handling\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\ndeclare const MultipleAuthProviders: (props: MultipleAuthProvidersProps) => import(\"react\").JSX.Element;","ReauthDialog":"/**\n * Re-authentication dialog for account deletion\n *\n * Prompts user to re-enter password for security before account deletion.\n *\n * @example\n * ```tsx\n * <ReauthDialog\n * open={showReauthDialog}\n * isLoading={isReauthenticating}\n * error={error}\n * onReauth={reauthenticate}\n * onCancel={cancel}\n * />\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function ReauthDialog({ open, isLoading, error, onReauth, onCancel, }","AuthMethod":"type AuthMethod } from '../constants';","AuthPartnerButtonProps":"/**\n * Props for auth partner button\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface AuthPartnerButtonProps extends AuthCallbackProps, BaseComponentProps {\n partnerId: AuthPartnerId;\n method?: AuthMethod | null;\n children?: React.ReactNode;\n disabled?: boolean;\n /**\n * Display - controls button presentation in preset layouts\n * - 'compact': Icon-only\n * - 'full': Icon + label\n * - 'auto': Responsive (default)\n * @default 'auto'\n */\n display?: (typeof DISPLAY)[keyof typeof DISPLAY];\n}","GoogleOneTapProps":"/**\n * Props for Google One Tap component\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface GoogleOneTapProps extends AuthCallbackProps {\n /** Custom client ID (defaults to env variable) */\n clientId?: string;\n}","LoginModalProps":"/**\n * Props for login modal\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface LoginModalProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}","MultipleAuthProvidersProps":"/**\n * Props for multiple auth providers\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface MultipleAuthProvidersProps extends BaseComponentProps {\n /** Providers to display (defaults to all available providers) */\n providers?: AuthPartnerId[];\n /** CSS class for each provider button */\n buttonClassName?: string;\n}","FeatureGuardProps":"/**\n * Props for FeatureGuard component\n */\nexport interface FeatureGuardProps {\n /** Children to render if access is granted */\n children: ReactNode;\n /** Required role(s) - user must have at least one */\n role?: UserRole | UserRole[];\n /** Required subscription tier */\n tier?: SubscriptionTier;\n /** Whether active subscription is required */\n subscription?: boolean;\n /** Custom validation function */\n validate?: (role: UserRole | undefined, tier: SubscriptionTier | undefined) => boolean;\n /** Fallback component to show when access is denied */\n fallback?: ComponentType<{\n requiredRole?: UserRole | UserRole[];\n requiredTier?: SubscriptionTier;\n requiresSubscription?: boolean;\n userRole?: UserRole;\n userTier?: SubscriptionTier;\n hasSubscription?: boolean;\n }>;\n /** Custom message for fallback */\n message?: string;\n /** Whether to show upgrade prompt for tier restrictions */\n showUpgradePrompt?: boolean;\n /** Whether to show login prompt for auth restrictions */\n showLoginPrompt?: boolean;\n}","ConfirmDeleteDialogProps":"/**\n * Confirmation dialog props\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface ConfirmDeleteDialogProps {\n /** Whether dialog is open */\n open: boolean;\n /** Whether deletion is in progress */\n isLoading: boolean;\n /** Error message if any */\n error: string | null;\n /** Confirm deletion handler */\n onConfirm: () => Promise<void>;\n /** Cancel handler */\n onCancel: () => void;\n}","ReauthDialogProps":"/**\n * Re-authentication dialog props\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface ReauthDialogProps {\n /** Whether dialog is open */\n open: boolean;\n /** Whether re-authentication is in progress */\n isLoading: boolean;\n /** Error message if any */\n error: string | null;\n /** Re-authentication handler */\n onReauth: (password: string) => Promise<void>;\n /** Cancel handler */\n onCancel: () => void;\n}"}
1
+ {"useAuth":"/**\n * React hook for authentication with property-based access\n *\n * Single entry point for all authentication operations.\n * Lazy loads FirebaseAuth on first call and connects to store.\n * Uses unified FeatureStatus enum for lifecycle management.\n *\n * **Property-based access (clean and simple):**\n * ```typescript\n * // ✅ State from store (reactive, re-renders on change)\n * const user = useAuth('user');\n * const status = useAuth('status'); // 'initializing' | 'ready' | 'degraded' | 'error'\n * const loading = useAuth('loading');\n * const error = useAuth('error');\n *\n * // ✅ Methods from instance (stable, never re-renders)\n * const signIn = useAuth('signInWithEmail');\n * const signOut = useAuth('signOut');\n * ```\n *\n * **How it works:**\n * - Store properties (user, status, loading, etc.) → Subscribe via Zustand (reactive)\n * - Methods (signInWithEmail, etc.) → Get from FirebaseAuth instance (stable)\n *\n * **Status-based behavior:**\n * - `initializing`: Auth is loading (returns degraded API until ready)\n * - `ready`: Auth fully operational (returns real API)\n * - `degraded`: Auth unavailable (returns degraded API)\n * - `error`: Auth encountered error (returns degraded API)\n *\n * **Error Handling:**\n * All async methods throw DoNotDevError (already wrapped by FirebaseAuth/SmartRecovery).\n *\n * @template K - The property key from AuthAPI\n * @param key - Property name to access\n * @returns The value of the specified property\n *\n * @example\n * ```typescript\n * // Get status (re-renders when status changes)\n * const status = useAuth('status');\n * if (status === 'initializing') return <Spinner overlay />;\n * if (status === 'degraded') return <Error>Auth unavailable</Error>;\n *\n * // Get user (re-renders when user changes)\n * const user = useAuth('user');\n * if (!user) return <LoginButton />;\n *\n * // Get sign-in method (stable, never re-renders)\n * const signIn = useAuth('signInWithEmail');\n * await signIn(email, password);\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function useAuth<K extends keyof AuthAPI>(key: K): AuthAPI[K];","useDeleteAccount":"/**\n * Hook for managing account deletion flow\n *\n * Handles:\n * - Confirmation dialog\n * - Password dialog (when password is required for reauthentication)\n * - Error states\n * - Loading states\n *\n * Reauthentication is handled internally by FirebaseAuth.deleteAccount():\n * - OAuth providers: Automatically triggers popup\n * - Password providers: Requires password parameter\n *\n * **Server refusals**: when the server refuses the deletion (e.g. a\n * `createDeleteAccount({ beforeDelete })` that throws `open_orders`), `error` is the\n * translation of `deleteAccount.errors.<code>` in the `auth` namespace when that key\n * exists. The code is looked up as the server's `code`, then its `error` message, then\n * the client error message; only `[A-Za-z0-9_-]+` values are tried. Without a matching\n * key, `error` is the raw error message (unchanged behaviour). Consumers add the keys\n * in their `auth` locale override, e.g. `src/locales/auth_fr.json`:\n *\n * ```json\n * { \"deleteAccount\": { \"errors\": {\n * \"open_orders\": \"Vous avez une commande en cours. Réessayez après sa livraison.\"\n * } } }\n * ```\n *\n * @example\n * ```tsx\n * const deletion = useDeleteAccount();\n *\n * // Start flow\n * <Button onClick={deletion.startDeleteFlow}>Delete Account</Button>\n *\n * // Dialogs\n * <ReauthDialog\n * open={deletion.showPasswordDialog}\n * onReauth={(password) => deletion.confirmDelete(password)}\n * onCancel={deletion.cancel}\n * />\n * <ConfirmDeleteDialog\n * open={deletion.showConfirmDialog}\n * onConfirm={() => deletion.confirmDelete()}\n * onCancel={deletion.cancel}\n * />\n * ```\n *\n * @version 0.2.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n * @returns Account deletion state and actions\n */\nexport declare function useDeleteAccount(): DeleteAccountState;","DeleteAccountState":"/**\n * Account deletion state and actions\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface DeleteAccountState {\n /** Whether confirmation dialog is visible */\n showConfirmDialog: boolean;\n /** Whether account deletion is in progress */\n isDeleting: boolean;\n /** Whether password re-authentication dialog is visible */\n showPasswordDialog: boolean;\n /** Error message if any */\n error: string | null;\n /** Start the deletion flow (shows confirmation dialog) */\n startDeleteFlow: () => void;\n /** Confirm deletion (executes actual deletion, handles reauthentication internally) */\n confirmDelete: (password?: string) => Promise<void>;\n /** Cancel deletion flow (closes dialogs) */\n cancel: () => void;\n}","getAuthState":"/**\n * Get current auth state synchronously\n * Use this in Zustand stores or other non-React contexts\n *\n * **Behavior:**\n * - Always returns valid state (never throws)\n * - Returns initial state if auth is not initialized: `{ user: null, initialized: false, ... }`\n * - Works in both client and server contexts (server returns initial state)\n * - No graceful degradation needed - store always exists with valid initial state\n *\n * @returns Current auth state (or initial state if not initialized)\n *\n * @example\n * ```typescript\n * const authState = getAuthState();\n * const userId = authState.userId; // null if not authenticated\n * const user = authState.user; // null if not authenticated\n * const isInitialized = authState.initialized; // false until auth initializes\n * ```\n */\nexport declare function getAuthState(): AuthState & AuthActions;","subscribeToAuth":"/**\n * Subscribe to auth state changes\n * Use this in Zustand stores or other non-React contexts\n *\n * **Behavior:**\n * - Always returns unsubscribe function (never throws)\n * - Subscriptions work even if auth is not initialized\n * - On server, subscription is a no-op (returns empty unsubscribe function)\n * - Listener receives initial state immediately, then updates as auth state changes\n *\n * **Important:** Always call the returned unsubscribe function to prevent memory leaks.\n *\n * @param listener - Callback function that receives (state, prevState)\n * @returns Unsubscribe function (call to remove listener)\n *\n * @example\n * ```typescript\n * const unsubscribe = subscribeToAuth((state, prevState) => {\n * if (state.user?.id !== prevState.user?.id) {\n * // User changed - handle accordingly\n * if (state.user) {\n * console.log('User signed in:', state.user.id);\n * } else {\n * console.log('User signed out');\n * }\n * }\n * });\n *\n * // Later, cleanup\n * unsubscribe();\n * ```\n */\nexport declare function subscribeToAuth(listener: (state: AuthState & AuthActions, prevState: AuthState & AuthActions) => void): () => void;","AuthPartnerButton":"/**\n * AuthPartnerButton - Authentication button component\n *\n * Provides a unified button interface for authentication with various partners\n * (Google, Facebook, etc.) and methods (OAuth, email/password, email link).\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\ndeclare function AuthPartnerButton({ partnerId, method, onSuccess, onError, className, children, disabled, display, style, ...props }","ConfirmDeleteDialog":"/**\n * Confirmation dialog for account deletion\n *\n * Shows warning, lists what will be deleted, and requires explicit confirmation.\n *\n * @example\n * ```tsx\n * <ConfirmDeleteDialog\n * open={showConfirmDialog}\n * isLoading={isDeleting}\n * error={error}\n * onConfirm={confirmDelete}\n * onCancel={cancel}\n * />\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function ConfirmDeleteDialog({ open, isLoading, error, onConfirm, onCancel, }","FeatureGuard":"/**\n * FeatureGuard component that protects individual components based on user permissions\n *\n * Provides granular feature access control within pages, allowing developers to show/hide\n * features based on user permissions without manual hook management. This complements\n * the route-level AuthGuard by providing component-level protection within pages.\n *\n * **Key Features:**\n * - Role-based access control (user, admin)\n * - Subscription tier validation (free, pro, premium)\n * - Active subscription requirement checking\n * - Custom validation functions\n * - Automatic fallback components with context\n * - Graceful degradation when auth unavailable\n * - Loading state handling\n *\n * **Fallback Behavior:**\n * - Shows loading skeleton while auth state loads\n * - Displays AuthFallback for unauthenticated users (if showLoginPrompt=true)\n * - Shows UpgradePrompt for tier restrictions (if showUpgradePrompt=true)\n * - Displays AccessDenied for role restrictions\n * - Shows SubscriptionExpired for subscription requirements\n * - Renders custom fallback if provided\n * - Returns null if no fallback should be shown\n *\n * **Performance:**\n * - Uses useAuth() hook for reactive updates\n * - Memoizes permission checks\n * - Minimal re-renders on auth state changes\n * - Lazy loading compatible\n *\n * @param props - FeatureGuard configuration\n * @returns Protected component or fallback component\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function FeatureGuard({ children, role, tier, subscription, validate, fallback: CustomFallback, message, showUpgradePrompt, showLoginPrompt, }","GoogleOneTap":"/**\n * Google One Tap authentication component\n *\n * @description\n * Displays Google One Tap prompt for seamless authentication.\n * As of October 2024, FedCM is mandatory - shows clear browser\n * compatibility message if not supported.\n *\n * **Positioning:**\n * Fixed to top-right, below header/breadcrumbs automatically.\n *\n * **States:**\n * - Loading: Shows spinner while initializing\n * - Error: Shows error message with details\n * - Not Supported: Shows browser upgrade message\n * - Ready: Invisible container for Google prompt\n *\n * @param props - Component configuration\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\ndeclare function GoogleOneTap({ clientId, onSuccess, onError, autoSelect, cancelOnTapOutside, className, disabled, promptParentId, allowedParentOrigins, cspNonce, clientOnly, showErrorDetails, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, browserNotSupportedComponent: BrowserNotSupportedComponent, }","LoginModal":"declare const LoginModal: (props: LoginModalProps) => import(\"react\").JSX.Element;","MultipleAuthProviders":"/**\n * Multiple auth providers component with automatic fallback handling\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\ndeclare const MultipleAuthProviders: (props: MultipleAuthProvidersProps) => import(\"react\").JSX.Element;","ReauthDialog":"/**\n * Re-authentication dialog for account deletion\n *\n * Prompts user to re-enter password for security before account deletion.\n *\n * @example\n * ```tsx\n * <ReauthDialog\n * open={showReauthDialog}\n * isLoading={isReauthenticating}\n * error={error}\n * onReauth={reauthenticate}\n * onCancel={cancel}\n * />\n * ```\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport declare function ReauthDialog({ open, isLoading, error, onReauth, onCancel, }","EmailPasswordForm":"/**\n * Email/password form with three views: sign in (remember me, forgot password),\n * sign up (password policy + strength, breached-password check, confirmation,\n * consent) and forgot password. Success calls `onSuccess` at once; what the user must\n * still do arrives as a toast that stays until dismissed.\n *\n * @component\n * @example\n * ```tsx\n * <EmailPasswordForm onSuccess={() => setOpen(false)} />\n * ```\n */\ndeclare function EmailPasswordForm({ mode, onSuccess, onError, className, tos, privacy, captchaToken, }","AUTH_FIELD":"/** Field names the flows read from the submitted form. */\nexport declare const AUTH_FIELD: {\n readonly EMAIL: \"email\";\n readonly PASSWORD: \"password\";\n readonly CONFIRM_PASSWORD: \"confirmPassword\";\n readonly REMEMBER_ME: \"rememberMe\";\n readonly CONSENT: \"consent\";\n}","useEmailSignIn":"/**\n * Email + password sign-in. Remember me is applied when the form renders\n * `AuthRememberMeField`; an unconfirmed address offers a resend.\n *\n * @param options - Callbacks and CAPTCHA token\n * @returns The flow, for `AuthForm`\n *\n * @example\n * ```tsx\n * const flow = useEmailSignIn({ onSuccess: close });\n * <AuthForm flow={flow}>\n * <AuthEmailField />\n * <AuthPasswordField />\n * <AuthRememberMeField />\n * <AuthFormAlerts />\n * <AuthSubmitButton />\n * </AuthForm>\n * ```\n */\nexport declare function useEmailSignIn(options?: EmailAuthFlowOptions): EmailAuthFlow;","useEmailSignUp":"/**\n * Email + password sign-up. Password policy and breached-password check apply; the\n * confirmation field and consent are required when the form renders them.\n *\n * Anti-enumeration: an address that already has an account ends exactly like a new\n * one (\"check your email\"). When the provider asks for confirmation, `onSuccess` runs\n * and a toast that stays until dismissed tells the user to confirm, with Resend.\n *\n * @param options - Callbacks, CAPTCHA token, password minimum, extra metadata\n * @returns The flow, for `AuthForm`\n */\nexport declare function useEmailSignUp(options?: EmailSignUpOptions): EmailAuthFlow;","usePasswordResetRequest":"/**\n * Password-reset request. Anti-enumeration: the same outcome whether or not the address\n * has an account; `onSuccess` runs and a toast that stays until dismissed says to check\n * the inbox.\n *\n * @param options - Callbacks and CAPTCHA token\n * @returns The flow, for `AuthForm`\n */\nexport declare function usePasswordResetRequest(options?: EmailAuthFlowOptions): EmailAuthFlow;","AuthFieldErrors":"/** Per-field validation messages, keyed by field name. */\nexport interface AuthFieldErrors {\n email?: string;\n password?: string;\n confirmPassword?: string;\n consent?: string;\n}","EmailAuthFlow":"/** What a form needs from a flow: pass it to `AuthForm`. */\nexport interface EmailAuthFlow {\n /** The flow this is */\n mode: EmailAuthMode;\n /** Form submit handler */\n onSubmit: (event: FormEvent<HTMLFormElement>) => void;\n /** A submit is in progress */\n busy: boolean;\n /** The provider is ready (submit disabled until then) */\n ready: boolean;\n /** The provider failed to start: show an \"unavailable\" notice instead of the form */\n unavailable: boolean;\n /** Submit is blocked (CAPTCHA token missing, throttled) */\n blocked: boolean;\n /** Form-level error (provider error, throttle) */\n error: string | null;\n /** Per-field validation errors */\n fieldErrors: AuthFieldErrors;\n /** Address whose sign-in failed because it was never confirmed (offer a resend) */\n unconfirmedEmail: string | null;\n /** Resend the confirmation email to `email` and confirm with a toast */\n resendVerification: (email: string) => Promise<void>;\n /** Minimum new-password length (sign-up) */\n passwordMinLength: number;\n}","EmailAuthFlowOptions":"/** Options shared by every flow. */\nexport interface EmailAuthFlowOptions {\n /** Called once the flow succeeded: close the dialog / sheet here */\n onSuccess?: () => void;\n /** Called with the provider error after a failed attempt */\n onError?: (error: Error) => void;\n /**\n * CAPTCHA token. `undefined` = no CAPTCHA; while it is `null` / empty the submit is\n * blocked. The app renders the widget.\n */\n captchaToken?: string | null;\n}","EmailAuthMode":"/** Which flow a form runs. */\nexport type EmailAuthMode = 'signin' | 'signup' | 'reset';","EmailSignUpOptions":"/** Options of {@link useEmailSignUp}. */\nexport interface EmailSignUpOptions extends Omit<EmailAuthFlowOptions, 'onSuccess'> {\n /** Called once sign-up succeeded: close the dialog / sheet here */\n onSuccess?: (outcome: EmailSignUpOutcome) => void;\n /** Minimum length of the new password (default 8) */\n passwordMinLength?: number;\n /** Extra sign-up metadata stored with the user (consent metadata is added for you) */\n metadata?: SignUpMetadata;\n /** The app's wording of the \"check your email\" toast (default: framework text) */\n checkEmailMessage?: {\n title: string;\n description?: string;\n };\n}","EmailSignUpOutcome":"/** Outcome of a successful sign-up. */\nexport interface EmailSignUpOutcome {\n /**\n * The address must be confirmed before the user can sign in (no session yet). The\n * flow already showed the \"check your email\" toast with Resend.\n */\n awaitingConfirmation: boolean;\n}","AuthConfirmPasswordField":"/**\n * Second password entry (sign-up, `name=\"confirmPassword\"`). Rendering it makes the\n * flow require a match.\n *\n * @param props - AuthTextFieldProps\n * @returns The field\n */\nexport declare function AuthConfirmPasswordField({ label, placeholder, }","AuthConsentField":"/**\n * Terms / privacy consent (sign-up, `name=\"consent\"`, GDPR). Rendering it makes the\n * flow require it and record `gdpr_consent_at`.\n *\n * @param props - AuthConsentFieldProps\n * @returns The checkbox and links, or nothing when both documents are `false`\n */\nexport declare function AuthConsentField({ tos, privacy }","AuthEmailField":"/**\n * Email field (`name=\"email\"`, `autocomplete=\"username\"`: the identifier password\n * managers pair with the password).\n *\n * @param props - AuthTextFieldProps\n * @returns The field\n */\nexport declare function AuthEmailField({ label, placeholder, defaultValue, }","AuthForm":"/**\n * The `<form>` of an email auth flow. A real form, so password managers pair the\n * fields and Enter submits. Shows an \"unavailable\" notice instead when the auth\n * provider failed to start.\n *\n * @param props - AuthFormProps\n * @returns The form\n */\nexport declare function AuthForm({ flow, children, className }","AuthFormAlerts":"/**\n * Form-level messages: provider error / throttle, and a resend action when sign-in\n * failed on an unconfirmed address.\n *\n * @returns The alerts, or nothing\n */\nexport declare function AuthFormAlerts(): import(\"react\").JSX.Element | null;","AuthPasswordField":"/**\n * Password field. Sign-in: `current-password`. Sign-up: `new-password` and a strength\n * meter with the policy requirements.\n *\n * @param props - AuthTextFieldProps\n * @returns The field\n */\nexport declare function AuthPasswordField({ label, placeholder }","AuthRememberMeField":"/**\n * \"Remember me\" (sign-in, `name=\"rememberMe\"`). Rendered only when the auth provider\n * can honour it; unticked = the session ends with the browser session.\n *\n * @param props - AuthRememberMeFieldProps\n * @returns The checkbox, or nothing when the provider cannot do it\n */\nexport declare function AuthRememberMeField({ label, defaultChecked, }","AuthSubmitButton":"/**\n * Submit button: full width, loading while the flow runs, disabled until the provider\n * is ready and while CAPTCHA / throttle block.\n *\n * @param props - AuthSubmitButtonProps\n * @returns The button\n */\nexport declare function AuthSubmitButton({ children }","AuthConsentFieldProps":"/** Props of {@link AuthConsentField}. */\nexport interface AuthConsentFieldProps {\n /** Terms of Service. Omit: from app config legal links, else `/legal/terms`. `false`: none */\n tos?: AuthLegalDocument | false;\n /** Privacy policy. Omit: from app config legal links, else `/legal/privacy`. `false`: none */\n privacy?: AuthLegalDocument | false;\n}","AuthFormProps":"/** Props of {@link AuthForm}. */\nexport interface AuthFormProps {\n /** The flow this form runs (`useEmailSignIn()`, `useEmailSignUp()`, ...) */\n flow: EmailAuthFlow;\n /** Fields, app content, alerts, submit button */\n children: ReactNode;\n className?: string;\n}","AuthLegalDocument":"/** Legal document: a path (opened in a new tab) or content (shown in a dialog). */\nexport type AuthLegalDocument = string | ReactNode;","AuthRememberMeFieldProps":"/** Props of {@link AuthRememberMeField}. */\nexport interface AuthRememberMeFieldProps {\n /** Label (default: translated \"Remember me\") */\n label?: string;\n /**\n * Initial state.\n * @default true (sessions persist unless the user opts out)\n */\n defaultChecked?: boolean;\n}","AuthSubmitButtonProps":"/** Props of {@link AuthSubmitButton}. */\nexport interface AuthSubmitButtonProps {\n /** Label (default: translated per flow) */\n children?: ReactNode;\n}","AuthTextFieldProps":"/** Props shared by the text fields. */\nexport interface AuthTextFieldProps {\n /** Label (default: translated \"Email\" / \"Password\") */\n label?: string;\n /** Placeholder (default: translated) */\n placeholder?: string;\n /** Initial value */\n defaultValue?: string;\n}","AuthMethod":"type AuthMethod } from '../constants';","AuthPartnerButtonProps":"/**\n * Props for auth partner button\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface AuthPartnerButtonProps extends AuthCallbackProps, BaseComponentProps {\n partnerId: AuthPartnerId;\n method?: AuthMethod | null;\n children?: React.ReactNode;\n disabled?: boolean;\n /**\n * Display - controls button presentation in preset layouts\n * - 'compact': Icon-only\n * - 'full': Icon + label\n * - 'auto': Responsive (default)\n * @default 'auto'\n */\n display?: (typeof DISPLAY)[keyof typeof DISPLAY];\n}","EmailPasswordFormProps":"/**\n * Props for email/password form\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface EmailPasswordFormProps extends BaseComponentProps, AuthCallbackProps {\n /** Form mode - defaults to 'signin' */\n mode?: FormMode;\n compact?: boolean;\n /**\n * Terms of Service path or content (signup only - GDPR/French law).\n * - Omit: auto-detects from app config legalLinks, falls back to '/legal/terms'\n * - `string`: path opened in popup window\n * - `ReactNode`: rendered inline in a Dialog modal\n * - `false`: explicitly disable ToS requirement\n */\n tos?: string | React.ReactNode | false;\n /**\n * Privacy Policy path or content (signup only - GDPR/French law).\n * - Omit: auto-detects from app config legalLinks, falls back to '/legal/privacy'\n * - `string`: path opened in popup window\n * - `ReactNode`: rendered inline in a Dialog modal\n * - `false`: explicitly disable Privacy requirement\n */\n privacy?: string | React.ReactNode | false;\n /**\n * CAPTCHA token to include with auth requests.\n * Consumer is responsible for rendering the CAPTCHA widget (e.g. Turnstile)\n * and passing the token here. When provided, submit is blocked until token is truthy.\n */\n captchaToken?: string;\n}","GoogleOneTapProps":"/**\n * Props for Google One Tap component\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface GoogleOneTapProps extends AuthCallbackProps {\n /** Custom client ID (defaults to env variable) */\n clientId?: string;\n}","LoginModalProps":"/**\n * Props for login modal\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface LoginModalProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}","MultipleAuthProvidersProps":"/**\n * Props for multiple auth providers\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface MultipleAuthProvidersProps extends BaseComponentProps {\n /** Providers to display (defaults to all available providers) */\n providers?: AuthPartnerId[];\n /** CSS class for each provider button */\n buttonClassName?: string;\n}","FeatureGuardProps":"/**\n * Props for FeatureGuard component\n */\nexport interface FeatureGuardProps {\n /** Children to render if access is granted */\n children: ReactNode;\n /** Required role(s) - user must have at least one */\n role?: UserRole | UserRole[];\n /** Required subscription tier */\n tier?: SubscriptionTier;\n /** Whether active subscription is required */\n subscription?: boolean;\n /** Custom validation function */\n validate?: (role: UserRole | undefined, tier: SubscriptionTier | undefined) => boolean;\n /** Fallback component to show when access is denied */\n fallback?: ComponentType<{\n requiredRole?: UserRole | UserRole[];\n requiredTier?: SubscriptionTier;\n requiresSubscription?: boolean;\n userRole?: UserRole;\n userTier?: SubscriptionTier;\n hasSubscription?: boolean;\n }>;\n /** Custom message for fallback */\n message?: string;\n /** Whether to show upgrade prompt for tier restrictions */\n showUpgradePrompt?: boolean;\n /** Whether to show login prompt for auth restrictions */\n showLoginPrompt?: boolean;\n}","ConfirmDeleteDialogProps":"/**\n * Confirmation dialog props\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface ConfirmDeleteDialogProps {\n /** Whether dialog is open */\n open: boolean;\n /** Whether deletion is in progress */\n isLoading: boolean;\n /** Error message if any */\n error: string | null;\n /** Confirm deletion handler */\n onConfirm: () => Promise<void>;\n /** Cancel handler */\n onCancel: () => void;\n}","ReauthDialogProps":"/**\n * Re-authentication dialog props\n *\n * @version 0.1.0\n * @since 0.0.1\n * @author AMBROISE PARK Consulting\n */\nexport interface ReauthDialogProps {\n /** Whether dialog is open */\n open: boolean;\n /** Whether re-authentication is in progress */\n isLoading: boolean;\n /** Error message if any */\n error: string | null;\n /** Re-authentication handler */\n onReauth: (password: string) => Promise<void>;\n /** Cancel handler */\n onCancel: () => void;\n}"}