better-auth-ui 3.2.14 → 3.2.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{auth-ui-provider-DGboLH2y.d.cts → auth-ui-provider-D3GrYvcj.d.cts} +1 -1
- package/dist/{auth-ui-provider-B3fzotj0.d.ts → auth-ui-provider-mrVNJ6zj.d.ts} +1 -1
- package/dist/{chunk-GFDS6WTO.js → chunk-BJHZPU6H.js} +11 -10
- package/dist/{chunk-B24ZS3AS.cjs → chunk-GB6DYT26.cjs} +12 -11
- package/dist/index.cjs +126 -121
- package/dist/index.d.cts +35 -3
- package/dist/index.d.ts +35 -3
- package/dist/index.js +6 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tanstack.cjs +2 -2
- package/dist/tanstack.d.cts +1 -1
- package/dist/tanstack.d.ts +1 -1
- package/dist/tanstack.js +1 -1
- package/package.json +3 -2
- package/src/index.ts +3 -0
package/dist/index.d.cts
CHANGED
|
@@ -8,8 +8,8 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
8
8
|
import { Organization } from 'better-auth/plugins/organization';
|
|
9
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
|
-
import { F as FieldType } from './auth-ui-provider-
|
|
12
|
-
export {
|
|
11
|
+
import { F as FieldType, G as GravatarOptions } from './auth-ui-provider-D3GrYvcj.cjs';
|
|
12
|
+
export { p as AccountOptions, q as AccountOptionsContext, r as AdditionalField, t as AdditionalFields, A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, u as AvatarOptions, C as CaptchaOptions, v as CredentialsOptions, w as DeleteUserOptions, D as DiscordIcon, b as DropboxIcon, c as FacebookIcon, x as GenericOAuthOptions, d as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, y as Link, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, O as OrganizationLogoOptions, z as OrganizationOptions, B as OrganizationOptionsContext, o as Provider, a as ProviderIcon, P as ProviderIconProps, R as RedditIcon, E as RenderToast, h as RobloxIcon, I as SignUpOptions, S as SlackIcon, J as SocialOptions, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-D3GrYvcj.cjs';
|
|
13
13
|
import * as better_auth from 'better-auth';
|
|
14
14
|
import { Account } from 'better-auth';
|
|
15
15
|
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-BuniCu20.cjs';
|
|
@@ -806,6 +806,38 @@ declare function useTheme(): {
|
|
|
806
806
|
theme: "light" | "dark";
|
|
807
807
|
};
|
|
808
808
|
|
|
809
|
+
/**
|
|
810
|
+
* Generate a Gravatar URL for an email address
|
|
811
|
+
* @param email - Email address
|
|
812
|
+
* @param options - Gravatar options
|
|
813
|
+
* @returns Gravatar URL or null if email is invalid
|
|
814
|
+
*/
|
|
815
|
+
declare function getGravatarUrl(email?: string | null, options?: GravatarOptions): string | null;
|
|
816
|
+
|
|
817
|
+
declare function resizeAndCropImage(file: File, name: string, size: number, extension: string): Promise<File>;
|
|
818
|
+
declare function fileToBase64(file: File): Promise<string>;
|
|
819
|
+
|
|
820
|
+
type CacheEntry<T> = {
|
|
821
|
+
data: T | null;
|
|
822
|
+
timestamp: number;
|
|
823
|
+
isRefetching: boolean;
|
|
824
|
+
};
|
|
825
|
+
declare class AuthDataCache {
|
|
826
|
+
private cache;
|
|
827
|
+
private listeners;
|
|
828
|
+
private inFlightRequests;
|
|
829
|
+
get<T>(key: string): CacheEntry<T> | undefined;
|
|
830
|
+
set<T>(key: string, data: T | null): void;
|
|
831
|
+
setRefetching(key: string, isRefetching: boolean): void;
|
|
832
|
+
clear(key?: string): void;
|
|
833
|
+
getInFlightRequest<T>(key: string): Promise<T> | undefined;
|
|
834
|
+
setInFlightRequest<T>(key: string, promise: Promise<T>): void;
|
|
835
|
+
removeInFlightRequest(key: string): void;
|
|
836
|
+
subscribe(key: string, callback: () => void): () => void;
|
|
837
|
+
private notify;
|
|
838
|
+
}
|
|
839
|
+
declare const authDataCache: AuthDataCache;
|
|
840
|
+
|
|
809
841
|
declare const OrganizationRefetcher: () => null;
|
|
810
842
|
|
|
811
|
-
export { AcceptInvitationCard, type AcceptInvitationCardProps, AccountSettingsCards, type AccountSettingsCardsProps, AccountView, AccountViewPath, type AccountViewProps, AccountsCard, type AccountsCardProps, AnyAuthClient, ApiKeysCard, type ApiKeysCardProps, AuthCallback, AuthForm, type AuthFormClassNames, type AuthFormProps, AuthLoading, AuthLocalization, AuthView, type AuthViewClassNames, AuthViewPath, AuthViewPaths, type AuthViewProps, ChangeEmailCard, type ChangeEmailCardProps, ChangePasswordCard, type ChangePasswordCardProps, CreateOrganizationDialog, type CreateOrganizationDialogProps, DeleteAccountCard, type DeleteAccountCardProps, DeleteOrganizationCard, FieldType, ForgotPasswordForm, type ForgotPasswordFormProps, InputFieldSkeleton, MagicLinkForm, type MagicLinkFormProps, OrganizationCellView, type OrganizationCellViewProps, OrganizationInvitationsCard, type OrganizationInvitationsCardProps, OrganizationLogo, OrganizationLogoCard, type OrganizationLogoCardProps, type OrganizationLogoClassNames, type OrganizationLogoProps, OrganizationMembersCard, type OrganizationMembersCardProps, OrganizationNameCard, type OrganizationNameCardProps, OrganizationRefetcher, OrganizationSettingsCards, type OrganizationSettingsCardsProps, OrganizationSlugCard, type OrganizationSlugCardProps, OrganizationSwitcher, type OrganizationSwitcherClassNames, type OrganizationSwitcherProps, OrganizationView, type OrganizationViewClassNames, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, type OrganizationsCardProps, PasskeysCard, type PasskeysCardProps, PasswordInput, PasswordValidation, type Profile, ProvidersCard, type ProvidersCardProps, RecoverAccountForm, type RecoverAccountFormProps, RedirectToSignIn, RedirectToSignUp, Refetch, ResetPasswordForm, type ResetPasswordFormProps, SecuritySettingsCards, SessionsCard, type SessionsCardProps, SettingsCard, type SettingsCardClassNames, type SettingsCardProps, SettingsCellSkeleton, SignInForm, type SignInFormProps, SignOut, SignUpForm, type SignUpFormProps, SignedIn, SignedOut, TwoFactorCard, type TwoFactorCardProps, TwoFactorForm, type TwoFactorFormProps, UpdateAvatarCard, type UpdateAvatarCardProps, UpdateFieldCard, type UpdateFieldCardProps, UpdateNameCard, type UpdateNameCardProps, UpdateUsernameCard, type UpdateUsernameCardProps, UserAvatar, type UserAvatarClassNames, type UserAvatarProps, UserButton, type UserButtonClassNames, type UserButtonProps, UserInvitationsCard, type UserInvitationsCardProps, UserView, type UserViewClassNames, type UserViewProps, useAuthData, useAuthenticate, useCaptcha, useCurrentOrganization, useIsHydrated, useLang, useOnSuccessTransition, useTheme };
|
|
843
|
+
export { AcceptInvitationCard, type AcceptInvitationCardProps, AccountSettingsCards, type AccountSettingsCardsProps, AccountView, AccountViewPath, type AccountViewProps, AccountsCard, type AccountsCardProps, AnyAuthClient, ApiKeysCard, type ApiKeysCardProps, AuthCallback, AuthForm, type AuthFormClassNames, type AuthFormProps, AuthLoading, AuthLocalization, AuthView, type AuthViewClassNames, AuthViewPath, AuthViewPaths, type AuthViewProps, ChangeEmailCard, type ChangeEmailCardProps, ChangePasswordCard, type ChangePasswordCardProps, CreateOrganizationDialog, type CreateOrganizationDialogProps, DeleteAccountCard, type DeleteAccountCardProps, DeleteOrganizationCard, FieldType, ForgotPasswordForm, type ForgotPasswordFormProps, GravatarOptions, InputFieldSkeleton, MagicLinkForm, type MagicLinkFormProps, OrganizationCellView, type OrganizationCellViewProps, OrganizationInvitationsCard, type OrganizationInvitationsCardProps, OrganizationLogo, OrganizationLogoCard, type OrganizationLogoCardProps, type OrganizationLogoClassNames, type OrganizationLogoProps, OrganizationMembersCard, type OrganizationMembersCardProps, OrganizationNameCard, type OrganizationNameCardProps, OrganizationRefetcher, OrganizationSettingsCards, type OrganizationSettingsCardsProps, OrganizationSlugCard, type OrganizationSlugCardProps, OrganizationSwitcher, type OrganizationSwitcherClassNames, type OrganizationSwitcherProps, OrganizationView, type OrganizationViewClassNames, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, type OrganizationsCardProps, PasskeysCard, type PasskeysCardProps, PasswordInput, PasswordValidation, type Profile, ProvidersCard, type ProvidersCardProps, RecoverAccountForm, type RecoverAccountFormProps, RedirectToSignIn, RedirectToSignUp, Refetch, ResetPasswordForm, type ResetPasswordFormProps, SecuritySettingsCards, SessionsCard, type SessionsCardProps, SettingsCard, type SettingsCardClassNames, type SettingsCardProps, SettingsCellSkeleton, SignInForm, type SignInFormProps, SignOut, SignUpForm, type SignUpFormProps, SignedIn, SignedOut, TwoFactorCard, type TwoFactorCardProps, TwoFactorForm, type TwoFactorFormProps, UpdateAvatarCard, type UpdateAvatarCardProps, UpdateFieldCard, type UpdateFieldCardProps, UpdateNameCard, type UpdateNameCardProps, UpdateUsernameCard, type UpdateUsernameCardProps, UserAvatar, type UserAvatarClassNames, type UserAvatarProps, UserButton, type UserButtonClassNames, type UserButtonProps, UserInvitationsCard, type UserInvitationsCardProps, UserView, type UserViewClassNames, type UserViewProps, authDataCache, fileToBase64, getGravatarUrl, resizeAndCropImage, useAuthData, useAuthenticate, useCaptcha, useCurrentOrganization, useIsHydrated, useLang, useOnSuccessTransition, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
8
8
|
import { Organization } from 'better-auth/plugins/organization';
|
|
9
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
|
-
import { F as FieldType } from './auth-ui-provider-
|
|
12
|
-
export {
|
|
11
|
+
import { F as FieldType, G as GravatarOptions } from './auth-ui-provider-mrVNJ6zj.js';
|
|
12
|
+
export { p as AccountOptions, q as AccountOptionsContext, r as AdditionalField, t as AdditionalFields, A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, u as AvatarOptions, C as CaptchaOptions, v as CredentialsOptions, w as DeleteUserOptions, D as DiscordIcon, b as DropboxIcon, c as FacebookIcon, x as GenericOAuthOptions, d as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, y as Link, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, O as OrganizationLogoOptions, z as OrganizationOptions, B as OrganizationOptionsContext, o as Provider, a as ProviderIcon, P as ProviderIconProps, R as RedditIcon, E as RenderToast, h as RobloxIcon, I as SignUpOptions, S as SlackIcon, J as SocialOptions, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-mrVNJ6zj.js';
|
|
13
13
|
import * as better_auth from 'better-auth';
|
|
14
14
|
import { Account } from 'better-auth';
|
|
15
15
|
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-BuniCu20.js';
|
|
@@ -806,6 +806,38 @@ declare function useTheme(): {
|
|
|
806
806
|
theme: "light" | "dark";
|
|
807
807
|
};
|
|
808
808
|
|
|
809
|
+
/**
|
|
810
|
+
* Generate a Gravatar URL for an email address
|
|
811
|
+
* @param email - Email address
|
|
812
|
+
* @param options - Gravatar options
|
|
813
|
+
* @returns Gravatar URL or null if email is invalid
|
|
814
|
+
*/
|
|
815
|
+
declare function getGravatarUrl(email?: string | null, options?: GravatarOptions): string | null;
|
|
816
|
+
|
|
817
|
+
declare function resizeAndCropImage(file: File, name: string, size: number, extension: string): Promise<File>;
|
|
818
|
+
declare function fileToBase64(file: File): Promise<string>;
|
|
819
|
+
|
|
820
|
+
type CacheEntry<T> = {
|
|
821
|
+
data: T | null;
|
|
822
|
+
timestamp: number;
|
|
823
|
+
isRefetching: boolean;
|
|
824
|
+
};
|
|
825
|
+
declare class AuthDataCache {
|
|
826
|
+
private cache;
|
|
827
|
+
private listeners;
|
|
828
|
+
private inFlightRequests;
|
|
829
|
+
get<T>(key: string): CacheEntry<T> | undefined;
|
|
830
|
+
set<T>(key: string, data: T | null): void;
|
|
831
|
+
setRefetching(key: string, isRefetching: boolean): void;
|
|
832
|
+
clear(key?: string): void;
|
|
833
|
+
getInFlightRequest<T>(key: string): Promise<T> | undefined;
|
|
834
|
+
setInFlightRequest<T>(key: string, promise: Promise<T>): void;
|
|
835
|
+
removeInFlightRequest(key: string): void;
|
|
836
|
+
subscribe(key: string, callback: () => void): () => void;
|
|
837
|
+
private notify;
|
|
838
|
+
}
|
|
839
|
+
declare const authDataCache: AuthDataCache;
|
|
840
|
+
|
|
809
841
|
declare const OrganizationRefetcher: () => null;
|
|
810
842
|
|
|
811
|
-
export { AcceptInvitationCard, type AcceptInvitationCardProps, AccountSettingsCards, type AccountSettingsCardsProps, AccountView, AccountViewPath, type AccountViewProps, AccountsCard, type AccountsCardProps, AnyAuthClient, ApiKeysCard, type ApiKeysCardProps, AuthCallback, AuthForm, type AuthFormClassNames, type AuthFormProps, AuthLoading, AuthLocalization, AuthView, type AuthViewClassNames, AuthViewPath, AuthViewPaths, type AuthViewProps, ChangeEmailCard, type ChangeEmailCardProps, ChangePasswordCard, type ChangePasswordCardProps, CreateOrganizationDialog, type CreateOrganizationDialogProps, DeleteAccountCard, type DeleteAccountCardProps, DeleteOrganizationCard, FieldType, ForgotPasswordForm, type ForgotPasswordFormProps, InputFieldSkeleton, MagicLinkForm, type MagicLinkFormProps, OrganizationCellView, type OrganizationCellViewProps, OrganizationInvitationsCard, type OrganizationInvitationsCardProps, OrganizationLogo, OrganizationLogoCard, type OrganizationLogoCardProps, type OrganizationLogoClassNames, type OrganizationLogoProps, OrganizationMembersCard, type OrganizationMembersCardProps, OrganizationNameCard, type OrganizationNameCardProps, OrganizationRefetcher, OrganizationSettingsCards, type OrganizationSettingsCardsProps, OrganizationSlugCard, type OrganizationSlugCardProps, OrganizationSwitcher, type OrganizationSwitcherClassNames, type OrganizationSwitcherProps, OrganizationView, type OrganizationViewClassNames, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, type OrganizationsCardProps, PasskeysCard, type PasskeysCardProps, PasswordInput, PasswordValidation, type Profile, ProvidersCard, type ProvidersCardProps, RecoverAccountForm, type RecoverAccountFormProps, RedirectToSignIn, RedirectToSignUp, Refetch, ResetPasswordForm, type ResetPasswordFormProps, SecuritySettingsCards, SessionsCard, type SessionsCardProps, SettingsCard, type SettingsCardClassNames, type SettingsCardProps, SettingsCellSkeleton, SignInForm, type SignInFormProps, SignOut, SignUpForm, type SignUpFormProps, SignedIn, SignedOut, TwoFactorCard, type TwoFactorCardProps, TwoFactorForm, type TwoFactorFormProps, UpdateAvatarCard, type UpdateAvatarCardProps, UpdateFieldCard, type UpdateFieldCardProps, UpdateNameCard, type UpdateNameCardProps, UpdateUsernameCard, type UpdateUsernameCardProps, UserAvatar, type UserAvatarClassNames, type UserAvatarProps, UserButton, type UserButtonClassNames, type UserButtonProps, UserInvitationsCard, type UserInvitationsCardProps, UserView, type UserViewClassNames, type UserViewProps, useAuthData, useAuthenticate, useCaptcha, useCurrentOrganization, useIsHydrated, useLang, useOnSuccessTransition, useTheme };
|
|
843
|
+
export { AcceptInvitationCard, type AcceptInvitationCardProps, AccountSettingsCards, type AccountSettingsCardsProps, AccountView, AccountViewPath, type AccountViewProps, AccountsCard, type AccountsCardProps, AnyAuthClient, ApiKeysCard, type ApiKeysCardProps, AuthCallback, AuthForm, type AuthFormClassNames, type AuthFormProps, AuthLoading, AuthLocalization, AuthView, type AuthViewClassNames, AuthViewPath, AuthViewPaths, type AuthViewProps, ChangeEmailCard, type ChangeEmailCardProps, ChangePasswordCard, type ChangePasswordCardProps, CreateOrganizationDialog, type CreateOrganizationDialogProps, DeleteAccountCard, type DeleteAccountCardProps, DeleteOrganizationCard, FieldType, ForgotPasswordForm, type ForgotPasswordFormProps, GravatarOptions, InputFieldSkeleton, MagicLinkForm, type MagicLinkFormProps, OrganizationCellView, type OrganizationCellViewProps, OrganizationInvitationsCard, type OrganizationInvitationsCardProps, OrganizationLogo, OrganizationLogoCard, type OrganizationLogoCardProps, type OrganizationLogoClassNames, type OrganizationLogoProps, OrganizationMembersCard, type OrganizationMembersCardProps, OrganizationNameCard, type OrganizationNameCardProps, OrganizationRefetcher, OrganizationSettingsCards, type OrganizationSettingsCardsProps, OrganizationSlugCard, type OrganizationSlugCardProps, OrganizationSwitcher, type OrganizationSwitcherClassNames, type OrganizationSwitcherProps, OrganizationView, type OrganizationViewClassNames, OrganizationViewPath, type OrganizationViewProps, OrganizationsCard, type OrganizationsCardProps, PasskeysCard, type PasskeysCardProps, PasswordInput, PasswordValidation, type Profile, ProvidersCard, type ProvidersCardProps, RecoverAccountForm, type RecoverAccountFormProps, RedirectToSignIn, RedirectToSignUp, Refetch, ResetPasswordForm, type ResetPasswordFormProps, SecuritySettingsCards, SessionsCard, type SessionsCardProps, SettingsCard, type SettingsCardClassNames, type SettingsCardProps, SettingsCellSkeleton, SignInForm, type SignInFormProps, SignOut, SignUpForm, type SignUpFormProps, SignedIn, SignedOut, TwoFactorCard, type TwoFactorCardProps, TwoFactorForm, type TwoFactorFormProps, UpdateAvatarCard, type UpdateAvatarCardProps, UpdateFieldCard, type UpdateFieldCardProps, UpdateNameCard, type UpdateNameCardProps, UpdateUsernameCard, type UpdateUsernameCardProps, UserAvatar, type UserAvatarClassNames, type UserAvatarProps, UserButton, type UserButtonClassNames, type UserButtonProps, UserInvitationsCard, type UserInvitationsCardProps, UserView, type UserViewClassNames, type UserViewProps, authDataCache, fileToBase64, getGravatarUrl, resizeAndCropImage, useAuthData, useAuthenticate, useCaptcha, useCurrentOrganization, useIsHydrated, useLang, useOnSuccessTransition, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,13 @@ import {
|
|
|
2
2
|
AuthUIContext,
|
|
3
3
|
AuthUIProvider,
|
|
4
4
|
OrganizationRefetcher,
|
|
5
|
+
authDataCache,
|
|
5
6
|
useAuthData,
|
|
6
7
|
useCurrentOrganization,
|
|
7
8
|
useIsHydrated,
|
|
8
9
|
useLang,
|
|
9
10
|
useTheme
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BJHZPU6H.js";
|
|
11
12
|
import {
|
|
12
13
|
accountViewPaths,
|
|
13
14
|
authLocalization,
|
|
@@ -12637,10 +12638,13 @@ export {
|
|
|
12637
12638
|
ZoomIcon,
|
|
12638
12639
|
accountViewPaths,
|
|
12639
12640
|
authClient,
|
|
12641
|
+
authDataCache,
|
|
12640
12642
|
authLocalization,
|
|
12641
12643
|
authViewPaths,
|
|
12642
12644
|
cn,
|
|
12643
12645
|
errorCodeToCamelCase,
|
|
12646
|
+
fileToBase64,
|
|
12647
|
+
getGravatarUrl,
|
|
12644
12648
|
getKeyByValue,
|
|
12645
12649
|
getLocalizedError,
|
|
12646
12650
|
getPasswordSchema,
|
|
@@ -12648,6 +12652,7 @@ export {
|
|
|
12648
12652
|
getViewByPath,
|
|
12649
12653
|
isValidEmail,
|
|
12650
12654
|
organizationViewPaths,
|
|
12655
|
+
resizeAndCropImage,
|
|
12651
12656
|
socialProviders,
|
|
12652
12657
|
useAuthData,
|
|
12653
12658
|
useAuthenticate,
|