| 1 | import type { |
| 2 | AuthPluginComponents, |
| 3 | AuthPlugin as AuthPluginPrimitive, |
| 4 | } from "@better-auth-ui/react"; |
| 5 | |
| 6 | declare module "@better-auth-ui/core" |
| 7 | /** Widens `useAuth().plugins` to the shadcn-typed `AuthPlugin`. */ |
| 8 | interface AuthPluginRegister |
| 9 | shadcn: AuthPlugin |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | /** Props the shadcn `<Auth>` router spreads onto plugin-contributed auth views. */ |
| 14 | export type AuthViewProps |
| 15 | className?: string |
| 16 | socialLayout?: " |
| 17 | socialPosition?: " |
| 18 | }; |
| 19 | |
| 20 | /** Props the shadcn `<Settings>` router spreads onto plugin-contributed settings views. */ |
| 21 | export type SettingsViewProps |
| 22 | className?: string |
| 23 | }; |
| 24 | |
| 25 | /** Shadcn plugin type. Plugin authors import this from `@/lib/auth/auth-plugin`. */ |
| 26 | export type AuthPlugin |
| 27 | AuthPluginComponents, |
| 28 | AuthViewProps, |
| 29 | SettingsViewProps |
| 30 | >; |