promote-email-templates 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.react-email/.eslintrc.js +52 -0
  2. package/.react-email/.prettierignore +3 -0
  3. package/.react-email/.prettierrc.js +8 -0
  4. package/.react-email/license.md +7 -0
  5. package/.react-email/next.config.js +36 -0
  6. package/.react-email/package.json +1 -0
  7. package/.react-email/postcss.config.js +8 -0
  8. package/.react-email/readme.md +44 -0
  9. package/.react-email/src/actions/get-email-path-from-slug.ts +26 -0
  10. package/.react-email/src/actions/get-emails-directory-metadata.spec.ts +73 -0
  11. package/.react-email/src/actions/get-emails-directory-metadata.ts +91 -0
  12. package/.react-email/src/actions/render-email-by-path.tsx +59 -0
  13. package/.react-email/src/app/favicon.ico +0 -0
  14. package/.react-email/src/app/globals.css +35 -0
  15. package/.react-email/src/app/inter.ts +7 -0
  16. package/.react-email/src/app/layout.tsx +36 -0
  17. package/.react-email/src/app/logo.png +0 -0
  18. package/.react-email/src/app/page.tsx +47 -0
  19. package/.react-email/src/app/preview/[...slug]/page.tsx +65 -0
  20. package/.react-email/src/app/preview/[...slug]/preview.tsx +141 -0
  21. package/.react-email/src/app/preview/[...slug]/rendering-error.tsx +40 -0
  22. package/.react-email/src/components/button.tsx +90 -0
  23. package/.react-email/src/components/code-container.tsx +145 -0
  24. package/.react-email/src/components/code.tsx +112 -0
  25. package/.react-email/src/components/heading.tsx +113 -0
  26. package/.react-email/src/components/icons/icon-arrow-down.tsx +16 -0
  27. package/.react-email/src/components/icons/icon-base.tsx +24 -0
  28. package/.react-email/src/components/icons/icon-button.tsx +23 -0
  29. package/.react-email/src/components/icons/icon-check.tsx +19 -0
  30. package/.react-email/src/components/icons/icon-clipboard.tsx +40 -0
  31. package/.react-email/src/components/icons/icon-download.tsx +19 -0
  32. package/.react-email/src/components/icons/icon-file.tsx +19 -0
  33. package/.react-email/src/components/icons/icon-folder-open.tsx +19 -0
  34. package/.react-email/src/components/icons/icon-folder.tsx +18 -0
  35. package/.react-email/src/components/icons/icon-hide-sidebar.tsx +23 -0
  36. package/.react-email/src/components/icons/icon-monitor.tsx +19 -0
  37. package/.react-email/src/components/icons/icon-phone.tsx +26 -0
  38. package/.react-email/src/components/icons/icon-source.tsx +19 -0
  39. package/.react-email/src/components/index.ts +7 -0
  40. package/.react-email/src/components/logo.tsx +64 -0
  41. package/.react-email/src/components/send.tsx +135 -0
  42. package/.react-email/src/components/shell.tsx +115 -0
  43. package/.react-email/src/components/sidebar/index.ts +1 -0
  44. package/.react-email/src/components/sidebar/sidebar-directory-children.tsx +134 -0
  45. package/.react-email/src/components/sidebar/sidebar-directory.tsx +106 -0
  46. package/.react-email/src/components/sidebar/sidebar.tsx +45 -0
  47. package/.react-email/src/components/text.tsx +99 -0
  48. package/.react-email/src/components/tooltip-content.tsx +32 -0
  49. package/.react-email/src/components/tooltip.tsx +19 -0
  50. package/.react-email/src/components/topbar.tsx +161 -0
  51. package/.react-email/src/contexts/emails.tsx +127 -0
  52. package/.react-email/src/hooks/use-hot-reload.ts +35 -0
  53. package/.react-email/src/hooks/use-rendering-metadata.ts +36 -0
  54. package/.react-email/src/utils/cn.ts +6 -0
  55. package/.react-email/src/utils/constants.ts +6 -0
  56. package/.react-email/src/utils/copy-text-to-clipboard.ts +7 -0
  57. package/.react-email/src/utils/emails-directory-absolute-path.ts +34 -0
  58. package/.react-email/src/utils/get-email-component.ts +108 -0
  59. package/.react-email/src/utils/improve-error-with-sourcemap.ts +55 -0
  60. package/.react-email/src/utils/index.ts +5 -0
  61. package/.react-email/src/utils/language-map.ts +7 -0
  62. package/.react-email/src/utils/static-node-modules-for-vm.ts +92 -0
  63. package/.react-email/src/utils/types/as.ts +26 -0
  64. package/.react-email/src/utils/types/email-template.ts +8 -0
  65. package/.react-email/src/utils/types/error-object.ts +11 -0
  66. package/.react-email/src/utils/types/hot-reload-change.ts +6 -0
  67. package/.react-email/src/utils/types/hot-reload-event.ts +6 -0
  68. package/.react-email/src/utils/unreachable.ts +8 -0
  69. package/.react-email/tailwind.config.ts +94 -0
  70. package/dist/index.d.mts +1 -3
  71. package/dist/index.d.ts +1 -3
  72. package/dist/index.js +17 -10
  73. package/dist/index.mjs +17 -10
  74. package/package.json +1 -1
@@ -0,0 +1,94 @@
1
+ import type { Config } from 'tailwindcss';
2
+ import colors = require('@radix-ui/colors');
3
+ import { fontFamily } from 'tailwindcss/defaultTheme';
4
+ import plugin from 'tailwindcss/plugin';
5
+
6
+ const iOsHeight = plugin(({ addUtilities }) => {
7
+ const supportsTouchRule = '@supports (-webkit-touch-callout: none)';
8
+ const webkitFillAvailable = '-webkit-fill-available';
9
+
10
+ const utilities = {
11
+ '.min-h-screen-ios': {
12
+ [supportsTouchRule]: {
13
+ minHeight: webkitFillAvailable,
14
+ },
15
+ },
16
+ '.h-screen-ios': {
17
+ [supportsTouchRule]: {
18
+ height: webkitFillAvailable,
19
+ },
20
+ },
21
+ };
22
+
23
+ // @ts-expect-error This works normally, not sure what this error is
24
+ addUtilities(utilities, ['responsive']);
25
+ });
26
+
27
+ const config: Config = {
28
+ content: {
29
+ // needs to be relative because tailwind will find the content
30
+ // by default based on the process's cwd
31
+ relative: true,
32
+ files: [
33
+ './src/components/**/*.{js,ts,jsx,tsx,mdx}',
34
+ './src/app/**/*.{js,ts,jsx,tsx,mdx}',
35
+ ],
36
+ },
37
+ theme: {
38
+ extend: {
39
+ backgroundImage: {
40
+ gradient:
41
+ 'linear-gradient(145.37deg, rgba(255, 255, 255, 0.09) -8.75%, rgba(255, 255, 255, 0.027) 83.95%)',
42
+ gradientHover:
43
+ 'linear-gradient(145.37deg, rgba(255, 255, 255, 0.1) -8.75%, rgba(255, 255, 255, 0.057) 83.95%)',
44
+ shine:
45
+ 'linear-gradient(45deg, rgba(255,255,255,0) 45%,rgba(255,255,255,1) 50%,rgba(255,255,255,0) 55%,rgba(255,255,255,0) 100%)',
46
+ },
47
+ colors: {
48
+ cyan: {
49
+ 1: colors.cyanDarkA.cyanA1,
50
+ 2: colors.cyanDarkA.cyanA2,
51
+ 3: colors.cyanDarkA.cyanA3,
52
+ 4: colors.cyanDarkA.cyanA4,
53
+ 5: colors.cyanDarkA.cyanA5,
54
+ 6: colors.cyanDarkA.cyanA6,
55
+ 7: colors.cyanDarkA.cyanA7,
56
+ 8: colors.cyanDarkA.cyanA8,
57
+ 9: colors.cyanDarkA.cyanA9,
58
+ 10: colors.cyanDarkA.cyanA10,
59
+ 11: colors.cyanDarkA.cyanA11,
60
+ 12: colors.cyanDarkA.cyanA12,
61
+ },
62
+ slate: {
63
+ 1: colors.slateDarkA.slateA1,
64
+ 2: colors.slateDarkA.slateA2,
65
+ 3: colors.slateDarkA.slateA3,
66
+ 4: colors.slateDarkA.slateA4,
67
+ 5: colors.slateDarkA.slateA5,
68
+ 6: colors.slateDarkA.slateA6,
69
+ 7: colors.slateDarkA.slateA7,
70
+ 8: colors.slateDarkA.slateA8,
71
+ 9: colors.slateDarkA.slateA9,
72
+ 10: colors.slateDarkA.slateA10,
73
+ 11: colors.slateDarkA.slateA11,
74
+ 12: colors.slateDarkA.slateA12,
75
+ },
76
+ },
77
+ fontFamily: {
78
+ sans: ['var(--font-inter)', ...fontFamily.sans],
79
+ },
80
+ keyframes: {
81
+ shine: {
82
+ '0%': { backgroundPosition: '-100%' },
83
+ '100%': { backgroundPosition: '100%' },
84
+ },
85
+ dash: {
86
+ '0%': { strokeDashoffset: '1000' },
87
+ '100%': { strokeDashoffset: '0' },
88
+ },
89
+ },
90
+ },
91
+ },
92
+ plugins: [iOsHeight],
93
+ };
94
+ export default config;
package/dist/index.d.mts CHANGED
@@ -168,7 +168,6 @@ interface NewJobCreatedBrandProps {
168
168
  campaign: {
169
169
  name: string;
170
170
  description: string;
171
- photo: string;
172
171
  };
173
172
  job: {
174
173
  id: string;
@@ -437,7 +436,6 @@ declare namespace NewJobCreatedBrand {
437
436
  campaign: {
438
437
  name: string;
439
438
  description: string;
440
- photo: string;
441
439
  };
442
440
  job: {
443
441
  id: string;
@@ -578,7 +576,7 @@ declare function Welcome({ name, userType }: WelcomeTemplateProps): react_jsx_ru
578
576
  declare namespace Welcome {
579
577
  var PreviewProps: {
580
578
  name: string;
581
- userType: USER_ROLES.BRAND;
579
+ userType: USER_ROLES.CREATOR;
582
580
  };
583
581
  }
584
582
 
package/dist/index.d.ts CHANGED
@@ -168,7 +168,6 @@ interface NewJobCreatedBrandProps {
168
168
  campaign: {
169
169
  name: string;
170
170
  description: string;
171
- photo: string;
172
171
  };
173
172
  job: {
174
173
  id: string;
@@ -437,7 +436,6 @@ declare namespace NewJobCreatedBrand {
437
436
  campaign: {
438
437
  name: string;
439
438
  description: string;
440
- photo: string;
441
439
  };
442
440
  job: {
443
441
  id: string;
@@ -578,7 +576,7 @@ declare function Welcome({ name, userType }: WelcomeTemplateProps): react_jsx_ru
578
576
  declare namespace Welcome {
579
577
  var PreviewProps: {
580
578
  name: string;
581
- userType: USER_ROLES.BRAND;
579
+ userType: USER_ROLES.CREATOR;
582
580
  };
583
581
  }
584
582
 
package/dist/index.js CHANGED
@@ -812,8 +812,7 @@ NewJobCreatedBrand.PreviewProps = {
812
812
  },
813
813
  campaign: {
814
814
  name: "Megas ate dormir",
815
- description: "Ganhe megas so por publicar uma foto com a vodacom",
816
- photo: "https://s3.us-east-2.amazonaws.com/promote-mz.com/images/8c52bb92-4a8b-472f-89cb-0428b90b8b74.jpg"
815
+ description: "Ganhe megas so por publicar uma foto com a vodacom"
817
816
  },
818
817
  job: {
819
818
  id: "1",
@@ -1212,20 +1211,26 @@ function Welcome({ name, userType }) {
1212
1211
  const content2 = {
1213
1212
  ["brand" /* BRAND */]: {
1214
1213
  startLink: appRoutes.creatorsList,
1215
- description: " Obrigado por se registrar. Estamos muito felizes por t\xEA-lo a bordo. Explore nossa plataforma e descubra os melhores influenciadores e criadores de conte\xFAdo para suas necessidades de marketing."
1214
+ description: `Agora fazes parte da Promote, a primeira plataforma de Conte\xFAdo Gerado pelo Usu\xE1rio (UGC) em Mo\xE7ambique.
1215
+ Como Marca, podes conectar-te com criadores e escolher os que melhor se alinham \xE0 tua vis\xE3o para criar o conte\xFAdo ideal.
1216
+
1217
+ Agradecemos pelo teu registo e vamos manter-te informado sobre atualiza\xE7\xF5es e o lan\xE7amento oficial.`
1216
1218
  },
1217
1219
  ["creator" /* CREATOR */]: {
1218
1220
  startLink: appRoutes.creatorPrivateProfile,
1219
- description: " Obrigado por se registrar. Estamos muito felizes por t\xEA-lo a bordo. Explore nossa plataforma e descubra as melhores marcas para colaborar."
1221
+ description: `Parab\xE9ns! Agora fazes parte da Promote, a primeira plataforma de Conte\xFAdo Gerado pelo Usu\xE1rio (UGC) em Mo\xE7ambique.
1222
+ Como Criador, vais poder conectar-te com marcas e ag\xEAncias, mostrar o teu talento e candidatar-te a diversos projectos.
1223
+
1224
+ Agradecemos pelo teu registo e vamos manter-te informado sobre novidades e o lan\xE7amento oficial.`
1220
1225
  }
1221
1226
  };
1222
1227
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components24.Html, { style: rootStyles, children: [
1223
1228
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(BaseHead, {}),
1224
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Preview, { children: "Bem-vindo a Promote" }),
1229
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Preview, { children: "Bem-vindo \xE0 Promote" }),
1225
1230
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components24.Body, { style: { ...main, ...baseContainer }, children: [
1226
1231
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components24.Container, { style: headContainer, children: [
1227
1232
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Img, { src: `${assetsBasePath}/icons/logo-icon.png`, alt: "Promote Logo", style: promoteLogo }),
1228
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Img, { src: `${assetsBasePath}/icons/welcome-title.png`, alt: "Promote Logo", style: welcomeImage })
1233
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Img, { src: `${assetsBasePath}/icons/welcome-title.png`, alt: "Bem-vindo \xE0 Promote", style: welcomeImage })
1229
1234
  ] }),
1230
1235
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components24.Container, { style: baseContentContainer, children: [
1231
1236
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components24.Heading, { as: "h1", style: title3, children: [
@@ -1235,7 +1240,7 @@ function Welcome({ name, userType }) {
1235
1240
  ] }),
1236
1241
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Text, { style: textInfo, children: content2[userType]?.description }),
1237
1242
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_components24.Text, { style: textInfo, children: [
1238
- "Em caso de qualquer d\xFAvida, entre em conctato connosco atrav\xE9s do e-mail:",
1243
+ "Se tiveres alguma d\xFAvida ou sugest\xE3o, n\xE3o hesites em contactar-nos atrav\xE9s do e-mail:",
1239
1244
  " ",
1240
1245
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_components24.Link, { style: link, href: "mailto:help@promote.co.mz", children: "help@promote.co.mz" }),
1241
1246
  " ",
@@ -1248,8 +1253,8 @@ function Welcome({ name, userType }) {
1248
1253
  ] });
1249
1254
  }
1250
1255
  Welcome.PreviewProps = {
1251
- name: "Jo\xE3o ant\xF3nio",
1252
- userType: "brand" /* BRAND */
1256
+ name: "Jo\xE3o Ant\xF3nio",
1257
+ userType: "creator" /* CREATOR */
1253
1258
  };
1254
1259
  var headContainer = {
1255
1260
  ...baseContentContainer,
@@ -1281,7 +1286,9 @@ var title3 = {
1281
1286
  var textInfo = {
1282
1287
  ...baseText,
1283
1288
  marginTop: "20px",
1284
- marginBottom: "20px"
1289
+ marginBottom: "20px",
1290
+ textAlign: "justify",
1291
+ whiteSpace: "pre-line"
1285
1292
  };
1286
1293
  // Annotate the CommonJS export names for ESM import in node:
1287
1294
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -755,8 +755,7 @@ NewJobCreatedBrand.PreviewProps = {
755
755
  },
756
756
  campaign: {
757
757
  name: "Megas ate dormir",
758
- description: "Ganhe megas so por publicar uma foto com a vodacom",
759
- photo: "https://s3.us-east-2.amazonaws.com/promote-mz.com/images/8c52bb92-4a8b-472f-89cb-0428b90b8b74.jpg"
758
+ description: "Ganhe megas so por publicar uma foto com a vodacom"
760
759
  },
761
760
  job: {
762
761
  id: "1",
@@ -1155,20 +1154,26 @@ function Welcome({ name, userType }) {
1155
1154
  const content2 = {
1156
1155
  ["brand" /* BRAND */]: {
1157
1156
  startLink: appRoutes.creatorsList,
1158
- description: " Obrigado por se registrar. Estamos muito felizes por t\xEA-lo a bordo. Explore nossa plataforma e descubra os melhores influenciadores e criadores de conte\xFAdo para suas necessidades de marketing."
1157
+ description: `Agora fazes parte da Promote, a primeira plataforma de Conte\xFAdo Gerado pelo Usu\xE1rio (UGC) em Mo\xE7ambique.
1158
+ Como Marca, podes conectar-te com criadores e escolher os que melhor se alinham \xE0 tua vis\xE3o para criar o conte\xFAdo ideal.
1159
+
1160
+ Agradecemos pelo teu registo e vamos manter-te informado sobre atualiza\xE7\xF5es e o lan\xE7amento oficial.`
1159
1161
  },
1160
1162
  ["creator" /* CREATOR */]: {
1161
1163
  startLink: appRoutes.creatorPrivateProfile,
1162
- description: " Obrigado por se registrar. Estamos muito felizes por t\xEA-lo a bordo. Explore nossa plataforma e descubra as melhores marcas para colaborar."
1164
+ description: `Parab\xE9ns! Agora fazes parte da Promote, a primeira plataforma de Conte\xFAdo Gerado pelo Usu\xE1rio (UGC) em Mo\xE7ambique.
1165
+ Como Criador, vais poder conectar-te com marcas e ag\xEAncias, mostrar o teu talento e candidatar-te a diversos projectos.
1166
+
1167
+ Agradecemos pelo teu registo e vamos manter-te informado sobre novidades e o lan\xE7amento oficial.`
1163
1168
  }
1164
1169
  };
1165
1170
  return /* @__PURE__ */ jsxs22(Html17, { style: rootStyles, children: [
1166
1171
  /* @__PURE__ */ jsx24(BaseHead, {}),
1167
- /* @__PURE__ */ jsx24(Preview17, { children: "Bem-vindo a Promote" }),
1172
+ /* @__PURE__ */ jsx24(Preview17, { children: "Bem-vindo \xE0 Promote" }),
1168
1173
  /* @__PURE__ */ jsxs22(Body17, { style: { ...main, ...baseContainer }, children: [
1169
1174
  /* @__PURE__ */ jsxs22(Container22, { style: headContainer, children: [
1170
1175
  /* @__PURE__ */ jsx24(Img4, { src: `${assetsBasePath}/icons/logo-icon.png`, alt: "Promote Logo", style: promoteLogo }),
1171
- /* @__PURE__ */ jsx24(Img4, { src: `${assetsBasePath}/icons/welcome-title.png`, alt: "Promote Logo", style: welcomeImage })
1176
+ /* @__PURE__ */ jsx24(Img4, { src: `${assetsBasePath}/icons/welcome-title.png`, alt: "Bem-vindo \xE0 Promote", style: welcomeImage })
1172
1177
  ] }),
1173
1178
  /* @__PURE__ */ jsxs22(Container22, { style: baseContentContainer, children: [
1174
1179
  /* @__PURE__ */ jsxs22(Heading3, { as: "h1", style: title3, children: [
@@ -1178,7 +1183,7 @@ function Welcome({ name, userType }) {
1178
1183
  ] }),
1179
1184
  /* @__PURE__ */ jsx24(Text22, { style: textInfo, children: content2[userType]?.description }),
1180
1185
  /* @__PURE__ */ jsxs22(Text22, { style: textInfo, children: [
1181
- "Em caso de qualquer d\xFAvida, entre em conctato connosco atrav\xE9s do e-mail:",
1186
+ "Se tiveres alguma d\xFAvida ou sugest\xE3o, n\xE3o hesites em contactar-nos atrav\xE9s do e-mail:",
1182
1187
  " ",
1183
1188
  /* @__PURE__ */ jsx24(Link20, { style: link, href: "mailto:help@promote.co.mz", children: "help@promote.co.mz" }),
1184
1189
  " ",
@@ -1191,8 +1196,8 @@ function Welcome({ name, userType }) {
1191
1196
  ] });
1192
1197
  }
1193
1198
  Welcome.PreviewProps = {
1194
- name: "Jo\xE3o ant\xF3nio",
1195
- userType: "brand" /* BRAND */
1199
+ name: "Jo\xE3o Ant\xF3nio",
1200
+ userType: "creator" /* CREATOR */
1196
1201
  };
1197
1202
  var headContainer = {
1198
1203
  ...baseContentContainer,
@@ -1224,7 +1229,9 @@ var title3 = {
1224
1229
  var textInfo = {
1225
1230
  ...baseText,
1226
1231
  marginTop: "20px",
1227
- marginBottom: "20px"
1232
+ marginBottom: "20px",
1233
+ textAlign: "justify",
1234
+ whiteSpace: "pre-line"
1228
1235
  };
1229
1236
  export {
1230
1237
  AbortOrderRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promote-email-templates",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Promote Email Templates",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",