@better-auth-ui/solid 1.6.19
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/components/auth/email/email-changed.d.ts +59 -0
- package/dist/components/auth/email/email-changed.js +264 -0
- package/dist/components/auth/email/email-styles.d.ts +48 -0
- package/dist/components/auth/email/email-styles.js +107 -0
- package/dist/components/auth/email/email-verification.d.ts +51 -0
- package/dist/components/auth/email/email-verification.js +212 -0
- package/dist/components/auth/email/index.d.ts +9 -0
- package/dist/components/auth/email/magic-link.d.ts +53 -0
- package/dist/components/auth/email/magic-link.js +213 -0
- package/dist/components/auth/email/new-device.d.ts +77 -0
- package/dist/components/auth/email/new-device.js +326 -0
- package/dist/components/auth/email/organization-invitation.d.ts +70 -0
- package/dist/components/auth/email/organization-invitation.js +260 -0
- package/dist/components/auth/email/otp-email.d.ts +49 -0
- package/dist/components/auth/email/otp-email.js +191 -0
- package/dist/components/auth/email/password-changed.d.ts +56 -0
- package/dist/components/auth/email/password-changed.js +236 -0
- package/dist/components/auth/email/reset-password.d.ts +51 -0
- package/dist/components/auth/email/reset-password.js +212 -0
- package/dist/email.d.ts +18 -0
- package/dist/email.js +10 -0
- package/dist/hooks/auth/use-authenticate.d.ts +3 -0
- package/dist/hooks/auth/use-authenticate.js +18 -0
- package/dist/hooks/auth/use-sign-out.d.ts +2 -0
- package/dist/hooks/auth/use-sign-out.js +17 -0
- package/dist/hooks/auth/use-user.d.ts +213 -0
- package/dist/hooks/auth/use-user.js +13 -0
- package/dist/hooks/use-auth-mutation.d.ts +6 -0
- package/dist/hooks/use-auth-mutation.js +11 -0
- package/dist/hooks/use-auth-query.d.ts +5 -0
- package/dist/hooks/use-auth-query.js +17 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +68 -0
- package/dist/lib/auth-client.d.ts +26 -0
- package/dist/lib/auth-config.d.ts +12 -0
- package/dist/lib/auth-config.js +21 -0
- package/dist/lib/auth-plugin.d.ts +16 -0
- package/dist/lib/auth-provider.d.ts +12 -0
- package/dist/lib/auth-provider.js +36 -0
- package/dist/lib/auth-server.d.ts +16 -0
- package/dist/lib/auth-utils.d.ts +3 -0
- package/dist/lib/auth-utils.js +12 -0
- package/dist/lib/fetch-options-provider.d.ts +23 -0
- package/dist/lib/fetch-options-provider.js +29 -0
- package/dist/lib/mutation-invalidator.d.ts +11 -0
- package/dist/lib/mutation-invalidator.js +20 -0
- package/dist/lib/provider-icons.d.ts +8 -0
- package/dist/lib/provider-icons.js +5 -0
- package/dist/mutations/api-key/create-api-key-mutation.d.ts +71 -0
- package/dist/mutations/api-key/create-api-key-mutation.js +12 -0
- package/dist/mutations/api-key/delete-api-key-mutation.d.ts +23 -0
- package/dist/mutations/api-key/delete-api-key-mutation.js +12 -0
- package/dist/mutations/auth/request-password-reset-mutation.d.ts +11 -0
- package/dist/mutations/auth/request-password-reset-mutation.js +8 -0
- package/dist/mutations/auth/reset-password-mutation.d.ts +13 -0
- package/dist/mutations/auth/reset-password-mutation.js +8 -0
- package/dist/mutations/auth/send-verification-email-mutation.d.ts +11 -0
- package/dist/mutations/auth/send-verification-email-mutation.js +8 -0
- package/dist/mutations/auth/sign-in-email-mutation.d.ts +15 -0
- package/dist/mutations/auth/sign-in-email-mutation.js +8 -0
- package/dist/mutations/auth/sign-in-social-mutation.d.ts +53 -0
- package/dist/mutations/auth/sign-in-social-mutation.js +8 -0
- package/dist/mutations/auth/sign-out-mutation.d.ts +6 -0
- package/dist/mutations/auth/sign-out-mutation.js +8 -0
- package/dist/mutations/auth/sign-up-email-mutation.d.ts +17 -0
- package/dist/mutations/auth/sign-up-email-mutation.js +8 -0
- package/dist/mutations/auth-mutation-options.d.ts +10 -0
- package/dist/mutations/auth-mutation-options.js +19 -0
- package/dist/mutations/create-auth-mutation.d.ts +10 -0
- package/dist/mutations/create-auth-mutation.js +20 -0
- package/dist/mutations/magic-link/sign-in-magic-link-mutation.d.ts +19 -0
- package/dist/mutations/magic-link/sign-in-magic-link-mutation.js +8 -0
- package/dist/mutations/multi-session/revoke-multi-session-mutation.d.ts +19 -0
- package/dist/mutations/multi-session/revoke-multi-session-mutation.js +12 -0
- package/dist/mutations/multi-session/set-active-session-mutation.d.ts +19 -0
- package/dist/mutations/multi-session/set-active-session-mutation.js +13 -0
- package/dist/mutations/organization/accept-invitation-mutation.d.ts +18 -0
- package/dist/mutations/organization/accept-invitation-mutation.js +12 -0
- package/dist/mutations/organization/cancel-invitation-mutation.d.ts +18 -0
- package/dist/mutations/organization/cancel-invitation-mutation.js +12 -0
- package/dist/mutations/organization/check-slug-mutation.d.ts +18 -0
- package/dist/mutations/organization/check-slug-mutation.js +15 -0
- package/dist/mutations/organization/create-organization-mutation.d.ts +38 -0
- package/dist/mutations/organization/create-organization-mutation.js +12 -0
- package/dist/mutations/organization/delete-organization-mutation.d.ts +18 -0
- package/dist/mutations/organization/delete-organization-mutation.js +12 -0
- package/dist/mutations/organization/index.d.ts +13 -0
- package/dist/mutations/organization/index.js +13 -0
- package/dist/mutations/organization/invite-member-mutation.d.ts +30 -0
- package/dist/mutations/organization/invite-member-mutation.js +12 -0
- package/dist/mutations/organization/leave-organization-mutation.d.ts +18 -0
- package/dist/mutations/organization/leave-organization-mutation.js +12 -0
- package/dist/mutations/organization/metadata.d.ts +13 -0
- package/dist/mutations/organization/metadata.js +27 -0
- package/dist/mutations/organization/reject-invitation-mutation.d.ts +18 -0
- package/dist/mutations/organization/reject-invitation-mutation.js +12 -0
- package/dist/mutations/organization/remove-member-mutation.d.ts +22 -0
- package/dist/mutations/organization/remove-member-mutation.js +12 -0
- package/dist/mutations/organization/set-active-organization-mutation.d.ts +24 -0
- package/dist/mutations/organization/set-active-organization-mutation.js +35 -0
- package/dist/mutations/organization/update-member-role-mutation.d.ts +26 -0
- package/dist/mutations/organization/update-member-role-mutation.js +12 -0
- package/dist/mutations/organization/update-organization-mutation.d.ts +42 -0
- package/dist/mutations/organization/update-organization-mutation.js +12 -0
- package/dist/mutations/organization/utils.d.ts +8 -0
- package/dist/mutations/organization/utils.js +17 -0
- package/dist/mutations/passkey/add-passkey-mutation.d.ts +73 -0
- package/dist/mutations/passkey/add-passkey-mutation.js +12 -0
- package/dist/mutations/passkey/delete-passkey-mutation.d.ts +19 -0
- package/dist/mutations/passkey/delete-passkey-mutation.js +12 -0
- package/dist/mutations/passkey/sign-in-passkey-mutation.d.ts +50 -0
- package/dist/mutations/passkey/sign-in-passkey-mutation.js +9 -0
- package/dist/mutations/settings/change-email-mutation.d.ts +11 -0
- package/dist/mutations/settings/change-email-mutation.js +8 -0
- package/dist/mutations/settings/change-password-mutation.d.ts +13 -0
- package/dist/mutations/settings/change-password-mutation.js +8 -0
- package/dist/mutations/settings/delete-user-mutation.d.ts +13 -0
- package/dist/mutations/settings/delete-user-mutation.js +8 -0
- package/dist/mutations/settings/link-social-mutation.d.ts +35 -0
- package/dist/mutations/settings/link-social-mutation.js +8 -0
- package/dist/mutations/settings/revoke-session-mutation.d.ts +19 -0
- package/dist/mutations/settings/revoke-session-mutation.js +12 -0
- package/dist/mutations/settings/unlink-account-mutation.d.ts +23 -0
- package/dist/mutations/settings/unlink-account-mutation.js +12 -0
- package/dist/mutations/settings/update-user-mutation.d.ts +6 -0
- package/dist/mutations/settings/update-user-mutation.js +8 -0
- package/dist/mutations/use-session-scoped-mutation.d.ts +17 -0
- package/dist/mutations/use-session-scoped-mutation.js +17 -0
- package/dist/mutations/username/is-username-available-mutation.d.ts +9 -0
- package/dist/mutations/username/is-username-available-mutation.js +8 -0
- package/dist/mutations/username/sign-in-username-mutation.d.ts +15 -0
- package/dist/mutations/username/sign-in-username-mutation.js +9 -0
- package/dist/plugins/captcha-plugin.d.ts +29 -0
- package/dist/plugins/captcha-plugin.js +26 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +2 -0
- package/dist/queries/api-key/list-api-keys-query.d.ts +44 -0
- package/dist/queries/api-key/list-api-keys-query.js +17 -0
- package/dist/queries/auth/session-query.d.ts +22 -0
- package/dist/queries/auth/session-query.js +32 -0
- package/dist/queries/auth-query-options.d.ts +14 -0
- package/dist/queries/auth-query-options.js +17 -0
- package/dist/queries/create-user-scoped-query.d.ts +25 -0
- package/dist/queries/create-user-scoped-query.js +29 -0
- package/dist/queries/multi-session/list-device-sessions-query.d.ts +23 -0
- package/dist/queries/multi-session/list-device-sessions-query.js +17 -0
- package/dist/queries/organization/active-organization-query.d.ts +37 -0
- package/dist/queries/organization/active-organization-query.js +26 -0
- package/dist/queries/organization/full-organization-query.d.ts +35 -0
- package/dist/queries/organization/full-organization-query.js +25 -0
- package/dist/queries/organization/has-permission-query.d.ts +23 -0
- package/dist/queries/organization/has-permission-query.js +31 -0
- package/dist/queries/organization/index.d.ts +7 -0
- package/dist/queries/organization/index.js +7 -0
- package/dist/queries/organization/list-invitations-query.d.ts +29 -0
- package/dist/queries/organization/list-invitations-query.js +29 -0
- package/dist/queries/organization/list-members-query.d.ts +53 -0
- package/dist/queries/organization/list-members-query.js +29 -0
- package/dist/queries/organization/list-organizations-query.d.ts +23 -0
- package/dist/queries/organization/list-organizations-query.js +25 -0
- package/dist/queries/organization/list-user-invitations-query.d.ts +29 -0
- package/dist/queries/organization/list-user-invitations-query.js +25 -0
- package/dist/queries/organization/plugin.d.ts +1 -0
- package/dist/queries/organization/plugin.js +8 -0
- package/dist/queries/organization/utils.d.ts +16 -0
- package/dist/queries/organization/utils.js +18 -0
- package/dist/queries/passkey/list-passkeys-query.d.ts +23 -0
- package/dist/queries/passkey/list-passkeys-query.js +17 -0
- package/dist/queries/settings/account-info-query.d.ts +35 -0
- package/dist/queries/settings/account-info-query.js +17 -0
- package/dist/queries/settings/list-accounts-query.d.ts +23 -0
- package/dist/queries/settings/list-accounts-query.js +17 -0
- package/dist/queries/settings/list-sessions-query.d.ts +24 -0
- package/dist/queries/settings/list-sessions-query.js +17 -0
- package/dist/server/queries/auth/session-query.d.ts +19 -0
- package/dist/server/queries/auth/session-query.js +13 -0
- package/dist/server.d.ts +7 -0
- package/dist/server.js +7 -0
- package/package.json +63 -0
- package/src/components/auth/email/email-changed.tsx +305 -0
- package/src/components/auth/email/email-styles.tsx +139 -0
- package/src/components/auth/email/email-verification.tsx +249 -0
- package/src/components/auth/email/index.ts +9 -0
- package/src/components/auth/email/magic-link.tsx +254 -0
- package/src/components/auth/email/new-device.tsx +347 -0
- package/src/components/auth/email/organization-invitation.tsx +322 -0
- package/src/components/auth/email/otp-email.tsx +239 -0
- package/src/components/auth/email/password-changed.tsx +279 -0
- package/src/components/auth/email/reset-password.tsx +250 -0
- package/src/email.ts +49 -0
- package/src/hooks/auth/use-authenticate.ts +30 -0
- package/src/hooks/auth/use-sign-out.ts +23 -0
- package/src/hooks/auth/use-user.ts +19 -0
- package/src/hooks/use-auth-mutation.ts +35 -0
- package/src/hooks/use-auth-query.ts +33 -0
- package/src/index.ts +48 -0
- package/src/lib/auth-client.ts +43 -0
- package/src/lib/auth-config.ts +46 -0
- package/src/lib/auth-plugin.ts +20 -0
- package/src/lib/auth-provider.tsx +60 -0
- package/src/lib/auth-server.ts +25 -0
- package/src/lib/auth-utils.ts +25 -0
- package/src/lib/fetch-options-provider.tsx +77 -0
- package/src/lib/mutation-invalidator.tsx +82 -0
- package/src/lib/provider-icons.ts +10 -0
- package/src/mutations/api-key/create-api-key-mutation.ts +40 -0
- package/src/mutations/api-key/delete-api-key-mutation.ts +40 -0
- package/src/mutations/auth/request-password-reset-mutation.ts +15 -0
- package/src/mutations/auth/reset-password-mutation.ts +16 -0
- package/src/mutations/auth/send-verification-email-mutation.ts +15 -0
- package/src/mutations/auth/sign-in-email-mutation.ts +17 -0
- package/src/mutations/auth/sign-in-social-mutation.ts +16 -0
- package/src/mutations/auth/sign-out-mutation.ts +13 -0
- package/src/mutations/auth/sign-up-email-mutation.ts +17 -0
- package/src/mutations/auth-mutation-options.ts +62 -0
- package/src/mutations/create-auth-mutation.ts +44 -0
- package/src/mutations/magic-link/sign-in-magic-link-mutation.ts +15 -0
- package/src/mutations/multi-session/revoke-multi-session-mutation.ts +40 -0
- package/src/mutations/multi-session/set-active-session-mutation.ts +43 -0
- package/src/mutations/organization/accept-invitation-mutation.ts +38 -0
- package/src/mutations/organization/cancel-invitation-mutation.ts +38 -0
- package/src/mutations/organization/check-slug-mutation.ts +36 -0
- package/src/mutations/organization/create-organization-mutation.ts +37 -0
- package/src/mutations/organization/delete-organization-mutation.ts +37 -0
- package/src/mutations/organization/index.ts +13 -0
- package/src/mutations/organization/invite-member-mutation.ts +38 -0
- package/src/mutations/organization/leave-organization-mutation.ts +37 -0
- package/src/mutations/organization/metadata.ts +103 -0
- package/src/mutations/organization/reject-invitation-mutation.ts +38 -0
- package/src/mutations/organization/remove-member-mutation.ts +38 -0
- package/src/mutations/organization/set-active-organization-mutation.ts +110 -0
- package/src/mutations/organization/update-member-role-mutation.ts +38 -0
- package/src/mutations/organization/update-organization-mutation.ts +37 -0
- package/src/mutations/organization/utils.ts +51 -0
- package/src/mutations/passkey/add-passkey-mutation.ts +40 -0
- package/src/mutations/passkey/delete-passkey-mutation.ts +40 -0
- package/src/mutations/passkey/sign-in-passkey-mutation.ts +17 -0
- package/src/mutations/settings/change-email-mutation.ts +17 -0
- package/src/mutations/settings/change-password-mutation.ts +16 -0
- package/src/mutations/settings/delete-user-mutation.ts +16 -0
- package/src/mutations/settings/link-social-mutation.ts +16 -0
- package/src/mutations/settings/revoke-session-mutation.ts +38 -0
- package/src/mutations/settings/unlink-account-mutation.ts +38 -0
- package/src/mutations/settings/update-user-mutation.ts +17 -0
- package/src/mutations/use-session-scoped-mutation.ts +64 -0
- package/src/mutations/username/is-username-available-mutation.ts +15 -0
- package/src/mutations/username/sign-in-username-mutation.ts +17 -0
- package/src/plugins/captcha-plugin.tsx +64 -0
- package/src/plugins.ts +2 -0
- package/src/queries/api-key/list-api-keys-query.ts +93 -0
- package/src/queries/auth/session-query.ts +81 -0
- package/src/queries/auth-query-options.ts +57 -0
- package/src/queries/create-user-scoped-query.ts +107 -0
- package/src/queries/multi-session/list-device-sessions-query.ts +107 -0
- package/src/queries/organization/active-organization-query.ts +127 -0
- package/src/queries/organization/full-organization-query.ts +111 -0
- package/src/queries/organization/has-permission-query.ts +121 -0
- package/src/queries/organization/index.ts +7 -0
- package/src/queries/organization/list-invitations-query.ts +124 -0
- package/src/queries/organization/list-members-query.ts +124 -0
- package/src/queries/organization/list-organizations-query.ts +113 -0
- package/src/queries/organization/list-user-invitations-query.ts +114 -0
- package/src/queries/organization/plugin.ts +11 -0
- package/src/queries/organization/utils.ts +88 -0
- package/src/queries/passkey/list-passkeys-query.ts +93 -0
- package/src/queries/settings/account-info-query.ts +94 -0
- package/src/queries/settings/list-accounts-query.ts +94 -0
- package/src/queries/settings/list-sessions-query.ts +96 -0
- package/src/server/queries/auth/session-query.ts +56 -0
- package/src/server.ts +7 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { EmailClassNames, EmailColors } from './email-styles';
|
|
3
|
+
declare const emailChangedEmailLocalization: {
|
|
4
|
+
YOUR_EMAIL_ADDRESS_HAS_BEEN_CHANGED: string;
|
|
5
|
+
LOGO: string;
|
|
6
|
+
EMAIL_ADDRESS_CHANGED: string;
|
|
7
|
+
EMAIL_ADDRESS_FOR_YOUR_ACCOUNT_CHANGED: string;
|
|
8
|
+
PREVIOUS_EMAIL: string;
|
|
9
|
+
NEW_EMAIL: string;
|
|
10
|
+
IF_YOU_MADE_THIS_CHANGE: string;
|
|
11
|
+
I_DIDNT_MAKE_THIS_CHANGE: string;
|
|
12
|
+
EMAIL_SENT_BY: string;
|
|
13
|
+
IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE: string;
|
|
14
|
+
POWERED_BY_BETTER_AUTH: string;
|
|
15
|
+
};
|
|
16
|
+
export type EmailChangedEmailLocalization = typeof emailChangedEmailLocalization;
|
|
17
|
+
export interface EmailChangedEmailProps {
|
|
18
|
+
oldEmail?: string;
|
|
19
|
+
newEmail?: string;
|
|
20
|
+
revertURL?: string;
|
|
21
|
+
appName?: string;
|
|
22
|
+
supportEmail?: string;
|
|
23
|
+
logoURL?: string | {
|
|
24
|
+
light: string;
|
|
25
|
+
dark: string;
|
|
26
|
+
};
|
|
27
|
+
classNames?: EmailClassNames;
|
|
28
|
+
colors?: EmailColors;
|
|
29
|
+
poweredBy?: boolean;
|
|
30
|
+
darkMode?: boolean;
|
|
31
|
+
head?: JSX.Element;
|
|
32
|
+
localization?: Partial<EmailChangedEmailLocalization>;
|
|
33
|
+
}
|
|
34
|
+
export declare function EmailChangedEmail(props: EmailChangedEmailProps): JSX.Element;
|
|
35
|
+
export declare namespace EmailChangedEmail {
|
|
36
|
+
var localization: {
|
|
37
|
+
YOUR_EMAIL_ADDRESS_HAS_BEEN_CHANGED: string;
|
|
38
|
+
LOGO: string;
|
|
39
|
+
EMAIL_ADDRESS_CHANGED: string;
|
|
40
|
+
EMAIL_ADDRESS_FOR_YOUR_ACCOUNT_CHANGED: string;
|
|
41
|
+
PREVIOUS_EMAIL: string;
|
|
42
|
+
NEW_EMAIL: string;
|
|
43
|
+
IF_YOU_MADE_THIS_CHANGE: string;
|
|
44
|
+
I_DIDNT_MAKE_THIS_CHANGE: string;
|
|
45
|
+
EMAIL_SENT_BY: string;
|
|
46
|
+
IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE: string;
|
|
47
|
+
POWERED_BY_BETTER_AUTH: string;
|
|
48
|
+
};
|
|
49
|
+
var PreviewProps: {
|
|
50
|
+
oldEmail: string;
|
|
51
|
+
newEmail: string;
|
|
52
|
+
supportEmail: string;
|
|
53
|
+
revertURL: string;
|
|
54
|
+
appName: string;
|
|
55
|
+
poweredBy: true;
|
|
56
|
+
darkMode: true;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export default EmailChangedEmail;
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import e from "./email-styles.js";
|
|
2
|
+
import { createComponent as t, ssr as n } from "solid-js/web";
|
|
3
|
+
import { Body as r, Button as i, Container as a, Head as o, Heading as s, Hr as c, Html as l, Img as u, Preview as d, Section as f, Tailwind as p, Text as m } from "@solidjs-email/main";
|
|
4
|
+
import { Show as h } from "solid-js";
|
|
5
|
+
//#region src/components/auth/email/email-changed.tsx
|
|
6
|
+
var g = "<meta content=\"light dark\" name=\"color-scheme\">", _ = "<meta content=\"light dark\" name=\"supported-color-schemes\">";
|
|
7
|
+
function v(...e) {
|
|
8
|
+
return e.filter(Boolean).join(" ");
|
|
9
|
+
}
|
|
10
|
+
var y = {
|
|
11
|
+
YOUR_EMAIL_ADDRESS_HAS_BEEN_CHANGED: "Your email address has been changed",
|
|
12
|
+
LOGO: "Logo",
|
|
13
|
+
EMAIL_ADDRESS_CHANGED: "Email address changed",
|
|
14
|
+
EMAIL_ADDRESS_FOR_YOUR_ACCOUNT_CHANGED: "The email address for your {appName} account has been changed.",
|
|
15
|
+
PREVIOUS_EMAIL: "Previous email:",
|
|
16
|
+
NEW_EMAIL: "New email:",
|
|
17
|
+
IF_YOU_MADE_THIS_CHANGE: "If you made this change, you can safely ignore this email.",
|
|
18
|
+
I_DIDNT_MAKE_THIS_CHANGE: "I didn't make this change",
|
|
19
|
+
EMAIL_SENT_BY: "Email sent by {appName}.",
|
|
20
|
+
IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE: "If you didn't authorize this change, please contact support immediately {supportEmail} to secure your account.",
|
|
21
|
+
POWERED_BY_BETTER_AUTH: "Powered by {betterAuth}"
|
|
22
|
+
};
|
|
23
|
+
function b(e) {
|
|
24
|
+
return e.replace(/\s{2,}/g, " ").replace(" .", ".");
|
|
25
|
+
}
|
|
26
|
+
function x(y) {
|
|
27
|
+
let S = () => y.darkMode ?? !0, C = () => ({
|
|
28
|
+
...x.localization,
|
|
29
|
+
...y.localization
|
|
30
|
+
}), w = () => b(C().EMAIL_ADDRESS_FOR_YOUR_ACCOUNT_CHANGED.replace("{appName}", y.appName || "")), T = () => b(C().IF_YOU_DIDNT_AUTHORIZE_THIS_CHANGE.replace("{supportEmail}", y.supportEmail || ""));
|
|
31
|
+
return t(l, { get children() {
|
|
32
|
+
return [
|
|
33
|
+
t(o, { get children() {
|
|
34
|
+
return [
|
|
35
|
+
n(g),
|
|
36
|
+
n(_),
|
|
37
|
+
t(e, {
|
|
38
|
+
get colors() {
|
|
39
|
+
return y.colors;
|
|
40
|
+
},
|
|
41
|
+
get darkMode() {
|
|
42
|
+
return S();
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
y.head
|
|
46
|
+
];
|
|
47
|
+
} }),
|
|
48
|
+
t(d, { get children() {
|
|
49
|
+
return C().YOUR_EMAIL_ADDRESS_HAS_BEEN_CHANGED;
|
|
50
|
+
} }),
|
|
51
|
+
t(p, { get children() {
|
|
52
|
+
return t(r, {
|
|
53
|
+
get class() {
|
|
54
|
+
return v("bg-background", y.classNames?.body);
|
|
55
|
+
},
|
|
56
|
+
style: { "font-family": "Arial, Helvetica, sans-serif" },
|
|
57
|
+
get children() {
|
|
58
|
+
return t(a, {
|
|
59
|
+
get class() {
|
|
60
|
+
return v("mx-auto my-auto max-w-xl px-2 py-10", y.classNames?.container);
|
|
61
|
+
},
|
|
62
|
+
get children() {
|
|
63
|
+
return t(f, {
|
|
64
|
+
get class() {
|
|
65
|
+
return v("rounded-none border border-border bg-card p-8 text-card-foreground", y.classNames?.card);
|
|
66
|
+
},
|
|
67
|
+
get children() {
|
|
68
|
+
return [
|
|
69
|
+
y.logoURL && (typeof y.logoURL == "string" ? t(u, {
|
|
70
|
+
get alt() {
|
|
71
|
+
return y.appName || C().LOGO;
|
|
72
|
+
},
|
|
73
|
+
get class() {
|
|
74
|
+
return v("mx-auto mb-8", y.classNames?.logo);
|
|
75
|
+
},
|
|
76
|
+
height: 48,
|
|
77
|
+
get src() {
|
|
78
|
+
return y.logoURL;
|
|
79
|
+
},
|
|
80
|
+
width: 48
|
|
81
|
+
}) : [t(u, {
|
|
82
|
+
get alt() {
|
|
83
|
+
return y.appName || C().LOGO;
|
|
84
|
+
},
|
|
85
|
+
get class() {
|
|
86
|
+
return v("logo-light mx-auto mb-8", y.classNames?.logo);
|
|
87
|
+
},
|
|
88
|
+
height: 48,
|
|
89
|
+
get src() {
|
|
90
|
+
return y.logoURL.light;
|
|
91
|
+
},
|
|
92
|
+
width: 48
|
|
93
|
+
}), t(u, {
|
|
94
|
+
get alt() {
|
|
95
|
+
return y.appName || C().LOGO;
|
|
96
|
+
},
|
|
97
|
+
get class() {
|
|
98
|
+
return v("logo-dark hidden mx-auto mb-8", y.classNames?.logo);
|
|
99
|
+
},
|
|
100
|
+
height: 48,
|
|
101
|
+
get src() {
|
|
102
|
+
return y.logoURL.dark;
|
|
103
|
+
},
|
|
104
|
+
width: 48
|
|
105
|
+
})]),
|
|
106
|
+
t(s, {
|
|
107
|
+
get class() {
|
|
108
|
+
return v("m-0 mb-5 font-semibold text-2xl", y.classNames?.title);
|
|
109
|
+
},
|
|
110
|
+
get children() {
|
|
111
|
+
return C().EMAIL_ADDRESS_CHANGED;
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
t(m, {
|
|
115
|
+
get class() {
|
|
116
|
+
return v("font-normal text-sm", y.classNames?.content);
|
|
117
|
+
},
|
|
118
|
+
get children() {
|
|
119
|
+
return w();
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
t(h, {
|
|
123
|
+
get when() {
|
|
124
|
+
return y.oldEmail || y.newEmail;
|
|
125
|
+
},
|
|
126
|
+
get children() {
|
|
127
|
+
return t(f, {
|
|
128
|
+
get class() {
|
|
129
|
+
return v("my-6 border border-border bg-muted p-4", y.classNames?.codeBlock);
|
|
130
|
+
},
|
|
131
|
+
get children() {
|
|
132
|
+
return [t(h, {
|
|
133
|
+
get when() {
|
|
134
|
+
return y.oldEmail;
|
|
135
|
+
},
|
|
136
|
+
children: (e) => [t(m, {
|
|
137
|
+
get class() {
|
|
138
|
+
return v("m-0 mb-2 text-muted-foreground text-xs", y.classNames?.description);
|
|
139
|
+
},
|
|
140
|
+
get children() {
|
|
141
|
+
return C().PREVIOUS_EMAIL;
|
|
142
|
+
}
|
|
143
|
+
}), t(m, {
|
|
144
|
+
get class() {
|
|
145
|
+
return v("m-0 mb-4 font-semibold text-sm", y.classNames?.content);
|
|
146
|
+
},
|
|
147
|
+
get children() {
|
|
148
|
+
return e();
|
|
149
|
+
}
|
|
150
|
+
})]
|
|
151
|
+
}), t(h, {
|
|
152
|
+
get when() {
|
|
153
|
+
return y.newEmail;
|
|
154
|
+
},
|
|
155
|
+
children: (e) => [t(m, {
|
|
156
|
+
get class() {
|
|
157
|
+
return v("m-0 mb-2 text-muted-foreground text-xs", y.classNames?.description);
|
|
158
|
+
},
|
|
159
|
+
get children() {
|
|
160
|
+
return C().NEW_EMAIL;
|
|
161
|
+
}
|
|
162
|
+
}), t(m, {
|
|
163
|
+
get class() {
|
|
164
|
+
return v("m-0 font-semibold text-primary text-sm", y.classNames?.content);
|
|
165
|
+
},
|
|
166
|
+
get children() {
|
|
167
|
+
return e();
|
|
168
|
+
}
|
|
169
|
+
})]
|
|
170
|
+
})];
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
}),
|
|
175
|
+
t(m, {
|
|
176
|
+
get class() {
|
|
177
|
+
return v("font-normal text-sm", y.classNames?.content);
|
|
178
|
+
},
|
|
179
|
+
get children() {
|
|
180
|
+
return C().IF_YOU_MADE_THIS_CHANGE;
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
183
|
+
t(h, {
|
|
184
|
+
get when() {
|
|
185
|
+
return y.revertURL;
|
|
186
|
+
},
|
|
187
|
+
children: (e) => t(f, {
|
|
188
|
+
class: "my-6",
|
|
189
|
+
get children() {
|
|
190
|
+
return t(i, {
|
|
191
|
+
get class() {
|
|
192
|
+
return v("inline-block whitespace-nowrap rounded-none bg-primary px-6 py-2.5 font-medium text-primary-foreground text-sm no-underline", y.classNames?.button);
|
|
193
|
+
},
|
|
194
|
+
get href() {
|
|
195
|
+
return e();
|
|
196
|
+
},
|
|
197
|
+
get children() {
|
|
198
|
+
return C().I_DIDNT_MAKE_THIS_CHANGE;
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
}),
|
|
204
|
+
t(c, { get class() {
|
|
205
|
+
return v("my-6 w-full border border-border border-solid", y.classNames?.separator);
|
|
206
|
+
} }),
|
|
207
|
+
t(h, {
|
|
208
|
+
get when() {
|
|
209
|
+
return y.appName;
|
|
210
|
+
},
|
|
211
|
+
children: (e) => t(m, {
|
|
212
|
+
get class() {
|
|
213
|
+
return v("mb-3 text-muted-foreground text-xs", y.classNames?.description);
|
|
214
|
+
},
|
|
215
|
+
get children() {
|
|
216
|
+
return C().EMAIL_SENT_BY.replace("{appName}", e());
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
}),
|
|
220
|
+
t(m, {
|
|
221
|
+
get class() {
|
|
222
|
+
return v("mt-3 text-muted-foreground text-xs", y.classNames?.description);
|
|
223
|
+
},
|
|
224
|
+
get children() {
|
|
225
|
+
return T();
|
|
226
|
+
}
|
|
227
|
+
}),
|
|
228
|
+
t(h, {
|
|
229
|
+
get when() {
|
|
230
|
+
return y.poweredBy;
|
|
231
|
+
},
|
|
232
|
+
get children() {
|
|
233
|
+
return t(m, {
|
|
234
|
+
get class() {
|
|
235
|
+
return v("mt-4 mb-0 text-center text-[11px] text-muted-foreground", y.classNames?.poweredBy);
|
|
236
|
+
},
|
|
237
|
+
get children() {
|
|
238
|
+
return C().POWERED_BY_BETTER_AUTH.replace("{betterAuth}", "better-auth");
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
} })
|
|
251
|
+
];
|
|
252
|
+
} });
|
|
253
|
+
}
|
|
254
|
+
x.localization = y, x.PreviewProps = {
|
|
255
|
+
oldEmail: "old@example.com",
|
|
256
|
+
newEmail: "new@example.com",
|
|
257
|
+
supportEmail: "support@example.com",
|
|
258
|
+
revertURL: "https://better-auth-ui.com/auth/revert-email?token=example-token",
|
|
259
|
+
appName: "Better Auth",
|
|
260
|
+
poweredBy: !0,
|
|
261
|
+
darkMode: !0
|
|
262
|
+
};
|
|
263
|
+
//#endregion
|
|
264
|
+
export { x as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const defaultColors: {
|
|
2
|
+
light: {
|
|
3
|
+
background: string;
|
|
4
|
+
border: string;
|
|
5
|
+
card: string;
|
|
6
|
+
cardForeground: string;
|
|
7
|
+
foreground: string;
|
|
8
|
+
muted: string;
|
|
9
|
+
mutedForeground: string;
|
|
10
|
+
primary: string;
|
|
11
|
+
primaryForeground: string;
|
|
12
|
+
};
|
|
13
|
+
dark: {
|
|
14
|
+
background: string;
|
|
15
|
+
border: string;
|
|
16
|
+
card: string;
|
|
17
|
+
cardForeground: string;
|
|
18
|
+
foreground: string;
|
|
19
|
+
muted: string;
|
|
20
|
+
mutedForeground: string;
|
|
21
|
+
primary: string;
|
|
22
|
+
primaryForeground: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type EmailClassNames = {
|
|
26
|
+
body?: string;
|
|
27
|
+
container?: string;
|
|
28
|
+
card?: string;
|
|
29
|
+
logo?: string;
|
|
30
|
+
title?: string;
|
|
31
|
+
content?: string;
|
|
32
|
+
button?: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
separator?: string;
|
|
35
|
+
link?: string;
|
|
36
|
+
poweredBy?: string;
|
|
37
|
+
codeBlock?: string;
|
|
38
|
+
};
|
|
39
|
+
export type EmailColors = {
|
|
40
|
+
light?: Partial<typeof defaultColors.light>;
|
|
41
|
+
dark?: Partial<typeof defaultColors.dark>;
|
|
42
|
+
};
|
|
43
|
+
type EmailStylesProps = {
|
|
44
|
+
colors?: EmailColors;
|
|
45
|
+
darkMode?: boolean;
|
|
46
|
+
};
|
|
47
|
+
export declare function EmailStyles(props: EmailStylesProps): import("solid-js").JSX.Element;
|
|
48
|
+
export default EmailStyles;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ssr as e } from "solid-js/web";
|
|
2
|
+
//#region src/components/auth/email/email-styles.tsx
|
|
3
|
+
var t = ["<style type=\"text/css\">", "</style>"], n = {
|
|
4
|
+
light: {
|
|
5
|
+
background: "#F5F5F5",
|
|
6
|
+
border: "#E5E5E5",
|
|
7
|
+
card: "#FFFFFF",
|
|
8
|
+
cardForeground: "#0A0A0A",
|
|
9
|
+
foreground: "#262626",
|
|
10
|
+
muted: "#F5F5F5",
|
|
11
|
+
mutedForeground: "#737373",
|
|
12
|
+
primary: "#171717",
|
|
13
|
+
primaryForeground: "#FAFAFA"
|
|
14
|
+
},
|
|
15
|
+
dark: {
|
|
16
|
+
background: "#0A0A0A",
|
|
17
|
+
border: "#2E2E2E",
|
|
18
|
+
card: "#171717",
|
|
19
|
+
cardForeground: "#FAFAFA",
|
|
20
|
+
foreground: "#D4D4D4",
|
|
21
|
+
muted: "#212121",
|
|
22
|
+
mutedForeground: "#A1A1A1",
|
|
23
|
+
primary: "#E5E5E5",
|
|
24
|
+
primaryForeground: "#171717"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function r(r) {
|
|
28
|
+
return e(t, `
|
|
29
|
+
.font-sans {
|
|
30
|
+
font-family: Arial, Helvetica, sans-serif !important;
|
|
31
|
+
}
|
|
32
|
+
.bg-background {
|
|
33
|
+
background-color: ${r.colors?.light?.background || n.light.background} !important;
|
|
34
|
+
}
|
|
35
|
+
.bg-card {
|
|
36
|
+
background-color: ${r.colors?.light?.card || n.light.card} !important;
|
|
37
|
+
}
|
|
38
|
+
.bg-primary {
|
|
39
|
+
background-color: ${r.colors?.light?.primary || n.light.primary} !important;
|
|
40
|
+
}
|
|
41
|
+
.bg-muted {
|
|
42
|
+
background-color: ${r.colors?.light?.muted || n.light.muted} !important;
|
|
43
|
+
}
|
|
44
|
+
.border-border {
|
|
45
|
+
border-color: ${r.colors?.light?.border || n.light.border} !important;
|
|
46
|
+
}
|
|
47
|
+
.text-card-foreground {
|
|
48
|
+
color: ${r.colors?.light?.cardForeground || n.light.cardForeground} !important;
|
|
49
|
+
}
|
|
50
|
+
.text-muted-foreground {
|
|
51
|
+
color: ${r.colors?.light?.mutedForeground || n.light.mutedForeground} !important;
|
|
52
|
+
}
|
|
53
|
+
.text-primary {
|
|
54
|
+
color: ${r.colors?.light?.primary || n.light.primary} !important;
|
|
55
|
+
}
|
|
56
|
+
.text-primary-foreground {
|
|
57
|
+
color: ${r.colors?.light?.primaryForeground || n.light.primaryForeground} !important;
|
|
58
|
+
}
|
|
59
|
+
.logo-dark {
|
|
60
|
+
display: none !important;
|
|
61
|
+
}
|
|
62
|
+
.logo-light {
|
|
63
|
+
display: block !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
${r.darkMode ?? !0 ? `@media (prefers-color-scheme: dark) {
|
|
67
|
+
.bg-background {
|
|
68
|
+
background-color: ${r.colors?.dark?.background || n.dark.background} !important;
|
|
69
|
+
}
|
|
70
|
+
.bg-card {
|
|
71
|
+
background-color: ${r.colors?.dark?.card || n.dark.card} !important;
|
|
72
|
+
}
|
|
73
|
+
.bg-primary {
|
|
74
|
+
background-color: ${r.colors?.dark?.primary || n.dark.primary} !important;
|
|
75
|
+
}
|
|
76
|
+
.bg-muted {
|
|
77
|
+
background-color: ${r.colors?.dark?.muted || n.dark.muted} !important;
|
|
78
|
+
}
|
|
79
|
+
.border-border {
|
|
80
|
+
border-color: ${r.colors?.dark?.border || n.dark.border} !important;
|
|
81
|
+
}
|
|
82
|
+
.text-card-foreground {
|
|
83
|
+
color: ${r.colors?.dark?.cardForeground || n.dark.cardForeground} !important;
|
|
84
|
+
}
|
|
85
|
+
.text-muted-foreground {
|
|
86
|
+
color: ${r.colors?.dark?.mutedForeground || n.dark.mutedForeground} !important;
|
|
87
|
+
}
|
|
88
|
+
.text-primary {
|
|
89
|
+
color: ${r.colors?.dark?.primary || n.dark.primary} !important;
|
|
90
|
+
}
|
|
91
|
+
.text-primary-foreground {
|
|
92
|
+
color: ${r.colors?.dark?.primaryForeground || n.dark.primaryForeground} !important;
|
|
93
|
+
}
|
|
94
|
+
.logo-dark {
|
|
95
|
+
display: block !important;
|
|
96
|
+
}
|
|
97
|
+
.logo-light {
|
|
98
|
+
display: none !important;
|
|
99
|
+
}
|
|
100
|
+
* {
|
|
101
|
+
box-shadow: none !important;
|
|
102
|
+
}
|
|
103
|
+
}` : ""}
|
|
104
|
+
`);
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { r as default, n as defaultColors };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { EmailClassNames, EmailColors } from './email-styles';
|
|
3
|
+
declare const emailVerificationEmailLocalization: {
|
|
4
|
+
VERIFY_YOUR_EMAIL_ADDRESS: string;
|
|
5
|
+
LOGO: string;
|
|
6
|
+
CLICK_BUTTON_TO_VERIFY_EMAIL: string;
|
|
7
|
+
VERIFY_EMAIL_ADDRESS: string;
|
|
8
|
+
OR_COPY_AND_PASTE_URL: string;
|
|
9
|
+
THIS_LINK_EXPIRES_IN_MINUTES: string;
|
|
10
|
+
EMAIL_SENT_BY: string;
|
|
11
|
+
IF_YOU_DIDNT_REQUEST_THIS_EMAIL: string;
|
|
12
|
+
POWERED_BY_BETTER_AUTH: string;
|
|
13
|
+
};
|
|
14
|
+
export type EmailVerificationEmailLocalization = typeof emailVerificationEmailLocalization;
|
|
15
|
+
export interface EmailVerificationEmailProps {
|
|
16
|
+
url: string;
|
|
17
|
+
email?: string;
|
|
18
|
+
appName?: string;
|
|
19
|
+
expirationMinutes?: number;
|
|
20
|
+
logoURL?: string | {
|
|
21
|
+
light: string;
|
|
22
|
+
dark: string;
|
|
23
|
+
};
|
|
24
|
+
classNames?: EmailClassNames;
|
|
25
|
+
colors?: EmailColors;
|
|
26
|
+
poweredBy?: boolean;
|
|
27
|
+
darkMode?: boolean;
|
|
28
|
+
head?: JSX.Element;
|
|
29
|
+
localization?: Partial<EmailVerificationEmailLocalization>;
|
|
30
|
+
}
|
|
31
|
+
export declare function EmailVerificationEmail(props: EmailVerificationEmailProps): JSX.Element;
|
|
32
|
+
export declare namespace EmailVerificationEmail {
|
|
33
|
+
var localization: {
|
|
34
|
+
VERIFY_YOUR_EMAIL_ADDRESS: string;
|
|
35
|
+
LOGO: string;
|
|
36
|
+
CLICK_BUTTON_TO_VERIFY_EMAIL: string;
|
|
37
|
+
VERIFY_EMAIL_ADDRESS: string;
|
|
38
|
+
OR_COPY_AND_PASTE_URL: string;
|
|
39
|
+
THIS_LINK_EXPIRES_IN_MINUTES: string;
|
|
40
|
+
EMAIL_SENT_BY: string;
|
|
41
|
+
IF_YOU_DIDNT_REQUEST_THIS_EMAIL: string;
|
|
42
|
+
POWERED_BY_BETTER_AUTH: string;
|
|
43
|
+
};
|
|
44
|
+
var PreviewProps: {
|
|
45
|
+
url: string;
|
|
46
|
+
appName: string;
|
|
47
|
+
email: string;
|
|
48
|
+
darkMode: true;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export default EmailVerificationEmail;
|