@better-auth-ui/core 1.6.25 → 1.6.26

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.
@@ -13,7 +13,7 @@ var e = {
13
13
  checkYourEmail: "Check your email for a verification link",
14
14
  continueWith: "Continue with {{provider}}",
15
15
  email: "Email",
16
- emailPlaceholder: "Enter your email",
16
+ emailPlaceholder: "m@example.com",
17
17
  fieldRequired: "This field is required",
18
18
  forgotPassword: "Forgot Password",
19
19
  forgotPasswordLink: "Forgot password?",
@@ -21,14 +21,14 @@ var e = {
21
21
  invalidEmail: "Please enter a valid email address",
22
22
  invalidResetPasswordToken: "Invalid reset password token",
23
23
  name: "Name",
24
- namePlaceholder: "Enter your name",
24
+ namePlaceholder: "Name",
25
25
  needToCreateAnAccount: "Need to create an account?",
26
26
  newPassword: "New password",
27
- newPasswordPlaceholder: "Enter your new password",
27
+ newPasswordPlaceholder: "New password",
28
28
  openEmailProvider: "Open {{provider}}",
29
29
  or: "OR",
30
30
  password: "Password",
31
- passwordPlaceholder: "Enter your password",
31
+ passwordPlaceholder: "Password",
32
32
  passwordResetEmailSent: "Password reset email sent",
33
33
  passwordResetSuccess: "Password reset successfully",
34
34
  passwordsDoNotMatch: "Passwords do not match",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./create-auth-plugin-BA7PI8QW.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./create-auth-plugin-CSJlOwwp.js";
2
2
  //#region src/config/additional-fields-config.ts
3
3
  function l(e, t) {
4
4
  if (e.type === "boolean") return t === "on" || t === "true";
@@ -16,7 +16,7 @@ export declare const localization: {
16
16
  continueWith: string;
17
17
  /** @remarks `"Email"` */
18
18
  email: string;
19
- /** @remarks `"Enter your email"` */
19
+ /** @remarks `"m@example.com"` */
20
20
  emailPlaceholder: string;
21
21
  /** @remarks `"This field is required"` */
22
22
  fieldRequired: string;
@@ -32,13 +32,13 @@ export declare const localization: {
32
32
  invalidResetPasswordToken: string;
33
33
  /** @remarks `"Name"` */
34
34
  name: string;
35
- /** @remarks `"Enter your name"` */
35
+ /** @remarks `"Name"` */
36
36
  namePlaceholder: string;
37
37
  /** @remarks `"Need to create an account?"` */
38
38
  needToCreateAnAccount: string;
39
39
  /** @remarks `"New password"` */
40
40
  newPassword: string;
41
- /** @remarks `"Enter your new password"` */
41
+ /** @remarks `"New password"` */
42
42
  newPasswordPlaceholder: string;
43
43
  /** @remarks `"Open {{provider}}"` */
44
44
  openEmailProvider: string;
@@ -46,7 +46,7 @@ export declare const localization: {
46
46
  or: string;
47
47
  /** @remarks `"Password"` */
48
48
  password: string;
49
- /** @remarks `"Enter your password"` */
49
+ /** @remarks `"Password"` */
50
50
  passwordPlaceholder: string;
51
51
  /** @remarks `"Password reset email sent"` */
52
52
  passwordResetEmailSent: string;
@@ -63,9 +63,15 @@ export type OrganizationPluginOptions = {
63
63
  */
64
64
  additionalRoles?: Record<string, string>;
65
65
  slug?: string | null;
66
+ /**
67
+ * Prefix prepended to organization slugs.
68
+ * @default ""
69
+ */
70
+ slugPrefix?: string;
66
71
  };
67
72
  export declare const organizationPlugin: ((options?: OrganizationPluginOptions | undefined) => {
68
73
  slug: string | null | undefined;
74
+ slugPrefix: string;
69
75
  checkSlug: boolean;
70
76
  localization: {
71
77
  accept: string;
@@ -1,9 +1,9 @@
1
1
  export declare const usernameLocalization: {
2
2
  /** @remarks `"Username"` */
3
3
  username: string;
4
- /** @remarks `"Enter your username"` */
4
+ /** @remarks `"Username"` */
5
5
  usernamePlaceholder: string;
6
- /** @remarks `"Enter your username or email"` */
6
+ /** @remarks `"Username or Email"` */
7
7
  usernameOrEmailPlaceholder: string;
8
8
  /** @remarks `"Username is available"` */
9
9
  usernameAvailable: string;
@@ -11,7 +11,7 @@ export declare const usernameLocalization: {
11
11
  usernameTaken: string;
12
12
  /** @remarks `"Display Username"` */
13
13
  displayUsername: string;
14
- /** @remarks `"Enter your display username"` */
14
+ /** @remarks `"Display Username"` */
15
15
  displayUsernamePlaceholder: string;
16
16
  };
17
17
  export type UsernameLocalization = typeof usernameLocalization;
@@ -23,10 +23,16 @@ export type UsernamePluginOptions = {
23
23
  * @remarks `UsernameLocalization`
24
24
  */
25
25
  localization?: Partial<UsernameLocalization>;
26
+ /**
27
+ * Prefix prepended to usernames.
28
+ * @default ""
29
+ */
30
+ usernamePrefix?: string;
26
31
  };
27
32
  export declare const usernamePlugin: ((options?: UsernamePluginOptions | undefined) => {
28
33
  minUsernameLength: number;
29
34
  maxUsernameLength: number;
35
+ usernamePrefix: string;
30
36
  localization: {
31
37
  username: string;
32
38
  usernamePlaceholder: string;
package/dist/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "./create-auth-plugin-BA7PI8QW.js";
1
+ import { n as e, r as t, t as n } from "./create-auth-plugin-CSJlOwwp.js";
2
2
  //#region src/plugins/api-key/api-key-localization.ts
3
3
  var r = {
4
4
  apiKey: "API key",
@@ -209,6 +209,7 @@ var r = {
209
209
  };
210
210
  return {
211
211
  slug: e.slug,
212
+ slugPrefix: e.slugPrefix ?? "",
212
213
  checkSlug: e.checkSlug ?? !0,
213
214
  localization: n,
214
215
  logo: {
@@ -315,12 +316,12 @@ var r = {
315
316
  ]
316
317
  })), D = {
317
318
  username: "Username",
318
- usernamePlaceholder: "Enter your username",
319
- usernameOrEmailPlaceholder: "Enter your username or email",
319
+ usernamePlaceholder: "Username",
320
+ usernameOrEmailPlaceholder: "Username or email",
320
321
  usernameAvailable: "Username is available",
321
322
  usernameTaken: "Username is already taken. Please try another.",
322
323
  displayUsername: "Display Username",
323
- displayUsernamePlaceholder: "Enter your display username"
324
+ displayUsernamePlaceholder: "Display Username"
324
325
  }, O = {
325
326
  signIn: [
326
327
  "auth",
@@ -337,6 +338,7 @@ var r = {
337
338
  ...e,
338
339
  minUsernameLength: t,
339
340
  maxUsernameLength: n,
341
+ usernamePrefix: e.usernamePrefix ?? "",
340
342
  localization: r,
341
343
  additionalFields: [{
342
344
  name: "username",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth-ui/core",
3
- "version": "1.6.25",
3
+ "version": "1.6.26",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "vite build",
@@ -24,8 +24,8 @@ export const localization = {
24
24
  /** @remarks `"Email"` */
25
25
  email: "Email",
26
26
 
27
- /** @remarks `"Enter your email"` */
28
- emailPlaceholder: "Enter your email",
27
+ /** @remarks `"m@example.com"` */
28
+ emailPlaceholder: "m@example.com",
29
29
 
30
30
  /** @remarks `"This field is required"` */
31
31
  fieldRequired: "This field is required",
@@ -48,8 +48,8 @@ export const localization = {
48
48
  /** @remarks `"Name"` */
49
49
  name: "Name",
50
50
 
51
- /** @remarks `"Enter your name"` */
52
- namePlaceholder: "Enter your name",
51
+ /** @remarks `"Name"` */
52
+ namePlaceholder: "Name",
53
53
 
54
54
  /** @remarks `"Need to create an account?"` */
55
55
  needToCreateAnAccount: "Need to create an account?",
@@ -57,8 +57,8 @@ export const localization = {
57
57
  /** @remarks `"New password"` */
58
58
  newPassword: "New password",
59
59
 
60
- /** @remarks `"Enter your new password"` */
61
- newPasswordPlaceholder: "Enter your new password",
60
+ /** @remarks `"New password"` */
61
+ newPasswordPlaceholder: "New password",
62
62
 
63
63
  /** @remarks `"Open {{provider}}"` */
64
64
  openEmailProvider: "Open {{provider}}",
@@ -69,8 +69,8 @@ export const localization = {
69
69
  /** @remarks `"Password"` */
70
70
  password: "Password",
71
71
 
72
- /** @remarks `"Enter your password"` */
73
- passwordPlaceholder: "Enter your password",
72
+ /** @remarks `"Password"` */
73
+ passwordPlaceholder: "Password",
74
74
 
75
75
  /** @remarks `"Password reset email sent"` */
76
76
  passwordResetEmailSent: "Password reset email sent",
@@ -71,6 +71,11 @@ export type OrganizationPluginOptions = {
71
71
  */
72
72
  additionalRoles?: Record<string, string>
73
73
  slug?: string | null
74
+ /**
75
+ * Prefix prepended to organization slugs.
76
+ * @default ""
77
+ */
78
+ slugPrefix?: string
74
79
  }
75
80
 
76
81
  export const organizationPlugin = createAuthPlugin(
@@ -83,6 +88,7 @@ export const organizationPlugin = createAuthPlugin(
83
88
 
84
89
  return {
85
90
  slug: options.slug,
91
+ slugPrefix: options.slugPrefix ?? "",
86
92
  checkSlug: options.checkSlug ?? true,
87
93
  localization,
88
94
  logo: {
@@ -2,11 +2,11 @@ export const usernameLocalization = {
2
2
  /** @remarks `"Username"` */
3
3
  username: "Username",
4
4
 
5
- /** @remarks `"Enter your username"` */
6
- usernamePlaceholder: "Enter your username",
5
+ /** @remarks `"Username"` */
6
+ usernamePlaceholder: "Username",
7
7
 
8
- /** @remarks `"Enter your username or email"` */
9
- usernameOrEmailPlaceholder: "Enter your username or email",
8
+ /** @remarks `"Username or Email"` */
9
+ usernameOrEmailPlaceholder: "Username or email",
10
10
 
11
11
  /** @remarks `"Username is available"` */
12
12
  usernameAvailable: "Username is available",
@@ -17,8 +17,8 @@ export const usernameLocalization = {
17
17
  /** @remarks `"Display Username"` */
18
18
  displayUsername: "Display Username",
19
19
 
20
- /** @remarks `"Enter your display username"` */
21
- displayUsernamePlaceholder: "Enter your display username"
20
+ /** @remarks `"Display Username"` */
21
+ displayUsernamePlaceholder: "Display Username"
22
22
  }
23
23
 
24
24
  export type UsernameLocalization = typeof usernameLocalization
@@ -28,6 +28,11 @@ export type UsernamePluginOptions = {
28
28
  * @remarks `UsernameLocalization`
29
29
  */
30
30
  localization?: Partial<UsernameLocalization>
31
+ /**
32
+ * Prefix prepended to usernames.
33
+ * @default ""
34
+ */
35
+ usernamePrefix?: string
31
36
  }
32
37
 
33
38
  export const usernamePlugin = createAuthPlugin(
@@ -41,6 +46,7 @@ export const usernamePlugin = createAuthPlugin(
41
46
  ...options,
42
47
  minUsernameLength,
43
48
  maxUsernameLength,
49
+ usernamePrefix: options.usernamePrefix ?? "",
44
50
  localization,
45
51
  additionalFields: [
46
52
  {