@hintoric/email 0.3.0 → 0.4.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/dist/index.js CHANGED
@@ -373,7 +373,7 @@ function D({ lang: e, preview: n, footer: o, unsubscribe: s, colorScheme: l, chi
373
373
  name: "supported-color-schemes",
374
374
  content: "light dark"
375
375
  }),
376
- /* @__PURE__ */ u(O, {})
376
+ /* @__PURE__ */ u(oe, {})
377
377
  ] }),
378
378
  /* @__PURE__ */ u(c, { children: n }),
379
379
  /* @__PURE__ */ d(t, {
@@ -425,12 +425,12 @@ function D({ lang: e, preview: n, footer: o, unsubscribe: s, colorScheme: l, chi
425
425
  ]
426
426
  });
427
427
  }
428
- function O() {
428
+ function oe() {
429
429
  return /* @__PURE__ */ u("style", { dangerouslySetInnerHTML: { __html: ne } });
430
430
  }
431
431
  //#endregion
432
432
  //#region src/components/Button.tsx
433
- var oe = {
433
+ var se = {
434
434
  sm: {
435
435
  minHeight: 32,
436
436
  paddingInline: 12,
@@ -450,10 +450,10 @@ var oe = {
450
450
  lineHeight: 24
451
451
  }
452
452
  };
453
- function k({ href: e, variant: t = "solid", color: r = "primary", size: i = "md", pill: a = !1, fullWidth: o = !1, style: s, children: c }) {
453
+ function O({ href: e, variant: t = "solid", color: r = "primary", size: i = "md", pill: a = !1, fullWidth: o = !1, style: s, children: c }) {
454
454
  let l = x(e);
455
455
  if (!l || l.startsWith("mailto:")) return null;
456
- let d = oe[i], f = g("light", t, r), p = +(t === "outlined"), m = (d.minHeight - d.lineHeight) / 2 - p;
456
+ let d = se[i], f = g("light", t, r), p = +(t === "outlined"), m = (d.minHeight - d.lineHeight) / 2 - p;
457
457
  return /* @__PURE__ */ u(n, {
458
458
  href: l,
459
459
  className: C.variant(t, r),
@@ -488,7 +488,7 @@ function k({ href: e, variant: t = "solid", color: r = "primary", size: i = "md"
488
488
  }
489
489
  //#endregion
490
490
  //#region src/components/Divider.tsx
491
- function A({ style: e }) {
491
+ function k({ style: e }) {
492
492
  let t = v.light;
493
493
  return /* @__PURE__ */ u("div", {
494
494
  role: "separator",
@@ -508,7 +508,7 @@ function A({ style: e }) {
508
508
  }
509
509
  //#endregion
510
510
  //#region src/components/Card.tsx
511
- function j({ variant: e = "outlined", color: t = "neutral", style: n, children: r }) {
511
+ function A({ variant: e = "outlined", color: t = "neutral", style: n, children: r }) {
512
512
  let i = g("light", e, t), a = i.backgroundColor !== void 0;
513
513
  return /* @__PURE__ */ u("table", {
514
514
  role: "presentation",
@@ -534,7 +534,7 @@ function j({ variant: e = "outlined", color: t = "neutral", style: n, children:
534
534
  }
535
535
  //#endregion
536
536
  //#region src/components/Avatar.tsx
537
- var se = {
537
+ var ce = {
538
538
  sm: {
539
539
  box: 32,
540
540
  fontSize: "14px",
@@ -551,8 +551,8 @@ var se = {
551
551
  fontWeight: 600
552
552
  }
553
553
  };
554
- function M({ variant: e = "soft", color: t = "neutral", size: n = "md", src: r, alt: i = "", children: a }) {
555
- let s = se[n], c = S(r);
554
+ function j({ variant: e = "soft", color: t = "neutral", size: n = "md", src: r, alt: i = "", children: a }) {
555
+ let s = ce[n], c = S(r);
556
556
  if (c) return /* @__PURE__ */ u(o, {
557
557
  src: c,
558
558
  width: s.box,
@@ -600,28 +600,28 @@ function M({ variant: e = "soft", color: t = "neutral", size: n = "md", src: r,
600
600
  }
601
601
  //#endregion
602
602
  //#region src/alertIcons.ts
603
- var N = {
603
+ var M = {
604
604
  primary: "info",
605
605
  neutral: "info",
606
606
  danger: "report",
607
607
  success: "check-circle",
608
608
  warning: "warning"
609
- }, P = "https://cdn.hintoric.com/assets/email/alert";
610
- function F(e, t) {
611
- return `${P}/${e}-${t.replace("#", "").toLowerCase()}.png`;
609
+ }, N = "https://cdn.hintoric.com/assets/email/alert";
610
+ function P(e, t) {
611
+ return `${N}/${e}-${t.replace("#", "").toLowerCase()}.png`;
612
612
  }
613
- function I(e, t, n) {
614
- let r = N[n], i = g(e, t, n).color;
613
+ function F(e, t, n) {
614
+ let r = M[n], i = g(e, t, n).color;
615
615
  return {
616
616
  name: r,
617
617
  ink: i,
618
- url: F(r, i)
618
+ url: P(r, i)
619
619
  };
620
620
  }
621
- function ce() {
621
+ function le() {
622
622
  let e = /* @__PURE__ */ new Map();
623
623
  for (let t of ["light", "dark"]) for (let n of h) for (let r of m) {
624
- let { name: i, ink: a, url: o } = I(t, n, r);
624
+ let { name: i, ink: a, url: o } = F(t, n, r);
625
625
  e.set(o, {
626
626
  name: i,
627
627
  ink: a,
@@ -633,7 +633,7 @@ function ce() {
633
633
  }
634
634
  //#endregion
635
635
  //#region src/components/Alert.tsx
636
- var le = {
636
+ var ue = {
637
637
  sm: {
638
638
  gap: 8,
639
639
  padding: 8,
@@ -653,8 +653,8 @@ var le = {
653
653
  icon: 24
654
654
  }
655
655
  };
656
- function L({ variant: e = "soft", color: t = "neutral", size: n = "md", startDecorator: r, endDecorator: i, style: a, children: o }) {
657
- let s = le[n], c = r === void 0 ? /* @__PURE__ */ u(ue, {
656
+ function I({ variant: e = "soft", color: t = "neutral", size: n = "md", startDecorator: r, endDecorator: i, style: a, children: o }) {
657
+ let s = ue[n], c = r === void 0 ? /* @__PURE__ */ u(de, {
658
658
  variant: e,
659
659
  color: t,
660
660
  size: s.icon
@@ -730,8 +730,8 @@ function L({ variant: e = "soft", color: t = "neutral", size: n = "md", startDec
730
730
  }) }) })
731
731
  });
732
732
  }
733
- function ue({ variant: e, color: t, size: n }) {
734
- let r = I("light", e, t), i = I("dark", e, t), a = (e, t, r) => /* @__PURE__ */ u(o, {
733
+ function de({ variant: e, color: t, size: n }) {
734
+ let r = F("light", e, t), i = F("dark", e, t), a = (e, t, r) => /* @__PURE__ */ u(o, {
735
735
  src: e,
736
736
  width: n,
737
737
  height: n,
@@ -748,7 +748,7 @@ function ue({ variant: e, color: t, size: n }) {
748
748
  });
749
749
  return /* @__PURE__ */ d(l, { children: [a(r.url, C.lightOnly, "block"), a(i.url, C.darkOnly, "none")] });
750
750
  }
751
- function de({ style: e, children: t }) {
751
+ function fe({ style: e, children: t }) {
752
752
  return /* @__PURE__ */ u("div", {
753
753
  style: {
754
754
  fontFamily: y.body,
@@ -762,7 +762,7 @@ function de({ style: e, children: t }) {
762
762
  }
763
763
  //#endregion
764
764
  //#region src/components/Chip.tsx
765
- var fe = {
765
+ var pe = {
766
766
  sm: {
767
767
  minHeight: 20,
768
768
  paddingInline: 6,
@@ -779,8 +779,8 @@ var fe = {
779
779
  fontSize: 16
780
780
  }
781
781
  };
782
- function pe({ variant: e = "soft", color: t = "neutral", size: n = "md", style: r, children: i }) {
783
- let a = fe[n], o = g("light", e, t), s = o.backgroundColor !== void 0, c = +!!o.borderColor, l = a.fontSize * 1.5, d = (a.minHeight - l) / 2 - c;
782
+ function me({ variant: e = "soft", color: t = "neutral", size: n = "md", style: r, children: i }) {
783
+ let a = pe[n], o = g("light", e, t), s = o.backgroundColor !== void 0, c = +!!o.borderColor, l = a.fontSize * 1.5, d = (a.minHeight - l) / 2 - c;
784
784
  return /* @__PURE__ */ u("span", {
785
785
  className: [C.variant(e, t), s ? "" : C.surface].filter(Boolean).join(" "),
786
786
  style: {
@@ -804,46 +804,50 @@ function pe({ variant: e = "soft", color: t = "neutral", size: n = "md", style:
804
804
  }
805
805
  //#endregion
806
806
  //#region src/components/HintoricLogo.tsx
807
- var R = {
807
+ var L = {
808
808
  light: "https://cdn.hintoric.com/assets/logo/black.png",
809
809
  dark: "https://cdn.hintoric.com/assets/logo/white.png",
810
- width: 104,
811
- height: 32
810
+ width: 118,
811
+ height: 26
812
812
  };
813
- function z() {
813
+ function R() {
814
814
  return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(o, {
815
- src: R.light,
816
- width: R.width,
817
- height: R.height,
815
+ src: L.light,
816
+ width: L.width,
817
+ height: L.height,
818
818
  alt: "hintoric",
819
819
  className: C.logoLight,
820
820
  style: {
821
821
  display: "inline-block",
822
+ width: `${L.width}px`,
823
+ height: `${L.height}px`,
822
824
  margin: "0 auto"
823
825
  }
824
826
  }), /* @__PURE__ */ u(o, {
825
- src: R.dark,
826
- width: R.width,
827
- height: R.height,
827
+ src: L.dark,
828
+ width: L.width,
829
+ height: L.height,
828
830
  alt: "hintoric",
829
831
  className: C.logoDark,
830
832
  style: {
831
833
  display: "none",
834
+ width: `${L.width}px`,
835
+ height: `${L.height}px`,
832
836
  margin: "0 auto"
833
837
  }
834
838
  })] });
835
839
  }
836
840
  //#endregion
837
841
  //#region src/templates/AuthCode/AuthCodeEmail.tsx
838
- function B({ purpose: e, code: t, email: n }) {
842
+ function z({ purpose: e, code: t, email: n }) {
839
843
  return {
840
844
  purpose: e,
841
845
  code: t,
842
846
  email: n
843
847
  };
844
848
  }
845
- function V(e) {
846
- let { messages: t } = e, n = B(e);
849
+ function B(e) {
850
+ let { messages: t } = e, n = z(e);
847
851
  return /* @__PURE__ */ u(D, {
848
852
  lang: t.lang,
849
853
  preview: t.preview(n),
@@ -856,16 +860,16 @@ function V(e) {
856
860
  style: { fontWeight: 400 },
857
861
  children: [t.footer(n), e.legalNotice && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("br", {}), e.legalNotice] })]
858
862
  }),
859
- children: /* @__PURE__ */ u(H, { ...e })
863
+ children: /* @__PURE__ */ u(V, { ...e })
860
864
  });
861
865
  }
862
- function H(e) {
863
- let { messages: t, code: n, url: r, expiresInMinutes: i } = e, a = B(e);
866
+ function V(e) {
867
+ let { messages: t, code: n, url: r, expiresInMinutes: i } = e, a = z(e);
864
868
  return /* @__PURE__ */ d(l, { children: [
865
869
  /* @__PURE__ */ d("div", {
866
870
  style: { textAlign: "center" },
867
871
  children: [
868
- /* @__PURE__ */ u(z, {}),
872
+ /* @__PURE__ */ u(R, {}),
869
873
  /* @__PURE__ */ u(E, {
870
874
  level: "h3",
871
875
  component: "h1",
@@ -882,7 +886,7 @@ function H(e) {
882
886
  })
883
887
  ]
884
888
  }),
885
- /* @__PURE__ */ u(j, { children: /* @__PURE__ */ u(E, {
889
+ /* @__PURE__ */ u(A, { children: /* @__PURE__ */ u(E, {
886
890
  level: "h2",
887
891
  component: "p",
888
892
  textAlign: "center",
@@ -911,14 +915,14 @@ function H(e) {
911
915
  }),
912
916
  r && /* @__PURE__ */ u("div", {
913
917
  style: { marginTop: "24px" },
914
- children: /* @__PURE__ */ u(k, {
918
+ children: /* @__PURE__ */ u(O, {
915
919
  href: r,
916
920
  size: "lg",
917
921
  fullWidth: !0,
918
922
  children: t.button(a)
919
923
  })
920
924
  }),
921
- /* @__PURE__ */ u(A, { style: { margin: "32px 0 24px" } }),
925
+ /* @__PURE__ */ u(k, { style: { margin: "32px 0 24px" } }),
922
926
  /* @__PURE__ */ u(E, {
923
927
  level: "body-xs",
924
928
  component: "p",
@@ -931,31 +935,31 @@ function H(e) {
931
935
  })
932
936
  ] });
933
937
  }
934
- async function me(e) {
935
- let { html: t, text: n } = await f(/* @__PURE__ */ u(V, { ...e }));
938
+ async function he(e) {
939
+ let { html: t, text: n } = await f(/* @__PURE__ */ u(B, { ...e }));
936
940
  return {
937
- subject: e.messages.subject(B(e)),
941
+ subject: e.messages.subject(z(e)),
938
942
  html: t,
939
943
  text: n
940
944
  };
941
945
  }
942
946
  //#endregion
943
947
  //#region src/templates/AuthCode/messages.ts
944
- var he = {
948
+ var ge = {
945
949
  verification: "Bestätigungscode",
946
950
  registration: "Registrierungscode",
947
951
  login: "Anmeldecode",
948
952
  recovery: "Wiederherstellungscode"
949
- }, ge = {
953
+ }, H = {
950
954
  verification: "Adresse bestätigen",
951
955
  registration: "Konto anlegen",
952
956
  login: "Anmelden",
953
957
  recovery: "Konto wiederherstellen"
954
958
  }, U = (e) => e === "login" || e === "recovery", _e = {
955
959
  lang: "de",
956
- subject: ({ purpose: e }) => `Dein ${he[e]} für hintoric`,
960
+ subject: ({ purpose: e }) => `Dein ${ge[e]} für hintoric`,
957
961
  preview: ({ code: e }) => `Dein Code: ${e}`,
958
- heading: ({ purpose: e }) => ge[e],
962
+ heading: ({ purpose: e }) => H[e],
959
963
  intro: ({ purpose: e, email: t }) => {
960
964
  switch (e) {
961
965
  case "verification": return `Gib diesen Code ein, um ${t ?? "deine E-Mail-Adresse"} zu bestätigen.`;
@@ -964,7 +968,7 @@ var he = {
964
968
  case "recovery": return `Gib diesen Code ein, um wieder auf dein Konto bei hintoric${t ? ` (${t})` : ""} zuzugreifen.`;
965
969
  }
966
970
  },
967
- button: ({ purpose: e }) => ge[e],
971
+ button: ({ purpose: e }) => H[e],
968
972
  expiry: (e) => `Der Code ist ${e} Minuten gültig.`,
969
973
  ignore: ({ purpose: e }) => U(e) ? "Wenn du das nicht angefordert hast, kannst du diese E-Mail ignorieren. Gib den Code an niemanden weiter – hintoric fragt dich nie danach." : "Wenn du das nicht angefordert hast, kannst du diese E-Mail ignorieren.",
970
974
  footer: () => "Du erhältst diese E-Mail, weil mit deiner Adresse ein Code bei hintoric angefordert wurde."
@@ -997,11 +1001,12 @@ var he = {
997
1001
  footer: () => "We sent you this email because someone requested a code for your address at hintoric."
998
1002
  };
999
1003
  //#endregion
1000
- //#region src/templates/AuthNoAccount/AuthNoAccountEmail.tsx
1001
- function G({ purpose: e, email: t }) {
1004
+ //#region src/templates/AuthLink/AuthLinkEmail.tsx
1005
+ function G({ purpose: e, url: t, email: n }) {
1002
1006
  return {
1003
1007
  purpose: e,
1004
- email: t
1008
+ url: t,
1009
+ email: n
1005
1010
  };
1006
1011
  }
1007
1012
  function K(e) {
@@ -1022,12 +1027,134 @@ function K(e) {
1022
1027
  });
1023
1028
  }
1024
1029
  function q(e) {
1025
- let { messages: t, registrationUrl: n } = e, r = G(e);
1030
+ let { messages: t, url: n, expiresInMinutes: r } = e, i = G(e);
1026
1031
  return /* @__PURE__ */ d(l, { children: [
1027
1032
  /* @__PURE__ */ d("div", {
1028
1033
  style: { textAlign: "center" },
1029
1034
  children: [
1030
- /* @__PURE__ */ u(z, {}),
1035
+ /* @__PURE__ */ u(R, {}),
1036
+ /* @__PURE__ */ u(E, {
1037
+ level: "h3",
1038
+ component: "h1",
1039
+ style: {
1040
+ margin: "16px 0 12px",
1041
+ fontFamily: y.heading
1042
+ },
1043
+ children: t.heading(i)
1044
+ }),
1045
+ /* @__PURE__ */ u(E, {
1046
+ level: "body-sm",
1047
+ style: { marginBottom: "24px" },
1048
+ children: t.intro(i)
1049
+ })
1050
+ ]
1051
+ }),
1052
+ /* @__PURE__ */ u(O, {
1053
+ href: n,
1054
+ size: "lg",
1055
+ fullWidth: !0,
1056
+ children: t.button(i)
1057
+ }),
1058
+ r !== void 0 && /* @__PURE__ */ u(E, {
1059
+ level: "body-xs",
1060
+ component: "p",
1061
+ textAlign: "center",
1062
+ textColor: "icon",
1063
+ style: {
1064
+ margin: "12px 0 0",
1065
+ fontWeight: 400
1066
+ },
1067
+ children: t.expiry(r)
1068
+ }),
1069
+ /* @__PURE__ */ u(k, { style: { margin: "32px 0 24px" } }),
1070
+ /* @__PURE__ */ u(E, {
1071
+ level: "body-xs",
1072
+ component: "p",
1073
+ textAlign: "center",
1074
+ style: {
1075
+ margin: 0,
1076
+ fontWeight: 400
1077
+ },
1078
+ children: t.ignore(i)
1079
+ })
1080
+ ] });
1081
+ }
1082
+ async function be(e) {
1083
+ let { html: t, text: n } = await f(/* @__PURE__ */ u(K, { ...e }));
1084
+ return {
1085
+ subject: e.messages.subject(G(e)),
1086
+ html: t,
1087
+ text: n
1088
+ };
1089
+ }
1090
+ //#endregion
1091
+ //#region src/templates/AuthLink/messages.ts
1092
+ var xe = {
1093
+ verification: "Bestätigungslink",
1094
+ recovery: "Wiederherstellungslink"
1095
+ }, J = {
1096
+ verification: "Adresse bestätigen",
1097
+ recovery: "Konto wiederherstellen"
1098
+ }, Se = {
1099
+ lang: "de",
1100
+ subject: ({ purpose: e }) => `Dein ${xe[e]} für hintoric`,
1101
+ preview: ({ purpose: e }) => e === "verification" ? "Bestätige deine E-Mail-Adresse mit einem Klick." : "Greife mit einem Klick wieder auf dein Konto zu.",
1102
+ heading: ({ purpose: e }) => J[e],
1103
+ intro: ({ purpose: e, email: t }) => e === "verification" ? `Klicke auf den Button, um ${t ?? "deine E-Mail-Adresse"} zu bestätigen.` : `Klicke auf den Button, um wieder auf dein Konto bei hintoric${t ? ` (${t})` : ""} zuzugreifen.`,
1104
+ button: ({ purpose: e }) => J[e],
1105
+ expiry: (e) => `Der Link ist ${e} Minuten gültig.`,
1106
+ ignore: ({ purpose: e }) => e === "recovery" ? "Wenn du das nicht angefordert hast, kannst du diese E-Mail ignorieren. Gib den Link an niemanden weiter – hintoric fragt dich nie danach." : "Wenn du das nicht angefordert hast, kannst du diese E-Mail ignorieren.",
1107
+ footer: () => "Du erhältst diese E-Mail, weil mit deiner Adresse ein Link bei hintoric angefordert wurde."
1108
+ }, Ce = {
1109
+ verification: "verification link",
1110
+ recovery: "recovery link"
1111
+ }, Y = {
1112
+ verification: "Confirm your address",
1113
+ recovery: "Recover your account"
1114
+ }, we = {
1115
+ lang: "en",
1116
+ subject: ({ purpose: e }) => `Your hintoric ${Ce[e]}`,
1117
+ preview: ({ purpose: e }) => e === "verification" ? "Confirm your email address with one click." : "Get back into your account with one click.",
1118
+ heading: ({ purpose: e }) => Y[e],
1119
+ intro: ({ purpose: e, email: t }) => e === "verification" ? `Click the button to confirm ${t ?? "your email address"} for your hintoric account.` : `Click the button to get back into your hintoric account${t ? ` (${t})` : ""}.`,
1120
+ button: ({ purpose: e }) => Y[e],
1121
+ expiry: (e) => `The link is valid for ${e} minutes.`,
1122
+ ignore: ({ purpose: e }) => e === "recovery" ? "If you didn't request this, you can ignore this email. Don't share the link with anyone – hintoric will never ask you for it." : "If you didn't request this, you can ignore this email.",
1123
+ footer: () => "We sent you this email because someone requested a link for your address at hintoric."
1124
+ };
1125
+ //#endregion
1126
+ //#region src/templates/AuthNoAccount/AuthNoAccountEmail.tsx
1127
+ function X({ purpose: e, channel: t = "code", email: n }) {
1128
+ return {
1129
+ purpose: e,
1130
+ channel: t,
1131
+ email: n
1132
+ };
1133
+ }
1134
+ function Te(e) {
1135
+ let { messages: t } = e, n = X(e);
1136
+ return /* @__PURE__ */ u(D, {
1137
+ lang: t.lang,
1138
+ preview: t.preview(n),
1139
+ colorScheme: e.colorScheme,
1140
+ footer: /* @__PURE__ */ d(E, {
1141
+ level: "body-xs",
1142
+ component: "p",
1143
+ textAlign: "center",
1144
+ textColor: "icon",
1145
+ style: { fontWeight: 400 },
1146
+ children: [t.footer(n), e.legalNotice && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("br", {}), e.legalNotice] })]
1147
+ }),
1148
+ children: /* @__PURE__ */ u(Ee, { ...e })
1149
+ });
1150
+ }
1151
+ function Ee(e) {
1152
+ let { messages: t, registrationUrl: n } = e, r = X(e);
1153
+ return /* @__PURE__ */ d(l, { children: [
1154
+ /* @__PURE__ */ d("div", {
1155
+ style: { textAlign: "center" },
1156
+ children: [
1157
+ /* @__PURE__ */ u(R, {}),
1031
1158
  /* @__PURE__ */ u(E, {
1032
1159
  level: "h3",
1033
1160
  component: "h1",
@@ -1044,7 +1171,7 @@ function q(e) {
1044
1171
  })
1045
1172
  ]
1046
1173
  }),
1047
- /* @__PURE__ */ u(L, {
1174
+ /* @__PURE__ */ u(I, {
1048
1175
  color: "warning",
1049
1176
  children: t.alert(r)
1050
1177
  }),
@@ -1054,7 +1181,7 @@ function q(e) {
1054
1181
  level: "body-sm",
1055
1182
  style: { margin: n ? "24px 0" : "24px 0 0" },
1056
1183
  children: t.hint(r)
1057
- }), n && /* @__PURE__ */ u(k, {
1184
+ }), n && /* @__PURE__ */ u(O, {
1058
1185
  href: n,
1059
1186
  variant: "outlined",
1060
1187
  color: "neutral",
@@ -1065,55 +1192,64 @@ function q(e) {
1065
1192
  })
1066
1193
  ] });
1067
1194
  }
1068
- async function be(e) {
1069
- let { html: t, text: n } = await f(/* @__PURE__ */ u(K, { ...e }));
1195
+ async function De(e) {
1196
+ let { html: t, text: n } = await f(/* @__PURE__ */ u(Te, { ...e }));
1070
1197
  return {
1071
- subject: e.messages.subject(G(e)),
1198
+ subject: e.messages.subject(X(e)),
1072
1199
  html: t,
1073
1200
  text: n
1074
1201
  };
1075
1202
  }
1076
1203
  //#endregion
1077
1204
  //#region src/templates/AuthNoAccount/messages.ts
1078
- var xe = {
1205
+ var Oe = {
1206
+ recovery: {
1207
+ code: "Wiederherstellungscode",
1208
+ link: "Wiederherstellungslink"
1209
+ },
1210
+ verification: {
1211
+ code: "Bestätigungscode",
1212
+ link: "Bestätigungslink"
1213
+ }
1214
+ }, ke = {
1079
1215
  lang: "de",
1080
1216
  subject: () => "Zu dieser Adresse gibt es kein Konto bei hintoric",
1081
1217
  preview: () => "Vielleicht hast du dich mit einer anderen Adresse registriert.",
1082
1218
  heading: () => "Kein Konto gefunden",
1083
- body: ({ purpose: e, email: t }) => `Für ${t} wurde ein ${e === "recovery" ? "Wiederherstellungscode" : "Bestätigungscode"} angefordert.`,
1219
+ body: ({ purpose: e, channel: t, email: n }) => `Für ${n} wurde ein ${Oe[e][t]} angefordert.`,
1084
1220
  alert: () => "Zu dieser Adresse gibt es kein Konto bei hintoric.",
1085
- hint: () => "Vielleicht hast du dich mit einer anderen Adresse registriert. Wenn du den Code nicht angefordert hast, kannst du diese E-Mail ignorieren.",
1221
+ hint: ({ channel: e }) => `Vielleicht hast du dich mit einer anderen Adresse registriert. Wenn du den ${e === "link" ? "Link" : "Code"} nicht angefordert hast, kannst du diese E-Mail ignorieren.`,
1086
1222
  registerButton: "Konto anlegen",
1087
1223
  footer: () => "Du erhältst diese E-Mail, weil deine Adresse bei hintoric angegeben wurde."
1088
- }, Se = {
1224
+ }, Ae = {
1089
1225
  lang: "en",
1090
1226
  subject: () => "No hintoric account with this address",
1091
1227
  preview: () => "Maybe you signed up with a different address.",
1092
1228
  heading: () => "No account found",
1093
- body: ({ purpose: e, email: t }) => `A ${e === "recovery" ? "recovery" : "verification"} code was requested for ${t}.`,
1229
+ body: ({ purpose: e, channel: t, email: n }) => `A ${e === "recovery" ? "recovery" : "verification"} ${t === "link" ? "link" : "code"} was requested for ${n}.`,
1094
1230
  alert: () => "There is no hintoric account with this address.",
1095
- hint: () => "Maybe you signed up with a different address. If you didn't request the code, you can ignore this email.",
1231
+ hint: ({ channel: e }) => `Maybe you signed up with a different address. If you didn't request the ${e === "link" ? "link" : "code"}, you can ignore this email.`,
1096
1232
  registerButton: "Create an account",
1097
1233
  footer: () => "We sent you this email because someone entered your address at hintoric."
1098
1234
  };
1099
1235
  //#endregion
1100
1236
  //#region src/templates/SecurityActivityAlert/SecurityActivityAlertEmail.tsx
1101
- function J(e) {
1237
+ function Z(e) {
1102
1238
  return {
1103
1239
  activity: e.activity,
1104
1240
  target: e.target,
1105
- targetName: Ce(e),
1241
+ targetName: je(e),
1106
1242
  occurredAt: e.messages.formatDateTime(e.activity.occurredAt, e.timeZone)
1107
1243
  };
1108
1244
  }
1109
- function Ce({ target: e }) {
1245
+ function je({ target: e }) {
1110
1246
  return e.type === "workspace" ? e.workspaceName : e.email;
1111
1247
  }
1112
- function we(e) {
1248
+ function Me(e) {
1113
1249
  return e.split(/\s+/).map((e) => e.match(/\p{L}/u)?.[0]).filter((e) => e !== void 0).slice(0, 2).map((e) => e.toUpperCase()).join("");
1114
1250
  }
1115
- function Y(e) {
1116
- let { messages: t } = e, n = J(e);
1251
+ function Ne(e) {
1252
+ let { messages: t } = e, n = Z(e);
1117
1253
  return /* @__PURE__ */ u(D, {
1118
1254
  lang: t.lang,
1119
1255
  preview: t.preview(n),
@@ -1126,16 +1262,16 @@ function Y(e) {
1126
1262
  style: { fontWeight: 400 },
1127
1263
  children: [t.footer(n), e.legalNotice && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("br", {}), e.legalNotice] })]
1128
1264
  }),
1129
- children: /* @__PURE__ */ u(X, { ...e })
1265
+ children: /* @__PURE__ */ u(Pe, { ...e })
1130
1266
  });
1131
1267
  }
1132
- function X(e) {
1133
- let { messages: t, activityLogUrl: n } = e, r = J(e);
1268
+ function Pe(e) {
1269
+ let { messages: t, activityLogUrl: n } = e, r = Z(e);
1134
1270
  return /* @__PURE__ */ d(l, { children: [
1135
1271
  /* @__PURE__ */ d("div", {
1136
1272
  style: { textAlign: "center" },
1137
1273
  children: [
1138
- /* @__PURE__ */ u(z, {}),
1274
+ /* @__PURE__ */ u(R, {}),
1139
1275
  /* @__PURE__ */ u(E, {
1140
1276
  level: "h3",
1141
1277
  component: "h1",
@@ -1145,10 +1281,10 @@ function X(e) {
1145
1281
  },
1146
1282
  children: e.activity.title
1147
1283
  }),
1148
- /* @__PURE__ */ u(M, {
1284
+ /* @__PURE__ */ u(j, {
1149
1285
  size: "sm",
1150
1286
  color: "primary",
1151
- children: we(r.targetName)
1287
+ children: Me(r.targetName)
1152
1288
  }),
1153
1289
  /* @__PURE__ */ u(E, {
1154
1290
  level: "title-sm",
@@ -1161,7 +1297,7 @@ function X(e) {
1161
1297
  })
1162
1298
  ]
1163
1299
  }),
1164
- /* @__PURE__ */ u(A, { style: { margin: "32px 0" } }),
1300
+ /* @__PURE__ */ u(k, { style: { margin: "32px 0" } }),
1165
1301
  /* @__PURE__ */ d(E, {
1166
1302
  level: "body-sm",
1167
1303
  style: { marginBottom: "24px" },
@@ -1171,11 +1307,11 @@ function X(e) {
1171
1307
  t.guidance(r)
1172
1308
  ]
1173
1309
  }),
1174
- /* @__PURE__ */ u(k, {
1310
+ /* @__PURE__ */ u(O, {
1175
1311
  href: e.reviewUrl,
1176
1312
  size: "lg",
1177
1313
  fullWidth: !0,
1178
- children: t.reviewButton
1314
+ children: typeof t.reviewButton == "function" ? t.reviewButton(r) : t.reviewButton
1179
1315
  }),
1180
1316
  n && /* @__PURE__ */ u(E, {
1181
1317
  level: "body-xs",
@@ -1193,55 +1329,55 @@ function X(e) {
1193
1329
  })
1194
1330
  ] });
1195
1331
  }
1196
- async function Te(e) {
1197
- let { html: t, text: n } = await f(/* @__PURE__ */ u(Y, { ...e }));
1332
+ async function Fe(e) {
1333
+ let { html: t, text: n } = await f(/* @__PURE__ */ u(Ne, { ...e }));
1198
1334
  return {
1199
- subject: e.messages.subject(J(e)),
1335
+ subject: e.messages.subject(Z(e)),
1200
1336
  html: t,
1201
1337
  text: n
1202
1338
  };
1203
1339
  }
1204
1340
  //#endregion
1205
1341
  //#region src/templates/SecurityActivityAlert/messages.tsx
1206
- function Z(e, t = "") {
1342
+ function Q(e, t = "") {
1207
1343
  return (n, r) => new Intl.DateTimeFormat(e, {
1208
1344
  dateStyle: "long",
1209
1345
  timeStyle: "short",
1210
1346
  timeZone: r
1211
1347
  }).format(n) + t;
1212
1348
  }
1213
- var Ee = {
1349
+ var Ie = {
1214
1350
  lang: "de",
1215
1351
  subject: ({ activity: e, targetName: t }) => `${e.title} – ${t}`,
1216
- preview: ({ activity: e, occurredAt: t }) => `${e.actorName} · ${t}`,
1217
- summary: ({ activity: e, occurredAt: t }) => `${e.actorName} hat am ${t} etwas geändert, das die Sicherheit betrifft.`,
1218
- guidance: () => "Wenn du diese Änderung nicht erwartet hast, prüfe die Aktivität jetzt.",
1219
- reviewButton: "Aktivität prüfen",
1352
+ preview: ({ activity: e, occurredAt: t }) => e.actorName ? `${e.actorName} · ${t}` : t,
1353
+ summary: ({ activity: e, target: t, occurredAt: n }) => e.actorName ? `${e.actorName} hat am ${n} etwas geändert, das die Sicherheit betrifft.` : `Am ${n} wurde etwas ${t.type === "account" ? "an deinem Konto " : ""}geändert, das die Sicherheit betrifft.`,
1354
+ guidance: ({ target: e }) => e.type === "account" ? "Wenn du das nicht warst, sichere dein Konto jetzt." : "Wenn du diese Änderung nicht erwartet hast, prüfe die Aktivität jetzt.",
1355
+ reviewButton: ({ target: e }) => e.type === "account" ? "Konto prüfen" : "Aktivität prüfen",
1220
1356
  activityLogHint: (e) => /* @__PURE__ */ d(l, { children: [
1221
1357
  "Alle sicherheitsrelevanten Aktivitäten findest du im ",
1222
1358
  e("Aktivitätsprotokoll"),
1223
1359
  "."
1224
1360
  ] }),
1225
1361
  footer: ({ target: e }) => e.type === "workspace" ? "Du erhältst diese E-Mail, weil du diesen Workspace verwaltest." : "Du erhältst diese E-Mail, weil sie dein Konto bei hintoric betrifft.",
1226
- formatDateTime: Z("de-DE", " Uhr")
1227
- }, De = {
1362
+ formatDateTime: Q("de-DE", " Uhr")
1363
+ }, Le = {
1228
1364
  lang: "en",
1229
1365
  subject: ({ activity: e, targetName: t }) => `${e.title} – ${t}`,
1230
- preview: ({ activity: e, occurredAt: t }) => `${e.actorName} · ${t}`,
1231
- summary: ({ activity: e, occurredAt: t }) => `${e.actorName} made a security-relevant change on ${t}.`,
1232
- guidance: () => "If you didn't expect this change, review the activity now.",
1233
- reviewButton: "Review activity",
1366
+ preview: ({ activity: e, occurredAt: t }) => e.actorName ? `${e.actorName} · ${t}` : t,
1367
+ summary: ({ activity: e, target: t, occurredAt: n }) => e.actorName ? `${e.actorName} made a security-relevant change on ${n}.` : `Something security-relevant changed ${t.type === "account" ? "on your account " : ""}on ${n}.`,
1368
+ guidance: ({ target: e }) => e.type === "account" ? "If this wasn't you, secure your account now." : "If you didn't expect this change, review the activity now.",
1369
+ reviewButton: ({ target: e }) => e.type === "account" ? "Review account" : "Review activity",
1234
1370
  activityLogHint: (e) => /* @__PURE__ */ d(l, { children: [
1235
1371
  "You can see all security-relevant activity in the ",
1236
1372
  e("activity log"),
1237
1373
  "."
1238
1374
  ] }),
1239
1375
  footer: ({ target: e }) => e.type === "workspace" ? "We sent you this email to let you know, as an admin, about important changes in your workspace." : "We sent you this email to let you know about important changes to your hintoric account.",
1240
- formatDateTime: Z("en-GB")
1376
+ formatDateTime: Q("en-GB")
1241
1377
  };
1242
1378
  //#endregion
1243
1379
  //#region src/templates/WaitlistWelcome/WaitlistWelcomeEmail.tsx
1244
- function Q(e) {
1380
+ function Re(e) {
1245
1381
  let { messages: t } = e;
1246
1382
  return /* @__PURE__ */ u(D, {
1247
1383
  lang: t.lang,
@@ -1266,7 +1402,7 @@ function $({ messages: e, websiteUrl: t }) {
1266
1402
  return /* @__PURE__ */ d("div", {
1267
1403
  style: { textAlign: "center" },
1268
1404
  children: [
1269
- /* @__PURE__ */ u(z, {}),
1405
+ /* @__PURE__ */ u(R, {}),
1270
1406
  /* @__PURE__ */ u(E, {
1271
1407
  level: "body-xs",
1272
1408
  component: "p",
@@ -1297,7 +1433,7 @@ function $({ messages: e, websiteUrl: t }) {
1297
1433
  style: { marginBottom: "24px" },
1298
1434
  children: e.body2
1299
1435
  }),
1300
- /* @__PURE__ */ u(k, {
1436
+ /* @__PURE__ */ u(O, {
1301
1437
  href: t,
1302
1438
  size: "lg",
1303
1439
  fullWidth: !0,
@@ -1317,8 +1453,8 @@ function $({ messages: e, websiteUrl: t }) {
1317
1453
  ]
1318
1454
  });
1319
1455
  }
1320
- async function Oe(e) {
1321
- let { html: t, text: n } = await f(/* @__PURE__ */ u(Q, { ...e }));
1456
+ async function ze(e) {
1457
+ let { html: t, text: n } = await f(/* @__PURE__ */ u(Re, { ...e }));
1322
1458
  return {
1323
1459
  subject: e.messages.subject,
1324
1460
  html: t,
@@ -1327,7 +1463,7 @@ async function Oe(e) {
1327
1463
  }
1328
1464
  //#endregion
1329
1465
  //#region src/templates/WaitlistWelcome/messages.ts
1330
- var ke = {
1466
+ var Be = {
1331
1467
  lang: "de",
1332
1468
  subject: "Du stehst auf der Warteliste von hintoric",
1333
1469
  preview: "Sobald dein Platz frei wird, bekommst du eine E-Mail.",
@@ -1339,7 +1475,7 @@ var ke = {
1339
1475
  signoff: "— Dein hintoric-Team",
1340
1476
  footer: "Du erhältst diese E-Mail, weil du dich auf der Warteliste von hintoric eingetragen hast.",
1341
1477
  unsubscribe: "E-Mails abbestellen"
1342
- }, Ae = {
1478
+ }, Ve = {
1343
1479
  lang: "en",
1344
1480
  subject: "You're on the hintoric waitlist",
1345
1481
  preview: "Welcome aboard — hintoric",
@@ -1353,6 +1489,6 @@ var ke = {
1353
1489
  unsubscribe: "Unsubscribe"
1354
1490
  };
1355
1491
  //#endregion
1356
- export { L as Alert, de as AlertTitle, H as AuthCodeContent, V as AuthCodeEmail, q as AuthNoAccountContent, K as AuthNoAccountEmail, M as Avatar, k as Button, j as Card, pe as Chip, O as ColorSchemeStyles, A as Divider, P as EMAIL_ALERT_ICON_BASE, N as EMAIL_ALERT_ICON_FOR_COLOR, m as EMAIL_COLORS, h as EMAIL_VARIANTS, z as HintoricLogo, D as Layout, T as Link, X as SecurityActivityAlertContent, Y as SecurityActivityAlertEmail, E as Typography, $ as WaitlistWelcomeContent, Q as WaitlistWelcomeEmail, _e as authCodeMessagesDe, ye as authCodeMessagesEn, xe as authNoAccountMessagesDe, Se as authNoAccountMessagesEn, I as emailAlertIcon, ce as emailAlertIconFiles, F as emailAlertIconUrl, y as emailFonts, p as emailPalette, b as emailRadius, v as emailSchemes, _ as mainColor, me as renderAuthCode, be as renderAuthNoAccount, f as renderEmail, Te as renderSecurityActivityAlert, Oe as renderWaitlistWelcome, x as safeHref, S as safeImageSrc, Ee as securityActivityAlertMessagesDe, De as securityActivityAlertMessagesEn, g as variantTokens, ke as waitlistWelcomeMessagesDe, Ae as waitlistWelcomeMessagesEn };
1492
+ export { I as Alert, fe as AlertTitle, V as AuthCodeContent, B as AuthCodeEmail, q as AuthLinkContent, K as AuthLinkEmail, Ee as AuthNoAccountContent, Te as AuthNoAccountEmail, j as Avatar, O as Button, A as Card, me as Chip, oe as ColorSchemeStyles, k as Divider, N as EMAIL_ALERT_ICON_BASE, M as EMAIL_ALERT_ICON_FOR_COLOR, m as EMAIL_COLORS, h as EMAIL_VARIANTS, R as HintoricLogo, D as Layout, T as Link, Pe as SecurityActivityAlertContent, Ne as SecurityActivityAlertEmail, E as Typography, $ as WaitlistWelcomeContent, Re as WaitlistWelcomeEmail, _e as authCodeMessagesDe, ye as authCodeMessagesEn, Se as authLinkMessagesDe, we as authLinkMessagesEn, ke as authNoAccountMessagesDe, Ae as authNoAccountMessagesEn, F as emailAlertIcon, le as emailAlertIconFiles, P as emailAlertIconUrl, y as emailFonts, p as emailPalette, b as emailRadius, v as emailSchemes, _ as mainColor, he as renderAuthCode, be as renderAuthLink, De as renderAuthNoAccount, f as renderEmail, Fe as renderSecurityActivityAlert, ze as renderWaitlistWelcome, x as safeHref, S as safeImageSrc, Ie as securityActivityAlertMessagesDe, Le as securityActivityAlertMessagesEn, g as variantTokens, Be as waitlistWelcomeMessagesDe, Ve as waitlistWelcomeMessagesEn };
1357
1493
 
1358
1494
  //# sourceMappingURL=index.js.map