@donotdev/auth 0.3.1 → 0.3.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 (58) hide show
  1. package/README.md +6 -1
  2. package/dist/AuthStore.js +1 -1
  3. package/dist/authHelpers.js +1 -1
  4. package/dist/components/AccountLinking.js +1 -1
  5. package/dist/components/AuthFallback.js +1 -1
  6. package/dist/components/AuthPartnerButton.js +2 -2
  7. package/dist/components/DeleteAccountDialogs.js +1 -1
  8. package/dist/components/EmailLinkForm.js +1 -1
  9. package/dist/components/EmailPasswordForm.d.ts +4 -2
  10. package/dist/components/EmailPasswordForm.d.ts.map +1 -1
  11. package/dist/components/EmailPasswordForm.js +1 -1
  12. package/dist/components/EmailVerification.js +1 -1
  13. package/dist/components/Feature.js +1 -1
  14. package/dist/components/FeatureGuard.js +1 -1
  15. package/dist/components/FeaturePlaceholder.d.ts +3 -3
  16. package/dist/components/FeaturePlaceholder.js +1 -1
  17. package/dist/components/GoogleOneTap.js +1 -1
  18. package/dist/components/LoginModal.js +1 -1
  19. package/dist/components/MultipleAuthProviders.js +1 -1
  20. package/dist/components/NetworkStatusIndicator.js +1 -1
  21. package/dist/components/PasswordResetCallback.js +1 -1
  22. package/dist/components/PasswordStrengthIndicator.js +1 -1
  23. package/dist/components/PasswordUpdateDialog.js +1 -1
  24. package/dist/components/RateLimitAlert.js +1 -1
  25. package/dist/components/index.js +1 -1
  26. package/dist/constants.d.ts +9 -0
  27. package/dist/constants.d.ts.map +1 -1
  28. package/dist/constants.js +1 -1
  29. package/dist/emailAuth/fields.d.ts +65 -2
  30. package/dist/emailAuth/fields.d.ts.map +1 -1
  31. package/dist/emailAuth/fields.js +1 -1
  32. package/dist/emailAuth/flows.d.ts +182 -15
  33. package/dist/emailAuth/flows.d.ts.map +1 -1
  34. package/dist/emailAuth/flows.js +1 -1
  35. package/dist/emailAuth/rules.d.ts +33 -4
  36. package/dist/emailAuth/rules.d.ts.map +1 -1
  37. package/dist/emailAuth/rules.js +2 -2
  38. package/dist/hooks/useAccountLinking.js +1 -1
  39. package/dist/hooks/useAuthMethodToggle.js +1 -1
  40. package/dist/hooks/useAuthPartner.js +1 -1
  41. package/dist/hooks/useAuthUsers.d.ts +34 -0
  42. package/dist/hooks/useAuthUsers.d.ts.map +1 -0
  43. package/dist/hooks/useAuthUsers.js +1 -0
  44. package/dist/hooks/useDeleteAccount.js +1 -1
  45. package/dist/hooks/useEmailLinkAuth.js +1 -1
  46. package/dist/hooks/useEmailLinkForm.js +1 -1
  47. package/dist/hooks/useFedCM.js +1 -1
  48. package/dist/hooks/useGoogleOneTap.js +1 -1
  49. package/dist/hooks/useNetworkStatus.js +1 -1
  50. package/dist/index.d.ts +9 -5
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +1 -1
  53. package/dist/symbol-index.json +1 -1
  54. package/dist/tsconfig.tsbuildinfo +1 -1
  55. package/dist/useAuth.d.ts.map +1 -1
  56. package/dist/useAuth.js +1 -1
  57. package/guidelines/AUTH.md +68 -2
  58. package/package.json +5 -5
@@ -1 +1 @@
1
- "use client";import{useState as s,useEffect as u}from"react";import{isClient as c}from"@donotdev/core";function O(){const[n,o]=s(()=>c()?navigator.onLine:!0),[e,r]=s("unknown");return u(()=>{if(!c())return;const t=()=>o(!0),i=()=>o(!1),f=()=>{if("connection"in navigator){const l=navigator.connection;r(l.effectiveType||"unknown")}};return window.addEventListener("online",t),window.addEventListener("offline",i),f(),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}},[]),{online:n,connectionType:e,isSlowConnection:e==="slow-2g"||e==="2g",isOnline:n,isOffline:!n}}export{O as useNetworkStatus};
1
+ "use client";import{useState as r,useEffect as w}from"react";import{isClient as s}from"@donotdev/core";function l(){const[n,o]=r(()=>s()?navigator.onLine:!0),[e,f]=r("unknown");return w(()=>{if(!s())return;const i=()=>o(!0),t=()=>o(!1),a=()=>{if("connection"in navigator){const c=navigator.connection;f(c.effectiveType||"unknown")}};return window.addEventListener("online",i),window.addEventListener("offline",t),a(),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",t)}},[]),{online:n,connectionType:e,isSlowConnection:e==="slow-2g"||e==="2g",isOnline:n,isOffline:!n}}export{l as useNetworkStatus};
package/dist/index.d.ts CHANGED
@@ -8,17 +8,21 @@
8
8
  export { useAuth } from './useAuth';
9
9
  export { useDeleteAccount } from './hooks/useDeleteAccount';
10
10
  export type { DeleteAccountState } from './hooks/useDeleteAccount';
11
+ export { useAuthUsers } from './hooks/useAuthUsers';
12
+ export type { AuthUsersState } from './hooks/useAuthUsers';
11
13
  export { getAuthState, subscribeToAuth } from './authHelpers';
12
14
  export { AuthPartnerButton, ConfirmDeleteDialog, FeatureGuard, GoogleOneTap, LoginModal, MultipleAuthProviders, // Added for AuthHeader and future LoginTemplate
13
15
  PasswordResetCallback, ReauthDialog, } from './components';
14
16
  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';
17
+ export { AUTH_FIELD, useEmailCodeConfirmation, useEmailSignIn, useEmailSignUp, usePasswordResetRequest, validateEmail, } from './emailAuth/flows';
18
+ export { DEFAULT_PASSWORD_MIN_LENGTH, isEmail, newPasswordError, } from './emailAuth/rules';
19
+ export type { AuthT } from './emailAuth/rules';
20
+ export type { AuthFieldErrors, EmailAuthFlow, EmailCodeConfirmation, EmailCodeConfirmationOptions, EmailSignUpConfirmation, EmailAuthFlowOptions, EmailAuthMode, EmailSignInOptions, EmailSignUpOptions, EmailSignUpOutcome, PasswordResetRequestFlow, PasswordResetRequestOptions, } from './emailAuth/flows';
21
+ export { AuthCodeField, AuthCodeStep, AuthConfirmPasswordField, AuthConsentField, AuthEmailField, AuthForm, AuthFormAlerts, AuthNameField, AuthPasswordField, AuthRememberMeField, AuthSubmitButton, } from './emailAuth/fields';
22
+ export type { AuthCodeFieldProps, AuthCodeStepProps, AuthConsentFieldProps, AuthFormProps, AuthLegalDocument, AuthNameFieldProps, AuthRememberMeFieldProps, AuthSubmitButtonProps, AuthTextFieldProps, } from './emailAuth/fields';
19
23
  export type { AuthError, // Explicitly import AuthError from core
20
24
  AuthUser as User, // Rename AuthUser to User for public API simplicity
21
- UserRole, SubscriptionTier, } from '@donotdev/core';
25
+ AuthUserSummary, UserRole, SubscriptionTier, } from '@donotdev/core';
22
26
  export { getAuthMethod, PARTNER_STATE, EMAIL_VERIFICATION_STATUS, } from './constants';
23
27
  export type { AuthMethod } from './constants';
24
28
  export type { AuthPartnerButtonProps, EmailPasswordFormProps, GoogleOneTapProps, LoginModalProps, } from './constants';
@@ -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,eAAe,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,qBAAqB,EAAE,gDAAgD;AACvE,qBAAqB,EACrB,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EACL,UAAU,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"}
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,MAAM,sBAAsB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,qBAAqB,EAAE,gDAAgD;AACvE,qBAAqB,EACrB,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EACL,UAAU,EACV,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,2BAA2B,EAC3B,OAAO,EACP,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,YAAY,EACV,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,SAAS,EAAE,wCAAwC;AACnD,QAAQ,IAAI,IAAI,EAAE,oDAAoD;AACtE,eAAe,EACf,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 o}from"./useAuth";import{useDeleteAccount as u}from"./hooks/useDeleteAccount";import{getAuthState as a,subscribeToAuth as A}from"./authHelpers";import{AuthPartnerButton as i,ConfirmDeleteDialog as m,FeatureGuard as h,GoogleOneTap as d,LoginModal as n,MultipleAuthProviders as f,PasswordResetCallback as p,ReauthDialog as F}from"./components";import{default as T}from"./components/EmailPasswordForm";import{AUTH_FIELD as x,useEmailSignIn as P,useEmailSignUp as R,usePasswordResetRequest as S}from"./emailAuth/flows";import{AuthConfirmPasswordField as b,AuthConsentField as w,AuthEmailField as C,AuthForm as D,AuthFormAlerts as M,AuthPasswordField as c,AuthRememberMeField as _,AuthSubmitButton as L}from"./emailAuth/fields";import{getAuthMethod as B,PARTNER_STATE as G,EMAIL_VERIFICATION_STATUS as N}from"./constants";export{x as AUTH_FIELD,b as AuthConfirmPasswordField,w as AuthConsentField,C as AuthEmailField,D as AuthForm,M as AuthFormAlerts,i as AuthPartnerButton,c as AuthPasswordField,_ as AuthRememberMeField,L as AuthSubmitButton,m as ConfirmDeleteDialog,N as EMAIL_VERIFICATION_STATUS,T as EmailPasswordForm,h as FeatureGuard,d as GoogleOneTap,n as LoginModal,f as MultipleAuthProviders,G as PARTNER_STATE,p as PasswordResetCallback,F as ReauthDialog,B as getAuthMethod,a as getAuthState,A as subscribeToAuth,o as useAuth,u as useDeleteAccount,P as useEmailSignIn,R as useEmailSignUp,S as usePasswordResetRequest};
1
+ import{useAuth as s}from"./useAuth";import{useDeleteAccount as a}from"./hooks/useDeleteAccount";import{useAuthUsers as e}from"./hooks/useAuthUsers";import{getAuthState as t,subscribeToAuth as o}from"./authHelpers";import{AuthPartnerButton as u,ConfirmDeleteDialog as r,FeatureGuard as i,GoogleOneTap as A,LoginModal as l,MultipleAuthProviders as m,PasswordResetCallback as d,ReauthDialog as h}from"./components";import{default as n}from"./components/EmailPasswordForm";import{AUTH_FIELD as E,useEmailCodeConfirmation as F,useEmailSignIn as T,useEmailSignUp as S,usePasswordResetRequest as p,validateEmail as P}from"./emailAuth/flows";import{DEFAULT_PASSWORD_MIN_LENGTH as C,isEmail as R,newPasswordError as f}from"./emailAuth/rules";import{AuthCodeField as g,AuthCodeStep as D,AuthConfirmPasswordField as I,AuthConsentField as _,AuthEmailField as w,AuthForm as M,AuthFormAlerts as b,AuthNameField as L,AuthPasswordField as N,AuthRememberMeField as U,AuthSubmitButton as c}from"./emailAuth/fields";import{getAuthMethod as G,PARTNER_STATE as O,EMAIL_VERIFICATION_STATUS as v}from"./constants";export{E as AUTH_FIELD,g as AuthCodeField,D as AuthCodeStep,I as AuthConfirmPasswordField,_ as AuthConsentField,w as AuthEmailField,M as AuthForm,b as AuthFormAlerts,L as AuthNameField,u as AuthPartnerButton,N as AuthPasswordField,U as AuthRememberMeField,c as AuthSubmitButton,r as ConfirmDeleteDialog,C as DEFAULT_PASSWORD_MIN_LENGTH,v as EMAIL_VERIFICATION_STATUS,n as EmailPasswordForm,i as FeatureGuard,A as GoogleOneTap,l as LoginModal,m as MultipleAuthProviders,O as PARTNER_STATE,d as PasswordResetCallback,h as ReauthDialog,G as getAuthMethod,t as getAuthState,R as isEmail,f as newPasswordError,o as subscribeToAuth,s as useAuth,e as useAuthUsers,a as useDeleteAccount,F as useEmailCodeConfirmation,T as useEmailSignIn,S as useEmailSignUp,p as usePasswordResetRequest,P as validateEmail};
@@ -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 * During initialization, request snapshots supply display-only identity and access\n * state without seeding the singleton store. Omitted subscriptions grant no paid\n * access. Snapshot capabilities are request-local; ready capabilities read the\n * live store at call time and remain stable until access state changes.\n * Protected server operations must still authorize against fresh trusted auth.\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}"}
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 * During initialization, request snapshots supply display-only identity and access\n * state without seeding the singleton store. Omitted subscriptions grant no paid\n * access. Snapshot capabilities are request-local; ready capabilities read the\n * live store at call time and remain stable until access state changes.\n * Protected server operations must still authorize against fresh trusted auth.\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}","useAuthUsers":"/**\n * Lists every auth account for admin pages. Loads once when auth is ready; the\n * provider calls its admin-only `listAuthUsers` server function, which the app deploys\n * (`createListAuthUsers` for Supabase, `listAuthUsers` for Firebase, from\n * `@donotdev/functions`). A non-admin gets `error`, never a partial list.\n *\n * @example\n * ```tsx\n * const { users, loading, error, reload } = useAuthUsers();\n * ```\n *\n * @returns `{ users, loading, error, reload }`\n * @version 0.1.0\n * @since 0.3.3\n */\nexport declare function useAuthUsers(): AuthUsersState;","AuthUsersState":"/**\n * Auth user list state\n *\n * @version 0.1.0\n * @since 0.3.3\n */\nexport interface AuthUsersState {\n /** Every auth account; empty until loaded */\n users: AuthUserSummary[];\n /** True while auth initialises or the list loads */\n loading: boolean;\n /** Load failure (not an admin, server function not deployed, network) */\n error: Error | null;\n /** Load the list again */\n reload: () => Promise<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. With `confirmation=\"code\"`,\n * a sign-up (or a sign-in of an unconfirmed address) shows the code step instead, and\n * `onSuccess` runs once the code signed the user in.\n *\n * @component\n * @example\n * ```tsx\n * <EmailPasswordForm onSuccess={() => setOpen(false)} />\n * ```\n */\ndeclare function EmailPasswordForm({ mode, onSuccess, onError, className, tos, privacy, captchaToken, confirmation, }","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 readonly DISPLAY_NAME: \"displayName\";\n}","useEmailCodeConfirmation":"/**\n * The code step of a sign-up made with `useEmailSignUp({ confirmation: 'code' })`:\n * the user types the emailed code, `useAuth('verifyEmailCode')` confirms it and signs\n * the user in. Same client throttle as the email flows; wrong / expired code and rate\n * limits get translated messages. Resend sends a new code with\n * `useAuth('sendEmailVerification')` once the countdown is over. No toast: the\n * outcome is state (`error`, `resent`) that `AuthCodeField` renders inline.\n *\n * @param options - Address, code length, resend cooldown, callbacks\n * @returns The code step state, for `AuthCodeField`\n *\n * @example\n * ```tsx\n * const confirmation = useEmailCodeConfirmation({ email, length: 8, onSuccess: close });\n * <AuthCodeField confirmation={confirmation} />\n * ```\n */\nexport declare function useEmailCodeConfirmation(options: EmailCodeConfirmationOptions): EmailCodeConfirmation;","useEmailSignIn":"/**\n * Email + password sign-in. Remember me is applied when the form renders\n * `AuthRememberMeField`. An unconfirmed address offers a resend, or with\n * `confirmation: 'code'` gets a fresh code and `onCodeSent(email)` (show `AuthCodeStep`).\n *\n * @param options - Callbacks, CAPTCHA token, confirmation mode\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?: EmailSignInOptions): EmailAuthFlow;","useEmailSignUp":"/**\n * Email + password sign-up. Password policy (`passwordComposition: false` = length\n * only) and breached-password check apply; the confirmation field and consent are\n * required when the form renders them. `AuthNameField`, when rendered and filled, is\n * stored trimmed as the user's display name (metadata `full_name`); never required.\n *\n * Anti-enumeration: an address that already has an account ends exactly like a new\n * one (`awaitingConfirmation: true`). When the provider asks for confirmation,\n * `onSuccess` runs and then:\n * - `confirmation: 'toast'` (default): a toast that stays until dismissed tells the\n * user to confirm, with Resend;\n * - `confirmation: 'code'`: nothing more; the app shows the code step for\n * `outcome.email`. For an existing address the flow sends a password-reset\n * email (`sendPasswordResetEmail`), fire-and-forget: a failure goes to\n * `console.error`, never to the screen.\n * A project that does not require confirmation signs the user in at once:\n * `awaitingConfirmation: false`.\n *\n * @param options - Callbacks, CAPTCHA token, password policy, extra metadata,\n * confirmation mode\n * @returns The flow, for `AuthForm`\n *\n * @example\n * ```tsx\n * const [email, setEmail] = useState<string | null>(null);\n * const flow = useEmailSignUp({\n * confirmation: 'code',\n * onSuccess: (outcome) => {\n * if (outcome.awaitingConfirmation) setEmail(outcome.email);\n * else close();\n * },\n * });\n * ```\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; `sent` turns `true`, `onSuccess` runs and a toast that stays until\n * dismissed says to check the inbox (`toast: false`: no toast, the app shows the\n * message inline from `sent`).\n *\n * @param options - Callbacks, CAPTCHA token, toast opt-out\n * @returns The flow, for `AuthForm`\n */\nexport declare function usePasswordResetRequest(options?: PasswordResetRequestOptions): PasswordResetRequestFlow;","validateEmail":"/**\n * The email check of every flow: the translated \"required\" / \"invalid\" message, or\n * `undefined` when `email` (already trimmed) is valid.\n *\n * @param t - Translate function of the `auth` namespace\n * @param email - The trimmed address\n * @returns The error message, or `undefined`\n */\nexport declare const validateEmail: (t: AuthT, email: string) => string | undefined;","DEFAULT_PASSWORD_MIN_LENGTH":"/** Default minimum length of a new password. */\nexport declare const DEFAULT_PASSWORD_MIN_LENGTH = 8;","isEmail":"/** Whether `email` looks like an address (the provider validates for real). */\nexport declare function isEmail(email: string): boolean;","newPasswordError":"/**\n * First rule a new password breaks, or `null`. Policy: minimum length (8 by default),\n * then, unless `composition` is `false`, one uppercase letter, one lowercase letter,\n * one digit, one special character.\n *\n * @param password - The new password\n * @param minLength - Minimum length\n * @param t - Translate function of the `auth` namespace\n * @param composition - Apply the character-class rules (default `true`); `false` keeps\n * only the empty check and the minimum length (NIST 800-63B: length over composition)\n * @returns The message of the first broken rule, or `null`\n */\nexport declare function newPasswordError(password: string, minLength: number, t: AuthT, composition?: boolean): string | null;","AuthT":"/** Translate function of the `auth` namespace (key, fallback, interpolation). */\nexport type AuthT = (key: string, fallback: string, values?: Record<string, unknown>) => string;","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 /**\n * The character-class rules apply to the new password (sign-up). Absent = `true`.\n * `AuthPasswordField` shows the requirements checklist only then.\n */\n passwordComposition?: boolean;\n}","EmailCodeConfirmation":"/** What the code step needs from {@link useEmailCodeConfirmation}: pass it to `AuthCodeField`. */\nexport interface EmailCodeConfirmation {\n /** The address the code was sent to */\n email: string;\n /** Characters of the code */\n length: number;\n /** The code typed so far */\n code: string;\n /** Update the typed code */\n setCode: (code: string) => void;\n /**\n * Confirm the code (`code` by default; pass the value when it is not in state yet,\n * e.g. from `onComplete`). A wrong or expired code clears the typed code.\n */\n submit: (code?: string) => Promise<void>;\n /** A confirmation is in progress */\n busy: boolean;\n /** Translated message of the last failure (wrong / expired code, throttle, failed resend...), or `null` */\n error: string | null;\n /**\n * Send a new code (no-op while `resendIn > 0`) and restart the countdown. No toast:\n * success sets `resent`, a failure sets `error`.\n */\n resend: () => Promise<void>;\n /** A new code was sent: `true` after a successful resend until the next submit or resend */\n resent: boolean;\n /** A resend is in progress */\n resending: boolean;\n /** Seconds left before `resend` is allowed (0 = allowed) */\n resendIn: number;\n /** The provider is ready (confirm and resend wait for it) */\n ready: boolean;\n}","EmailCodeConfirmationOptions":"/** Options of {@link useEmailCodeConfirmation}. */\nexport interface EmailCodeConfirmationOptions {\n /** The address that signed up (`EmailSignUpOutcome.email`) */\n email: string;\n /**\n * Characters of the emailed code: match the provider (Supabase:\n * `mailer_otp_length`).\n * @default 6\n */\n length?: number;\n /**\n * Seconds before the code can be sent again. The countdown starts at mount: the\n * sign-up just sent a code.\n * @default 60\n */\n resendCooldownSeconds?: number;\n /** Called with the signed-in user once the code is confirmed: close the sheet here */\n onSuccess?: (user: AuthUser) => void;\n /** Called with the provider error after a failed confirmation or resend */\n onError?: (error: Error) => void;\n}","EmailSignUpConfirmation":"/**\n * How a sign-up that needs confirmation ends.\n * - `'toast'`: a toast that stays until dismissed says to open the confirmation\n * email, with Resend (the link in the email confirms).\n * - `'code'`: no toast; the app shows the code step (`useEmailCodeConfirmation`).\n * Needs a provider that implements `verifyEmailCode` (Supabase) and an email\n * template that sends the code.\n */\nexport type EmailSignUpConfirmation = 'toast' | 'code';","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';","EmailSignInOptions":"/** Options of {@link useEmailSignIn}. */\nexport interface EmailSignInOptions extends EmailAuthFlowOptions {\n /**\n * How a sign-in of an unconfirmed address ends (default `'toast'`).\n * - `'toast'`: the form error, with a \"Resend verification email\" action.\n * - `'code'`: the flow sends a fresh code (`sendEmailVerification`) and calls\n * `onCodeSent`; the app shows the code step (`AuthCodeStep`). A rate-limited\n * resend still calls `onCodeSent` (the code already sent stays valid); other\n * resend errors are the form error.\n */\n confirmation?: EmailSignUpConfirmation;\n /** Code mode: a fresh code was sent to this unconfirmed address; show the code step */\n onCodeSent?: (email: string) => void;\n}","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 /**\n * How a sign-up that needs confirmation ends (default `'toast'`, see\n * {@link EmailSignUpConfirmation}). Code mode, existing address: the provider sends\n * no confirmation code, so the flow sends a password-reset email instead\n * (fire-and-forget; the app words that template to cover \"you already have an\n * account\"). Its failure is logged, never shown, never changes the outcome.\n */\n confirmation?: EmailSignUpConfirmation;\n /**\n * Apply the character-class rules to the new password (uppercase, lowercase, digit,\n * special; default `true`). `false`: only the minimum length applies; the\n * breached-password check stays.\n */\n passwordComposition?: boolean;\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).\n * Toast mode: the flow already showed the \"check your email\" toast with Resend.\n * Code mode: show the code step for `email`.\n */\n awaitingConfirmation: boolean;\n /** The address that signed up (trimmed), e.g. for the code step */\n email: string;\n}","PasswordResetRequestFlow":"/** The password-reset request flow: an {@link EmailAuthFlow} plus `sent`. */\nexport interface PasswordResetRequestFlow extends EmailAuthFlow {\n /** The request went through (any address): `true` until the next submit */\n sent: boolean;\n}","PasswordResetRequestOptions":"/** Options of {@link usePasswordResetRequest}. */\nexport interface PasswordResetRequestOptions extends EmailAuthFlowOptions {\n /**\n * Confirm with a toast that stays until dismissed (default `true`). `false`: no\n * toast; render the \"check your inbox\" message inline from `flow.sent`.\n * @default true\n */\n toast?: boolean;\n}","AuthCodeField":"/**\n * The sign-up code step: one box per character (`autocomplete=\"one-time-code\"`,\n * paste of the whole code), submitted as soon as the last character is typed, the\n * error under it, \"A new code has been sent.\" under it after a resend (no toast), and\n * a Resend button with its countdown; after a resend the code input has focus again.\n * Render it outside the\n * sign-up `AuthForm` (it is not a form field).\n *\n * @param props - AuthCodeFieldProps\n * @returns The code field\n */\nexport declare function AuthCodeField({ confirmation, label }","AuthCodeStep":"/**\n * The whole code step of a `confirmation: 'code'` sign-up or sign-in: \"Enter the code\n * sent to {email}\", the code field (auto-submit, error, inline \"new code sent\",\n * Resend with countdown) and, with `onChangeEmail`, a \"Change address\" link. No toast.\n *\n * @param props - AuthCodeStepProps\n * @returns The code step\n *\n * @example\n * ```tsx\n * <AuthCodeStep email={email} onSuccess={next} onChangeEmail={() => setEmail(null)} />\n * ```\n */\nexport declare function AuthCodeStep({ email, length, onSuccess, onChangeEmail, }","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;","AuthNameField":"/**\n * Name field (`name=\"displayName\"`, `autocomplete=\"name\"`): the name the user wants in\n * emails. Optional, never validated: sign-up stores it trimmed as the display name\n * (metadata `full_name`) when filled, nothing when empty.\n *\n * @param props - AuthNameFieldProps\n * @returns The field\n */\nexport declare function AuthNameField({ label, placeholder, defaultValue, info, }","AuthPasswordField":"/**\n * Password field. Sign-in: `current-password`. Sign-up: `new-password` and a strength\n * meter, with the policy requirements unless the flow's `passwordComposition` is\n * `false`.\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 }","AuthCodeFieldProps":"/** Props of {@link AuthCodeField}. */\nexport interface AuthCodeFieldProps {\n /** The code step (`useEmailCodeConfirmation(...)`) */\n confirmation: EmailCodeConfirmation;\n /** Label (default: translated \"Confirmation code\") */\n label?: string;\n}","AuthCodeStepProps":"/** Props of {@link AuthCodeStep}. */\nexport interface AuthCodeStepProps {\n /** The address the code was sent to */\n email: string;\n /**\n * Characters of the code: match the provider (Supabase: `mailer_otp_length`).\n * @default 6\n */\n length?: number;\n /** Called with the signed-in user once the code is confirmed */\n onSuccess?: (user: AuthUser) => void;\n /** Shows a \"Change address\" link that calls this (back to the form) */\n onChangeEmail?: () => void;\n}","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;","AuthNameFieldProps":"/** Props of {@link AuthNameField}. */\nexport interface AuthNameFieldProps extends AuthTextFieldProps {\n /** Help text: an (i) after the label shows it on hover, focus or tap */\n info?: string;\n}","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 /**\n * How a sign-up (or a sign-in of an unconfirmed address) confirms the email\n * (default `'toast'`: the \"check your email\" toast with Resend). `'code'`: the form\n * shows `AuthCodeStep` (a 6-character emailed code), then calls `onSuccess` once\n * signed in. Needs a provider with `verifyEmailCode` (Supabase) and a code email\n * template.\n * @default 'toast'\n */\n confirmation?: 'toast' | 'code';\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}"}