@better-auth-ui/core 1.6.3 → 1.6.4

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 (86) hide show
  1. package/dist/config/additional-fields-config.d.ts +118 -0
  2. package/dist/config/additional-fields-config.js +27 -0
  3. package/dist/config/auth-config.d.ts +12 -23
  4. package/dist/config/auth-config.js +2 -12
  5. package/dist/config/email-and-password-config.d.ts +4 -2
  6. package/dist/config/index.d.ts +1 -3
  7. package/dist/index.d.ts +5 -0
  8. package/dist/index.js +11 -7
  9. package/dist/lib/auth-mutation-keys.d.ts +81 -0
  10. package/dist/lib/auth-mutation-keys.js +57 -0
  11. package/dist/lib/auth-plugin.d.ts +69 -0
  12. package/dist/lib/auth-query-keys.d.ts +40 -0
  13. package/dist/lib/auth-query-keys.js +34 -0
  14. package/dist/lib/create-auth-plugin.d.ts +38 -0
  15. package/dist/lib/create-auth-plugin.js +9 -0
  16. package/dist/lib/deep-partial.d.ts +7 -0
  17. package/dist/lib/localization.d.ts +6 -50
  18. package/dist/lib/localization.js +3 -25
  19. package/dist/lib/utils.d.ts +2 -1
  20. package/dist/lib/view-paths.d.ts +8 -9
  21. package/dist/lib/view-paths.js +0 -1
  22. package/dist/plugins/delete-user/delete-user-localization.d.ts +11 -0
  23. package/dist/plugins/delete-user/delete-user-localization.js +9 -0
  24. package/dist/plugins/delete-user/delete-user-plugin.d.ts +26 -0
  25. package/dist/plugins/delete-user/delete-user-plugin.js +12 -0
  26. package/dist/plugins/index.d.ts +14 -0
  27. package/dist/plugins/magic-link/magic-link-localization.d.ts +9 -0
  28. package/dist/plugins/magic-link/magic-link-localization.js +8 -0
  29. package/dist/plugins/magic-link/magic-link-mutation-keys.d.ts +17 -0
  30. package/dist/plugins/magic-link/magic-link-mutation-keys.js +8 -0
  31. package/dist/plugins/magic-link/magic-link-plugin.d.ts +37 -0
  32. package/dist/plugins/magic-link/magic-link-plugin.js +12 -0
  33. package/dist/plugins/multi-session/multi-session-localization.d.ts +11 -0
  34. package/dist/plugins/multi-session/multi-session-localization.js +9 -0
  35. package/dist/plugins/multi-session/multi-session-plugin.d.ts +20 -0
  36. package/dist/plugins/multi-session/multi-session-plugin.js +9 -0
  37. package/dist/plugins/passkey/passkey-localization.d.ts +15 -0
  38. package/dist/plugins/passkey/passkey-localization.js +11 -0
  39. package/dist/plugins/passkey/passkey-mutation-keys.d.ts +15 -0
  40. package/dist/plugins/passkey/passkey-mutation-keys.js +20 -0
  41. package/dist/plugins/passkey/passkey-plugin.d.ts +22 -0
  42. package/dist/plugins/passkey/passkey-plugin.js +9 -0
  43. package/dist/plugins/theme/theme-localization.d.ts +13 -0
  44. package/dist/plugins/theme/theme-localization.js +10 -0
  45. package/dist/plugins/theme/theme-plugin.d.ts +37 -0
  46. package/dist/plugins/theme/theme-plugin.js +18 -0
  47. package/dist/plugins/username/username-localization.d.ts +17 -0
  48. package/dist/plugins/username/username-localization.js +12 -0
  49. package/dist/plugins/username/username-plugin.d.ts +68 -0
  50. package/dist/plugins/username/username-plugin.js +33 -0
  51. package/dist/plugins.js +15 -0
  52. package/package.json +9 -5
  53. package/src/config/additional-fields-config.ts +182 -0
  54. package/src/config/auth-config.ts +14 -33
  55. package/src/config/email-and-password-config.ts +4 -2
  56. package/src/config/index.ts +1 -3
  57. package/src/index.ts +5 -0
  58. package/src/lib/auth-mutation-keys.ts +88 -0
  59. package/src/lib/auth-plugin.ts +79 -0
  60. package/src/lib/auth-query-keys.ts +68 -0
  61. package/src/lib/create-auth-plugin.ts +47 -0
  62. package/src/lib/deep-partial.ts +12 -0
  63. package/src/lib/localization.ts +7 -74
  64. package/src/lib/utils.ts +4 -2
  65. package/src/lib/view-paths.ts +6 -8
  66. package/src/plugins/delete-user/delete-user-localization.ts +16 -0
  67. package/src/plugins/delete-user/delete-user-plugin.ts +27 -0
  68. package/src/plugins/index.ts +14 -0
  69. package/src/plugins/magic-link/magic-link-localization.ts +10 -0
  70. package/src/plugins/magic-link/magic-link-mutation-keys.ts +17 -0
  71. package/src/plugins/magic-link/magic-link-plugin.ts +40 -0
  72. package/src/plugins/multi-session/multi-session-localization.ts +12 -0
  73. package/src/plugins/multi-session/multi-session-plugin.ts +20 -0
  74. package/src/plugins/passkey/passkey-localization.ts +16 -0
  75. package/src/plugins/passkey/passkey-mutation-keys.ts +15 -0
  76. package/src/plugins/passkey/passkey-plugin.ts +20 -0
  77. package/src/plugins/theme/theme-localization.ts +14 -0
  78. package/src/plugins/theme/theme-plugin.ts +33 -0
  79. package/src/plugins/username/username-localization.ts +24 -0
  80. package/src/plugins/username/username-plugin.ts +70 -0
  81. package/dist/config/appearance-config.d.ts +0 -23
  82. package/dist/config/delete-user-config.d.ts +0 -14
  83. package/dist/config/username-config.d.ts +0 -18
  84. package/src/config/appearance-config.ts +0 -24
  85. package/src/config/delete-user-config.ts +0 -14
  86. package/src/config/username-config.ts +0 -18
@@ -2,8 +2,6 @@ export declare const localization: {
2
2
  auth: {
3
3
  /** @remarks `"Account"` */
4
4
  account: string;
5
- /** @remarks `"Add Account"` */
6
- addAccount: string;
7
5
  /** @remarks `"Already have an account?"` */
8
6
  alreadyHaveAnAccount: string;
9
7
  /** @remarks `"Confirm password"` */
@@ -24,10 +22,6 @@ export declare const localization: {
24
22
  hidePassword: string;
25
23
  /** @remarks `"Invalid reset password token"` */
26
24
  invalidResetPasswordToken: string;
27
- /** @remarks `"Magic Link"` */
28
- magicLink: string;
29
- /** @remarks `"Magic link sent to your email"` */
30
- magicLinkSent: string;
31
25
  /** @remarks `"Name"` */
32
26
  name: string;
33
27
  /** @remarks `"Enter your name"` */
@@ -40,8 +34,6 @@ export declare const localization: {
40
34
  newPasswordPlaceholder: string;
41
35
  /** @remarks `"OR"` */
42
36
  or: string;
43
- /** @remarks `"Passkey"` */
44
- passkey: string;
45
37
  /** @remarks `"Password"` */
46
38
  password: string;
47
39
  /** @remarks `"Enter your password"` */
@@ -60,8 +52,6 @@ export declare const localization: {
60
52
  resend: string;
61
53
  /** @remarks `"Reset Password"` */
62
54
  resetPassword: string;
63
- /** @remarks `"Send Magic Link"` */
64
- sendMagicLink: string;
65
55
  /** @remarks `"Send reset link"` */
66
56
  sendResetLink: string;
67
57
  /** @remarks `"Show password"` */
@@ -72,18 +62,6 @@ export declare const localization: {
72
62
  signOut: string;
73
63
  /** @remarks `"Sign Up"` */
74
64
  signUp: string;
75
- /** @remarks `"Switch Account"` */
76
- switchAccount: string;
77
- /** @remarks `"Username"` */
78
- username: string;
79
- /** @remarks `"Username is available"` */
80
- usernameAvailable: string;
81
- /** @remarks `"Enter your username or email"` */
82
- usernameOrEmailPlaceholder: string;
83
- /** @remarks `"Enter your username"` */
84
- usernamePlaceholder: string;
85
- /** @remarks `"Username is already taken. Please try another."` */
86
- usernameTaken: string;
87
65
  /** @remarks `"Verification email sent!"` */
88
66
  verificationEmailSent: string;
89
67
  /** @remarks `"Verify your email"` */
@@ -116,10 +94,10 @@ export declare const localization: {
116
94
  linkedAccounts: string;
117
95
  /** @remarks `"Link your {{provider}} account"` */
118
96
  linkProvider: string;
119
- /** @remarks `"Appearance"` */
120
- appearance: string;
121
97
  /** @remarks `"Cancel"` */
122
98
  cancel: string;
99
+ /** @remarks `"Copy to clipboard"` */
100
+ copyToClipboard: string;
123
101
  /** @remarks `"Change email"` */
124
102
  changeEmail: string;
125
103
  /** @remarks `"Check your email to confirm the change"` */
@@ -132,32 +110,12 @@ export declare const localization: {
132
110
  currentPassword: string;
133
111
  /** @remarks `"Enter your current password"` */
134
112
  currentPasswordPlaceholder: string;
135
- /** @remarks `"Dark"` */
136
- dark: string;
137
113
  /** @remarks `"Danger zone"` */
138
114
  dangerZone: string;
139
- /** @remarks `"Delete user"` */
140
- deleteUser: string;
141
- /** @remarks `"Permanently remove your account and all associated data. This cannot be undone."` */
142
- deleteUserDescription: string;
143
- /** @remarks `"Check your email to confirm account deletion."` */
144
- deleteUserVerificationSent: string;
145
- /** @remarks `"Your account has been deleted."` */
146
- deleteUserSuccess: string;
147
- /** @remarks `"Light"` */
148
- light: string;
149
- /** @remarks `"Manage accounts"` */
150
- manageAccounts: string;
151
- /** @remarks `"Add passkey"` */
152
- addPasskey: string;
153
115
  /** @remarks `"Delete"` */
154
116
  delete: string;
155
- /** @remarks `"Passkeys"` */
156
- passkeys: string;
157
- /** @remarks `"Manage your passkeys for secure access."` */
158
- passkeysDescription: string;
159
- /** @remarks `"Securely access your account without a password."` */
160
- passkeysInstructions: string;
117
+ /** @remarks `"Optional"` */
118
+ optional: string;
161
119
  /** @remarks `"Profile"` */
162
120
  profile: string;
163
121
  /** @remarks `"Profile updated successfully"` */
@@ -178,10 +136,8 @@ export declare const localization: {
178
136
  security: string;
179
137
  /** @remarks `"Settings"` */
180
138
  settings: string;
181
- /** @remarks `"System"` */
182
- system: string;
183
- /** @remarks `"Theme"` */
184
- theme: string;
139
+ /** @remarks `"Time"` */
140
+ time: string;
185
141
  /** @remarks `"Unlink {{provider}}"` */
186
142
  unlinkProvider: string;
187
143
  /** @remarks `"Update email"` */
@@ -2,7 +2,6 @@
2
2
  var e = {
3
3
  auth: {
4
4
  account: "Account",
5
- addAccount: "Add Account",
6
5
  alreadyHaveAnAccount: "Already have an account?",
7
6
  confirmPassword: "Confirm password",
8
7
  confirmPasswordPlaceholder: "Confirm your password",
@@ -13,15 +12,12 @@ var e = {
13
12
  forgotPasswordLink: "Forgot password?",
14
13
  hidePassword: "Hide password",
15
14
  invalidResetPasswordToken: "Invalid reset password token",
16
- magicLink: "Magic Link",
17
- magicLinkSent: "Magic link sent to your email",
18
15
  name: "Name",
19
16
  namePlaceholder: "Enter your name",
20
17
  needToCreateAnAccount: "Need to create an account?",
21
18
  newPassword: "New password",
22
19
  newPasswordPlaceholder: "Enter your new password",
23
20
  or: "OR",
24
- passkey: "Passkey",
25
21
  password: "Password",
26
22
  passwordPlaceholder: "Enter your password",
27
23
  passwordResetEmailSent: "Password reset email sent",
@@ -31,18 +27,11 @@ var e = {
31
27
  rememberYourPassword: "Remember your password?",
32
28
  resend: "Resend",
33
29
  resetPassword: "Reset Password",
34
- sendMagicLink: "Send Magic Link",
35
30
  sendResetLink: "Send reset link",
36
31
  showPassword: "Show password",
37
32
  signIn: "Sign In",
38
33
  signOut: "Sign Out",
39
34
  signUp: "Sign Up",
40
- switchAccount: "Switch Account",
41
- username: "Username",
42
- usernameAvailable: "Username is available",
43
- usernameOrEmailPlaceholder: "Enter your username or email",
44
- usernamePlaceholder: "Enter your username",
45
- usernameTaken: "Username is already taken. Please try another.",
46
35
  verificationEmailSent: "Verification email sent!",
47
36
  verifyYourEmail: "Verify your email"
48
37
  },
@@ -60,27 +49,17 @@ var e = {
60
49
  link: "Link",
61
50
  linkedAccounts: "Linked accounts",
62
51
  linkProvider: "Link your {{provider}} account",
63
- appearance: "Appearance",
64
52
  cancel: "Cancel",
53
+ copyToClipboard: "Copy to clipboard",
65
54
  changeEmail: "Change email",
66
55
  changeEmailSuccess: "Check your email to confirm the change",
67
56
  changePassword: "Change password",
68
57
  changePasswordSuccess: "Password changed successfully",
69
58
  currentPassword: "Current password",
70
59
  currentPasswordPlaceholder: "Enter your current password",
71
- dark: "Dark",
72
60
  dangerZone: "Danger zone",
73
- deleteUser: "Delete user",
74
- deleteUserDescription: "Permanently remove your account and all associated data. This cannot be undone.",
75
- deleteUserVerificationSent: "Check your email to confirm account deletion.",
76
- deleteUserSuccess: "Your account has been deleted.",
77
- light: "Light",
78
- manageAccounts: "Manage accounts",
79
- addPasskey: "Add passkey",
80
61
  delete: "Delete",
81
- passkeys: "Passkeys",
82
- passkeysDescription: "Manage your passkeys for secure access.",
83
- passkeysInstructions: "Securely access your account without a password.",
62
+ optional: "Optional",
84
63
  profile: "Profile",
85
64
  profileUpdatedSuccess: "Profile updated successfully",
86
65
  revoke: "Revoke",
@@ -91,8 +70,7 @@ var e = {
91
70
  setPasswordDescription: "You don't have a password yet. Request a reset link to set one up.",
92
71
  security: "Security",
93
72
  settings: "Settings",
94
- system: "System",
95
- theme: "Theme",
73
+ time: "Time",
96
74
  unlinkProvider: "Unlink {{provider}}",
97
75
  updateEmail: "Update email",
98
76
  updatePassword: "Update password",
@@ -1,3 +1,4 @@
1
+ import { DeepPartial } from './deep-partial';
1
2
  /**
2
3
  * Resize and square-crop an image file for use as an avatar.
3
4
  *
@@ -29,4 +30,4 @@ export declare function fileToBase64(file: File): Promise<string>;
29
30
  * @param source - Partial overrides to apply on top of `target`.
30
31
  * @returns A new merged object of type `T`.
31
32
  */
32
- export declare function deepmerge<T>(target: T, source: Partial<T>): T;
33
+ export declare function deepmerge<T>(target: T, source: DeepPartial<T>): T;
@@ -1,7 +1,11 @@
1
1
  /**
2
2
  * View path segments for authentication routes.
3
+ *
4
+ * Contains the fixed built-ins every install ships with. Plugin-contributed
5
+ * paths (e.g. `magicLinkPlugin`'s `magicLink`) live on the plugin object and
6
+ * are read via `useAuthPlugin(plugin).viewPaths.auth.*`.
3
7
  */
4
- export type AuthViewPaths = {
8
+ export interface AuthViewPaths {
5
9
  /**
6
10
  * Path segment for the sign-in view
7
11
  * @default "sign-in"
@@ -12,11 +16,6 @@ export type AuthViewPaths = {
12
16
  * @default "sign-up"
13
17
  */
14
18
  signUp: string;
15
- /**
16
- * Path segment for the magic link authentication view
17
- * @default "magic-link"
18
- */
19
- magicLink: string;
20
19
  /**
21
20
  * Path segment for the forgot password view
22
21
  * @default "forgot-password"
@@ -32,11 +31,11 @@ export type AuthViewPaths = {
32
31
  * @default "sign-out"
33
32
  */
34
33
  signOut: string;
35
- };
34
+ }
36
35
  /**
37
36
  * View path segments for settings routes.
38
37
  */
39
- export type SettingsViewPaths = {
38
+ export interface SettingsViewPaths {
40
39
  /**
41
40
  * Path segment for the account settings view
42
41
  * @default "account"
@@ -47,7 +46,7 @@ export type SettingsViewPaths = {
47
46
  * @default "security"
48
47
  */
49
48
  security: string;
50
- };
49
+ }
51
50
  /**
52
51
  * View path configuration for authentication and settings routes.
53
52
  */
@@ -3,7 +3,6 @@ var e = {
3
3
  auth: {
4
4
  signIn: "sign-in",
5
5
  signUp: "sign-up",
6
- magicLink: "magic-link",
7
6
  forgotPassword: "forgot-password",
8
7
  resetPassword: "reset-password",
9
8
  signOut: "sign-out"
@@ -0,0 +1,11 @@
1
+ export declare const deleteUserLocalization: {
2
+ /** @remarks `"Delete user"` */
3
+ deleteUser: string;
4
+ /** @remarks `"Permanently remove your account and all associated data. This cannot be undone."` */
5
+ deleteUserDescription: string;
6
+ /** @remarks `"Check your email to confirm account deletion."` */
7
+ deleteUserVerificationSent: string;
8
+ /** @remarks `"Your account has been deleted."` */
9
+ deleteUserSuccess: string;
10
+ };
11
+ export type DeleteUserLocalization = typeof deleteUserLocalization;
@@ -0,0 +1,9 @@
1
+ //#region src/plugins/delete-user/delete-user-localization.ts
2
+ var e = {
3
+ deleteUser: "Delete user",
4
+ deleteUserDescription: "Permanently remove your account and all associated data. This cannot be undone.",
5
+ deleteUserVerificationSent: "Check your email to confirm account deletion.",
6
+ deleteUserSuccess: "Your account has been deleted."
7
+ };
8
+ //#endregion
9
+ export { e as deleteUserLocalization };
@@ -0,0 +1,26 @@
1
+ import { DeleteUserLocalization } from './delete-user-localization';
2
+ export type DeleteUserPluginOptions = {
3
+ /**
4
+ * When `true`, matches server `sendDeleteAccountVerification`: deletion starts by sending a
5
+ * verification email instead of deleting immediately in this request.
6
+ */
7
+ sendDeleteAccountVerification?: boolean;
8
+ /**
9
+ * Override the plugin's default localization strings.
10
+ * @remarks `DeleteUserLocalization`
11
+ */
12
+ localization?: Partial<DeleteUserLocalization>;
13
+ };
14
+ export declare const deleteUserPlugin: ((options?: DeleteUserPluginOptions | undefined) => Omit<{
15
+ localization: {
16
+ deleteUser: string;
17
+ deleteUserDescription: string;
18
+ deleteUserVerificationSent: string;
19
+ deleteUserSuccess: string;
20
+ };
21
+ sendDeleteAccountVerification: boolean;
22
+ }, "id"> & {
23
+ id: "deleteUser";
24
+ }) & {
25
+ id: "deleteUser";
26
+ };
@@ -0,0 +1,12 @@
1
+ import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
2
+ import { deleteUserLocalization as t } from "./delete-user-localization.js";
3
+ //#region src/plugins/delete-user/delete-user-plugin.ts
4
+ var n = e("deleteUser", (e = {}) => ({
5
+ localization: {
6
+ ...t,
7
+ ...e.localization
8
+ },
9
+ sendDeleteAccountVerification: e.sendDeleteAccountVerification ?? !1
10
+ }));
11
+ //#endregion
12
+ export { n as deleteUserPlugin };
@@ -0,0 +1,14 @@
1
+ export * from './delete-user/delete-user-localization';
2
+ export * from './delete-user/delete-user-plugin';
3
+ export * from './magic-link/magic-link-localization';
4
+ export * from './magic-link/magic-link-mutation-keys';
5
+ export * from './magic-link/magic-link-plugin';
6
+ export * from './multi-session/multi-session-localization';
7
+ export * from './multi-session/multi-session-plugin';
8
+ export * from './passkey/passkey-localization';
9
+ export * from './passkey/passkey-mutation-keys';
10
+ export * from './passkey/passkey-plugin';
11
+ export * from './theme/theme-localization';
12
+ export * from './theme/theme-plugin';
13
+ export * from './username/username-localization';
14
+ export * from './username/username-plugin';
@@ -0,0 +1,9 @@
1
+ export declare const magicLinkLocalization: {
2
+ /** @remarks `"Magic Link"` */
3
+ magicLink: string;
4
+ /** @remarks `"Send Magic Link"` */
5
+ sendMagicLink: string;
6
+ /** @remarks `"Check your email for the magic link"` */
7
+ magicLinkSent: string;
8
+ };
9
+ export type MagicLinkLocalization = typeof magicLinkLocalization;
@@ -0,0 +1,8 @@
1
+ //#region src/plugins/magic-link/magic-link-localization.ts
2
+ var e = {
3
+ magicLink: "Magic Link",
4
+ sendMagicLink: "Send Magic Link",
5
+ magicLinkSent: "Check your email for the magic link"
6
+ };
7
+ //#endregion
8
+ export { e as magicLinkLocalization };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Mutation keys contributed by the magic-link plugin.
3
+ *
4
+ * Kept under the shared `["auth", "signIn", ...]` namespace as the built-in
5
+ * sign-in mutation keys so consumers can match the whole sign-in surface
6
+ * with `useIsMutating({ mutationKey: ["auth", "signIn"] })` regardless of
7
+ * which strategy is in flight.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * useIsMutating({ mutationKey: magicLinkMutationKeys.signIn })
12
+ * ```
13
+ */
14
+ export declare const magicLinkMutationKeys: {
15
+ /** Key for `signIn.magicLink`. */
16
+ readonly signIn: readonly ["auth", "signIn", "magicLink"];
17
+ };
@@ -0,0 +1,8 @@
1
+ //#region src/plugins/magic-link/magic-link-mutation-keys.ts
2
+ var e = { signIn: [
3
+ "auth",
4
+ "signIn",
5
+ "magicLink"
6
+ ] };
7
+ //#endregion
8
+ export { e as magicLinkMutationKeys };
@@ -0,0 +1,37 @@
1
+ import { MagicLinkLocalization } from './magic-link-localization';
2
+ declare module "../../lib/view-paths" {
3
+ /** Widens `AuthViewPaths` by adding the `"magicLink"` path when this plugin is imported. */
4
+ interface AuthViewPaths {
5
+ /** @default "magic-link" */
6
+ magicLink?: string;
7
+ }
8
+ }
9
+ export type MagicLinkPluginOptions = {
10
+ /**
11
+ * Override the plugin's default localization strings.
12
+ * @remarks `MagicLinkLocalization`
13
+ */
14
+ localization?: Partial<MagicLinkLocalization>;
15
+ /**
16
+ * URL segment for the magic-link view.
17
+ * @remarks `string`
18
+ * @default "magic-link"
19
+ */
20
+ path?: string;
21
+ };
22
+ export declare const magicLinkPlugin: ((options?: MagicLinkPluginOptions | undefined) => Omit<{
23
+ localization: {
24
+ magicLink: string;
25
+ sendMagicLink: string;
26
+ magicLinkSent: string;
27
+ };
28
+ viewPaths: {
29
+ auth: {
30
+ magicLink: string;
31
+ };
32
+ };
33
+ }, "id"> & {
34
+ id: "magicLink";
35
+ }) & {
36
+ id: "magicLink";
37
+ };
@@ -0,0 +1,12 @@
1
+ import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
2
+ import { magicLinkLocalization as t } from "./magic-link-localization.js";
3
+ //#region src/plugins/magic-link/magic-link-plugin.ts
4
+ var n = e("magicLink", (e = {}) => ({
5
+ localization: {
6
+ ...t,
7
+ ...e.localization
8
+ },
9
+ viewPaths: { auth: { magicLink: e.path ?? "magic-link" } }
10
+ }));
11
+ //#endregion
12
+ export { n as magicLinkPlugin };
@@ -0,0 +1,11 @@
1
+ export declare const multiSessionLocalization: {
2
+ /** @remarks `"Switch Account"` */
3
+ switchAccount: string;
4
+ /** @remarks `"Add Account"` */
5
+ addAccount: string;
6
+ /** @remarks `"Manage accounts"` */
7
+ manageAccounts: string;
8
+ /** @remarks `"Manage your accounts for secure access."` */
9
+ manageAccountsDescription: string;
10
+ };
11
+ export type MultiSessionLocalization = typeof multiSessionLocalization;
@@ -0,0 +1,9 @@
1
+ //#region src/plugins/multi-session/multi-session-localization.ts
2
+ var e = {
3
+ switchAccount: "Switch Account",
4
+ addAccount: "Add Account",
5
+ manageAccounts: "Manage accounts",
6
+ manageAccountsDescription: "Manage your accounts for secure access."
7
+ };
8
+ //#endregion
9
+ export { e as multiSessionLocalization };
@@ -0,0 +1,20 @@
1
+ import { MultiSessionLocalization } from './multi-session-localization';
2
+ export type MultiSessionPluginOptions = {
3
+ /**
4
+ * Override the plugin's default localization strings.
5
+ * @remarks `MultiSessionLocalization`
6
+ */
7
+ localization?: Partial<MultiSessionLocalization>;
8
+ };
9
+ export declare const multiSessionPlugin: ((options?: MultiSessionPluginOptions | undefined) => Omit<{
10
+ localization: {
11
+ switchAccount: string;
12
+ addAccount: string;
13
+ manageAccounts: string;
14
+ manageAccountsDescription: string;
15
+ };
16
+ }, "id"> & {
17
+ id: "multiSession";
18
+ }) & {
19
+ id: "multiSession";
20
+ };
@@ -0,0 +1,9 @@
1
+ import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
2
+ import { multiSessionLocalization as t } from "./multi-session-localization.js";
3
+ //#region src/plugins/multi-session/multi-session-plugin.ts
4
+ var n = e("multiSession", (e = {}) => ({ localization: {
5
+ ...t,
6
+ ...e.localization
7
+ } }));
8
+ //#endregion
9
+ export { n as multiSessionPlugin };
@@ -0,0 +1,15 @@
1
+ export declare const passkeyLocalization: {
2
+ /** @remarks `"Passkey"` */
3
+ passkey: string;
4
+ /** @remarks `"Add passkey"` */
5
+ addPasskey: string;
6
+ /** @remarks `"Delete passkey {{name}}"` */
7
+ deletePasskey: string;
8
+ /** @remarks `"Passkeys"` */
9
+ passkeys: string;
10
+ /** @remarks `"Manage your passkeys for secure access."` */
11
+ passkeysDescription: string;
12
+ /** @remarks `"Securely access your account without a password."` */
13
+ passkeysInstructions: string;
14
+ };
15
+ export type PasskeyLocalization = typeof passkeyLocalization;
@@ -0,0 +1,11 @@
1
+ //#region src/plugins/passkey/passkey-localization.ts
2
+ var e = {
3
+ passkey: "Passkey",
4
+ addPasskey: "Add passkey",
5
+ deletePasskey: "Delete passkey {{name}}",
6
+ passkeys: "Passkeys",
7
+ passkeysDescription: "Manage your passkeys for secure access.",
8
+ passkeysInstructions: "Securely access your account without a password."
9
+ };
10
+ //#endregion
11
+ export { e as passkeyLocalization };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Mutation keys contributed by the passkey plugin.
3
+ *
4
+ * `signIn` is kept under the shared `["auth", "signIn", ...]` namespace so
5
+ * consumers can match the whole sign-in surface with
6
+ * `useIsMutating({ mutationKey: ["auth", "signIn"] })`.
7
+ */
8
+ export declare const passkeyMutationKeys: {
9
+ /** Key for `signIn.passkey`. */
10
+ readonly signIn: readonly ["auth", "signIn", "passkey"];
11
+ /** Key for `passkey.addPasskey`. */
12
+ readonly addPasskey: readonly ["auth", "passkey", "addPasskey"];
13
+ /** Key for `passkey.deletePasskey`. */
14
+ readonly deletePasskey: readonly ["auth", "passkey", "deletePasskey"];
15
+ };
@@ -0,0 +1,20 @@
1
+ //#region src/plugins/passkey/passkey-mutation-keys.ts
2
+ var e = {
3
+ signIn: [
4
+ "auth",
5
+ "signIn",
6
+ "passkey"
7
+ ],
8
+ addPasskey: [
9
+ "auth",
10
+ "passkey",
11
+ "addPasskey"
12
+ ],
13
+ deletePasskey: [
14
+ "auth",
15
+ "passkey",
16
+ "deletePasskey"
17
+ ]
18
+ };
19
+ //#endregion
20
+ export { e as passkeyMutationKeys };
@@ -0,0 +1,22 @@
1
+ import { PasskeyLocalization } from './passkey-localization';
2
+ export type PasskeyPluginOptions = {
3
+ /**
4
+ * Override the plugin's default localization strings.
5
+ * @remarks `PasskeyLocalization`
6
+ */
7
+ localization?: Partial<PasskeyLocalization>;
8
+ };
9
+ export declare const passkeyPlugin: ((options?: PasskeyPluginOptions | undefined) => Omit<{
10
+ localization: {
11
+ passkey: string;
12
+ addPasskey: string;
13
+ deletePasskey: string;
14
+ passkeys: string;
15
+ passkeysDescription: string;
16
+ passkeysInstructions: string;
17
+ };
18
+ }, "id"> & {
19
+ id: "passkey";
20
+ }) & {
21
+ id: "passkey";
22
+ };
@@ -0,0 +1,9 @@
1
+ import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
2
+ import { passkeyLocalization as t } from "./passkey-localization.js";
3
+ //#region src/plugins/passkey/passkey-plugin.ts
4
+ var n = e("passkey", (e = {}) => ({ localization: {
5
+ ...t,
6
+ ...e.localization
7
+ } }));
8
+ //#endregion
9
+ export { n as passkeyPlugin };
@@ -0,0 +1,13 @@
1
+ export declare const themeLocalization: {
2
+ /** @remarks `"Appearance"` */
3
+ appearance: string;
4
+ /** @remarks `"Theme"` */
5
+ theme: string;
6
+ /** @remarks `"System"` */
7
+ system: string;
8
+ /** @remarks `"Light"` */
9
+ light: string;
10
+ /** @remarks `"Dark"` */
11
+ dark: string;
12
+ };
13
+ export type ThemeLocalization = typeof themeLocalization;
@@ -0,0 +1,10 @@
1
+ //#region src/plugins/theme/theme-localization.ts
2
+ var e = {
3
+ appearance: "Appearance",
4
+ theme: "Theme",
5
+ system: "System",
6
+ light: "Light",
7
+ dark: "Dark"
8
+ };
9
+ //#endregion
10
+ export { e as themeLocalization };