| 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 = Record<string, never>; |
| 15 |
| 16 | /** Props the shadcn `<Settings>` router spreads onto plugin-contributed settings views. */ |
| 17 | export type SettingsViewProps = { |
| 18 | className?: string; |
| 19 | }; |
| 20 |
| 21 | export type AuthPlugin = AuthPluginPrimitive< |
| 22 | AuthPluginComponents, |
| 23 | AuthViewProps, |
| 24 | SettingsViewProps |
| 25 | >; |