@nxgt/janus-mail 0.7.0 → 0.8.0
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/README.md +59 -19
- package/dist/generated/mail.d.ts +7 -0
- package/dist/generated/mail.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -1
- package/dist/index.js.map +7 -6
- package/dist/janus-mail.d.ts.map +1 -1
- package/dist/options.d.ts.map +1 -1
- package/dist/step-up-mail.d.ts +5 -0
- package/dist/step-up-mail.d.ts.map +1 -0
- package/dist/template-types.d.ts +13 -2
- package/dist/template-types.d.ts.map +1 -1
- package/dist/templates.d.ts +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/dist/types.d.ts +15 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +3 -3
- package/docs/guide/building.md +1 -1
- package/docs/guide/locales.md +7 -5
- package/docs/guide/sending.md +59 -14
- package/docs/guide/templates.md +20 -15
- package/docs/roadmap.md +12 -2
- package/docs/troubleshooting.md +62 -11
- package/mails/en/confirm-action.html +52 -0
- package/mails/en/confirm-action.txt +25 -0
- package/mails/fr/confirm-action.html +52 -0
- package/mails/fr/confirm-action.txt +25 -0
- package/mails/mail-manifest.json +26 -0
- package/package.json +5 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Enter this code to confirm your request.
|
|
2
|
+
|
|
3
|
+
{{ brand }}
|
|
4
|
+
|
|
5
|
+
Your confirmation code
|
|
6
|
+
|
|
7
|
+
Hello {{ name }},
|
|
8
|
+
|
|
9
|
+
Someone, we hope you, asked to do something sensitive on your {{ brand }} account. Enter this code to confirm it.
|
|
10
|
+
|
|
11
|
+
{{ code }}
|
|
12
|
+
|
|
13
|
+
This code expires in {{ expiresIn }}.
|
|
14
|
+
|
|
15
|
+
If this was not you, do not share this code: someone may be trying to act on your account. Secure your account now.
|
|
16
|
+
|
|
17
|
+
Secure my account
|
|
18
|
+
|
|
19
|
+
{{ link }}
|
|
20
|
+
|
|
21
|
+
If the button does not work, open this link: {{ link }}
|
|
22
|
+
|
|
23
|
+
You received this e-mail because you have an account with {{ brand }}.
|
|
24
|
+
|
|
25
|
+
{{ brand }}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="fr" dir="ltr" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" style="color-scheme:light dark;">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
+
<meta name="color-scheme" content="light dark">
|
|
8
|
+
<meta name="supported-color-schemes" content="light dark">
|
|
9
|
+
<style>[data-ogsc] .nx-dark-bg-paper{background-color:#040a19!important;}[data-ogsb] .nx-dark-bg-paper{background-color:#040a19!important;}[data-ogsc] .nx-dark-bg-card{background-color:#0f172b!important;background-color:lab(7.78673% 1.82345 -15.0537)!important;}[data-ogsb] .nx-dark-bg-card{background-color:#0f172b!important;background-color:lab(7.78673% 1.82345 -15.0537)!important;}[data-ogsc] .nx-dark-bg-background{background-color:#020918!important;background-color:lab(2.35721% .367686
|
|
10
|
+
-8.51797)!important;}[data-ogsb] .nx-dark-bg-background{background-color:#020918!important;background-color:lab(2.35721% .367686 -8.51797)!important;}[data-ogsc] .nx-dark-text-foreground{color:#f8fafc!important;color:lab(98.1434% -.369519 -1.05966)!important;}[data-ogsb] .nx-dark-text-foreground{color:#f8fafc!important;color:lab(98.1434% -.369519 -1.05966)!important;}[data-ogsc] .nx-dark-text-foreground-25{color:#404551!important;}[data-ogsb] .nx-dark-text-foreground-25{color:#404551!important;}
|
|
11
|
+
[data-ogsc] .nx-dark-text-card-foreground{color:#f8fafc!important;color:lab(98.1434% -.369519 -1.05966)!important;}[data-ogsb] .nx-dark-text-card-foreground{color:#f8fafc!important;color:lab(98.1434% -.369519 -1.05966)!important;}[data-ogsc] .nx-dark-border-border{border-color:#1c212f!important;}[data-ogsb] .nx-dark-border-border{border-color:#1c212f!important;}[data-ogsc] .nx-dark-bg-muted{background-color:#1e293b!important;}[data-ogsb] .nx-dark-bg-muted{background-color:#1e293b!important;}
|
|
12
|
+
[data-ogsc] .nx-dark-text-muted-foreground{color:#cbd5e1!important;}[data-ogsb] .nx-dark-text-muted-foreground{color:#cbd5e1!important;}[data-ogsc] .nx-dark-border-muted-foreground{border-color:#cbd5e1!important;}[data-ogsb] .nx-dark-border-muted-foreground{border-color:#cbd5e1!important;}[data-ogsc] .nx-dark-border-muted{border-color:#1e293b!important;}[data-ogsb] .nx-dark-border-muted{border-color:#1e293b!important;}[data-ogsc] .nx-dark-bg-primary{background-color:#fafafa!important;}
|
|
13
|
+
[data-ogsb] .nx-dark-bg-primary{background-color:#fafafa!important;}[data-ogsc] .nx-dark-text-primary{color:#fafafa!important;}[data-ogsb] .nx-dark-text-primary{color:#fafafa!important;}[data-ogsc] .nx-dark-text-primary-foreground{color:#18181b!important;}[data-ogsb] .nx-dark-text-primary-foreground{color:#18181b!important;}[data-ogsc] .nx-dark-text-info{color:#93c5fd!important;}[data-ogsb] .nx-dark-text-info{color:#93c5fd!important;}[data-ogsc] .nx-dark-border-primary{border-color:#fafafa
|
|
14
|
+
!important;}[data-ogsb] .nx-dark-border-primary{border-color:#fafafa!important;}[data-ogsc] .nx-dark-bg-primary-15{background-color:#272d3a!important;}[data-ogsb] .nx-dark-bg-primary-15{background-color:#272d3a!important;}[data-ogsc] .nx-dark-bg-primary-20{background-color:#343945!important;}[data-ogsb] .nx-dark-bg-primary-20{background-color:#343945!important;}[data-ogsc] .nx-dark-border-primary-40{border-color:#656972!important;}[data-ogsb] .nx-dark-border-primary-40{border-color:#656972
|
|
15
|
+
!important;}[data-ogsc] .nx-dark-border-primary-50{border-color:#7e8189!important;}[data-ogsb] .nx-dark-border-primary-50{border-color:#7e8189!important;}[data-ogsc] .nx-light-only{display:none!important;}[data-ogsb] .nx-light-only{display:none!important;}[data-ogsc] .nx-dark-only{display:inline-block!important;}[data-ogsb] .nx-dark-only{display:inline-block!important;}
|
|
16
|
+
@media (prefers-color-scheme:dark){html{--lightningcss-light:;--lightningcss-dark:initial;}.nx-dark-bg-paper{background-color:#040a19!important;}.nx-dark-bg-card{background-color:#0f172b!important;background-color:lab(7.78673% 1.82345 -15.0537)!important;}.nx-dark-text-foreground{color:#f8fafc!important;color:lab(98.1434% -.369519 -1.05966)!important;}.nx-dark-text-card-foreground{color:#f8fafc!important;color:lab(98.1434% -.369519 -1.05966)!important;}.nx-dark-border-border{border-color:#1c212f
|
|
17
|
+
!important;}.nx-dark-bg-muted{background-color:#1e293b!important;}.nx-dark-text-muted-foreground{color:#cbd5e1!important;}.nx-dark-bg-primary{background-color:#fafafa!important;}.nx-dark-text-primary-foreground{color:#18181b!important;}.nx-dark-text-info{color:#93c5fd!important;} }
|
|
18
|
+
</style>
|
|
19
|
+
</head>
|
|
20
|
+
<body xml:lang="fr" dir="ltr" style="margin:0;padding:0;width:100%;height:100%;word-break:break-word;background-color:#f4f4f4;" class="nx-dark-bg-paper"><div style="display:none;">Saisissez ce code pour confirmer votre demande. ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
21
|
+
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
22
|
+
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
23
|
+
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
24
|
+
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
25
|
+
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
26
|
+
 ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
|
|
27
|
+
 ͏  ͏ </div><span style="display:none">
|
|
28
|
+
<!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings><w:WordDocument><w:DontUseAdvancedTypographyReadingMail/></w:WordDocument></xml>
|
|
29
|
+
<![endif]--></span><div role="article" aria-roledescription="email" lang="fr" dir="ltr" style="font-size:medium;font-size:max(16px,1rem)">
|
|
30
|
+
<table class="nx-dark-bg-paper" role="presentation" cellpadding="0" cellspacing="0" dir="ltr" style="width:100%;background-color:#f4f4f4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont, 'Segoe UI',Roboto, 'Noto Sans',Ubuntu,Cantarell, 'Helvetica Neue',sans-serif;"><tr><td align="center" style="padding:32px 16px;">
|
|
31
|
+
<!--[if mso]>
|
|
32
|
+
<table role="none" cellpadding="0" cellspacing="0" style="width:600px" align="center"><tr><td>
|
|
33
|
+
<![endif]--><div style="margin:0 auto;max-width:600px;">
|
|
34
|
+
<table role="presentation" cellpadding="0" cellspacing="0" dir="ltr" style="width:100%;"><tr><td style="padding-bottom:24px;text-align:center;"><span class="nx-dark-text-foreground" style="font-size:18px;line-height:28px;font-weight:600;color:#020918;color:lab(2.35721% .367686 -8.51797);">{{ brand }}</span>
|
|
35
|
+
</td></tr><tr><td class="nx-dark-border-border nx-dark-bg-card nx-dark-text-card-foreground" style="border-radius:14px;border-color:#e2e8f0;border-style:solid;border-width:1px;border-color:lab(91.7353% -.998765 -4.76968);background-color:#fff;background-color:lab(100% 0 0);padding:32px;font-size:14px;line-height:20px;color:#020618;color:lab(1.76974% 1.32743 -9.28855);box-shadow:0 0 rgba(0,0,0,0),0 0 rgba(0,0,0,0),0 0 rgba(0,0,0,0),0 0 rgba(0,0,0,0),0 1px 3px rgba(0,0,0,.1),0 1px 2px -1px rgba(0,
|
|
36
|
+
0,0,.1);"><h1 class="nx-dark-text-foreground" style="margin:0 0 16px;font-size:24px;line-height:32px;font-weight:600;color:#020918;color:lab(2.35721% .367686 -8.51797);">Votre code de confirmation</h1><p class="nx-dark-text-foreground" style="margin:0 0 16px;font-size:14px;line-height:20px;color:#020918;color:lab(2.35721% .367686 -8.51797);">Bonjour {{ name }},</p><p class="nx-dark-text-foreground" style="margin:0 0 16px;font-size:14px;line-height:20px;color:#020918;color:lab(2.35721% .367686
|
|
37
|
+
-8.51797);">Quelqu'un, nous l'espérons vous, a demandé une action sensible sur votre compte {{ brand }}. Saisissez ce code pour la confirmer.</p>
|
|
38
|
+
<table role="presentation" cellpadding="0" cellspacing="0" style="margin-bottom:16px;width:100%;"><tr><td class="nx-dark-bg-muted nx-dark-text-muted-foreground" style="border-radius:10px;background-color:#f1f5f9;background-color:lab(96.286% -.852436 -2.46847);padding:16px 24px;text-align:center;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:30px;line-height:36px;font-weight:600;letter-spacing:.3em;color:#020918;color:lab(2.35721% .367686 -8.51797);">{{ code }}
|
|
39
|
+
</td></tr></table><p class="nx-dark-text-foreground" style="margin:0 0 16px;font-size:12px;line-height:16px;color:#020918;color:lab(2.35721% .367686 -8.51797);">Ce code expire dans {{ expiresIn }}.</p><p class="nx-dark-text-foreground" style="margin:0 0 16px;font-size:14px;line-height:20px;color:#020918;color:lab(2.35721% .367686 -8.51797);">Si ce n'était pas vous, ne communiquez pas ce code : quelqu'un essaie peut-être d'agir sur votre compte. Sécurisez votre compte dès maintenant.</p><div><a
|
|
40
|
+
style="display:inline-block;border-radius:9999px;background-color:#27272a;padding:10px 16px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont, 'Segoe UI',Roboto, 'Noto Sans',Ubuntu,Cantarell, 'Helvetica Neue',sans-serif;font-size:14px;line-height:16px;font-weight:500;color:#f8fafc;color:lab(98.1434% -.369519 -1.05966);text-decoration:none;" href="{{ link }}" class="nx-dark-bg-primary nx-dark-text-primary-foreground">
|
|
41
|
+
<!--[if mso]><i style="mso-font-width:114%;mso-text-raise:19px;" hidden> </i>
|
|
42
|
+
<![endif]--> <span style="mso-text-raise:10px;">Sécuriser mon compte</span>
|
|
43
|
+
<!--[if mso]><i style="mso-font-width:114%;" hidden> ​</i>
|
|
44
|
+
<![endif]--></a></div><div role="separator" style="line-height:24px;">‍</div><p class="nx-dark-text-foreground" style="margin:0 0 16px;font-size:12px;line-height:16px;color:#5f718a;">Si le bouton ne fonctionne pas, ouvrez ce lien : <a href="{{ link }}" class="nx-dark-text-info" style="color:#1d4ed8;text-decoration:underline;">{{ link }}</a></p>
|
|
45
|
+
</td></tr><tr><td class="nx-dark-text-muted-foreground" style="padding-left:24px;padding-right:24px;padding-top:24px;text-align:center;font-size:12px;line-height:16px;color:#5f718a;"><p style="margin:0 0 8px;">Vous recevez cet e-mail parce que vous avez un compte chez {{ brand }}.</p><p style="margin:0;">{{ brand }}</p>
|
|
46
|
+
</td></tr></table></div>
|
|
47
|
+
<!--[if mso]>
|
|
48
|
+
</td></tr></table>
|
|
49
|
+
<![endif]-->
|
|
50
|
+
</td></tr></table></div>
|
|
51
|
+
</body>
|
|
52
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Saisissez ce code pour confirmer votre demande.
|
|
2
|
+
|
|
3
|
+
{{ brand }}
|
|
4
|
+
|
|
5
|
+
Votre code de confirmation
|
|
6
|
+
|
|
7
|
+
Bonjour {{ name }},
|
|
8
|
+
|
|
9
|
+
Quelqu'un, nous l'espérons vous, a demandé une action sensible sur votre compte {{ brand }}. Saisissez ce code pour la confirmer.
|
|
10
|
+
|
|
11
|
+
{{ code }}
|
|
12
|
+
|
|
13
|
+
Ce code expire dans {{ expiresIn }}.
|
|
14
|
+
|
|
15
|
+
Si ce n'était pas vous, ne communiquez pas ce code : quelqu'un essaie peut-être d'agir sur votre compte. Sécurisez votre compte dès maintenant.
|
|
16
|
+
|
|
17
|
+
Sécuriser mon compte
|
|
18
|
+
|
|
19
|
+
{{ link }}
|
|
20
|
+
|
|
21
|
+
Si le bouton ne fonctionne pas, ouvrez ce lien : {{ link }}
|
|
22
|
+
|
|
23
|
+
Vous recevez cet e-mail parce que vous avez un compte chez {{ brand }}.
|
|
24
|
+
|
|
25
|
+
{{ brand }}
|
package/mails/mail-manifest.json
CHANGED
|
@@ -6,6 +6,32 @@
|
|
|
6
6
|
],
|
|
7
7
|
"fallbackLocale": "en",
|
|
8
8
|
"emails": {
|
|
9
|
+
"confirm-action": {
|
|
10
|
+
"variables": [
|
|
11
|
+
"brand",
|
|
12
|
+
"code",
|
|
13
|
+
"expiresIn",
|
|
14
|
+
"link",
|
|
15
|
+
"name"
|
|
16
|
+
],
|
|
17
|
+
"urlVariables": [
|
|
18
|
+
"link"
|
|
19
|
+
],
|
|
20
|
+
"subject": {
|
|
21
|
+
"en": "Your confirmation code",
|
|
22
|
+
"fr": "Votre code de confirmation"
|
|
23
|
+
},
|
|
24
|
+
"files": {
|
|
25
|
+
"en": {
|
|
26
|
+
"html": "en/confirm-action.html",
|
|
27
|
+
"text": "en/confirm-action.txt"
|
|
28
|
+
},
|
|
29
|
+
"fr": {
|
|
30
|
+
"html": "fr/confirm-action.html",
|
|
31
|
+
"text": "fr/confirm-action.txt"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
9
35
|
"email-changed": {
|
|
10
36
|
"variables": [
|
|
11
37
|
"brand",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/janus-mail",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The e-mails of @nxgt/janus's flows — e-mail verification, password reset, sign-in code, sign-in link, password changed, e-mail changed, two-factor enabled and disabled, recovery code used, welcome — rendered in English and French from a prebuilt Maizzle build, with your brand, sent through any @nxgt/mail transport",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "The e-mails of @nxgt/janus's flows — e-mail verification, password reset, sign-in code, sign-in link, step-up code, password changed, e-mail changed, two-factor enabled and disabled, recovery code used, welcome — rendered in English and French from a prebuilt Maizzle build, with your brand, sent through any @nxgt/mail transport",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"@maizzle/framework": "6.1.7",
|
|
55
55
|
"@maizzle/tailwindcss": "1.5.6",
|
|
56
56
|
"@formatjs/icu-messageformat-parser": "3.5.20",
|
|
57
|
-
"@nxgt/janus": "^0.
|
|
57
|
+
"@nxgt/janus": "^0.16.1",
|
|
58
58
|
"@nxgt/mail": "1.0.1",
|
|
59
59
|
"@nxgt/mail-config": "1.0.1",
|
|
60
60
|
"@nxgt/mail-i18n": "1.0.1",
|
|
61
|
-
"@nxgt/mail-presets": "1.0
|
|
61
|
+
"@nxgt/mail-presets": "1.1.0",
|
|
62
62
|
"@nxgt/mail-ui": "1.0.1",
|
|
63
63
|
"@types/bun": "^1.4.2",
|
|
64
64
|
"vue": "3.5.43",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"zod": "^4.6.5"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@nxgt/janus": "^0.
|
|
69
|
+
"@nxgt/janus": "^0.16.1",
|
|
70
70
|
"@nxgt/mail": ">=0.1.0 <2",
|
|
71
71
|
"typescript": "^6.0.3"
|
|
72
72
|
}
|