promote-email-templates 0.0.2 → 0.0.3

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 +208 -82
  71. package/dist/index.d.ts +208 -82
  72. package/dist/index.js +292 -91
  73. package/dist/index.mjs +289 -91
  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
@@ -161,6 +161,62 @@ interface NewOrderCreatedBrandProps {
161
161
  photo: string;
162
162
  };
163
163
  }
164
+ interface NewJobCreatedBrandProps {
165
+ brand: {
166
+ name: string;
167
+ };
168
+ campaign: {
169
+ name: string;
170
+ description: string;
171
+ photo: string;
172
+ };
173
+ job: {
174
+ id: string;
175
+ createdAt: string;
176
+ jobCommission: string;
177
+ };
178
+ }
179
+ interface NewJobApplicationsReceivedBrandProps {
180
+ brand: {
181
+ name: string;
182
+ };
183
+ campaign: {
184
+ name: string;
185
+ description: string;
186
+ photo: string;
187
+ };
188
+ job: {
189
+ id: string;
190
+ createdAt: string;
191
+ jobCommission: string;
192
+ };
193
+ jobApplication: {
194
+ id: string;
195
+ desired_budget?: number;
196
+ observations?: string;
197
+ };
198
+ creatorCandidate: {
199
+ name: string;
200
+ photo: string;
201
+ username: string;
202
+ };
203
+ }
204
+ interface NewJobApplicationUnapprovedCreatorProps {
205
+ creator: {
206
+ name: string;
207
+ email: string;
208
+ photo: string;
209
+ };
210
+ campaign: {
211
+ name: string;
212
+ description: string;
213
+ photo: string;
214
+ };
215
+ jobApplication: {
216
+ id: string;
217
+ rejectionReason?: string;
218
+ };
219
+ }
164
220
  interface WelcomeTemplateProps {
165
221
  name?: string;
166
222
  userType: USER_ROLES;
@@ -186,6 +242,90 @@ declare namespace RevertPaymentRequestAdmin {
186
242
  };
187
243
  }
188
244
 
245
+ declare const colors: {
246
+ primary: string;
247
+ white: string;
248
+ black: string;
249
+ grey: string;
250
+ grey01: string;
251
+ };
252
+ declare const rootStyles: {
253
+ width: string;
254
+ height: string;
255
+ backgroundColor: string;
256
+ fontFamily: string;
257
+ };
258
+ declare const baseContentContainer: {
259
+ padding: string;
260
+ maxWidth: string;
261
+ };
262
+ declare const link: {
263
+ color: string;
264
+ textDecoration: string;
265
+ fontWeight: string;
266
+ opacity: number;
267
+ };
268
+ declare const main: {
269
+ backgroundColor: string;
270
+ maxWidth: string;
271
+ width: string;
272
+ height: string;
273
+ marginLeft: string;
274
+ marginRight: string;
275
+ };
276
+ declare const baseContainer: {
277
+ width: string;
278
+ height: string;
279
+ padding: string;
280
+ border: string;
281
+ borderRadius: string;
282
+ };
283
+ declare const button: {
284
+ fontSize: string;
285
+ backgroundColor: string;
286
+ display: string;
287
+ color: string;
288
+ padding: string;
289
+ width: string;
290
+ borderRadius: string;
291
+ justifyContent: string;
292
+ margin: string;
293
+ textAlign: "center";
294
+ fontWeight: string;
295
+ };
296
+ declare const baseText: {
297
+ color: string;
298
+ fontSize: string;
299
+ lineHeight: string;
300
+ };
301
+ declare const centerBlock: {
302
+ display: string;
303
+ margin: string;
304
+ };
305
+ declare const centerText: {
306
+ textAlign: "center";
307
+ };
308
+
309
+ declare const appBaseUrl = "https://promote.co.mz";
310
+ declare const assetsBasePath = "https://s3.us-east-2.amazonaws.com/promote-mz.com/assets";
311
+ declare const appRoutes: {
312
+ homePageRoute: string;
313
+ creatorsList: string;
314
+ creatorPrivateProfile: string;
315
+ termsAndConditions: string;
316
+ jobsList: string;
317
+ creatorOrderDetails: (orderId: string) => string;
318
+ brandOrderDetails: (orderId: string) => string;
319
+ brandJobDetails: (jobId: string) => string;
320
+ adminOrderDetails: (orderId: string) => string;
321
+ creatorPublicProfile: (username: string) => string;
322
+ };
323
+ declare const socialNetworkLinks: {
324
+ linkedin: string;
325
+ instagram: string;
326
+ facebook: string;
327
+ };
328
+
189
329
  declare function OrderEvidencesAcceptedBrand(props: OrderEvidencesAcceptedBrandProps): react_jsx_runtime.JSX.Element;
190
330
  declare namespace OrderEvidencesAcceptedBrand {
191
331
  var PreviewProps: {
@@ -292,6 +432,54 @@ declare namespace OrderRejectedBrand {
292
432
  };
293
433
  }
294
434
 
435
+ declare function NewJobCreatedBrand(props: NewJobCreatedBrandProps): react_jsx_runtime.JSX.Element;
436
+ declare namespace NewJobCreatedBrand {
437
+ var PreviewProps: {
438
+ brand: {
439
+ name: string;
440
+ };
441
+ campaign: {
442
+ name: string;
443
+ description: string;
444
+ photo: string;
445
+ };
446
+ job: {
447
+ id: string;
448
+ createdAt: string;
449
+ jobCommission: string;
450
+ };
451
+ };
452
+ }
453
+
454
+ declare function NewJobApplicationsReceivedBrand(props: NewJobApplicationsReceivedBrandProps): react_jsx_runtime.JSX.Element;
455
+ declare namespace NewJobApplicationsReceivedBrand {
456
+ var PreviewProps: {
457
+ brand: {
458
+ name: string;
459
+ };
460
+ campaign: {
461
+ name: string;
462
+ description: string;
463
+ photo: string;
464
+ };
465
+ job: {
466
+ id: string;
467
+ createdAt: string;
468
+ jobCommission: string;
469
+ };
470
+ jobApplication: {
471
+ id: string;
472
+ desired_budget: number;
473
+ observations: string;
474
+ };
475
+ creatorCandidate: {
476
+ name: string;
477
+ photo: string;
478
+ username: string;
479
+ };
480
+ };
481
+ }
482
+
295
483
  declare function EvidenceApprovedCreator(props: EvidenceApprovedCreatorProps): react_jsx_runtime.JSX.Element;
296
484
  declare namespace EvidenceApprovedCreator {
297
485
  var PreviewProps: {
@@ -374,87 +562,25 @@ declare namespace NewOrderCreatedCreator {
374
562
  };
375
563
  }
376
564
 
377
- declare const colors: {
378
- primary: string;
379
- white: string;
380
- black: string;
381
- grey: string;
382
- grey01: string;
383
- };
384
- declare const rootStyles: {
385
- width: string;
386
- height: string;
387
- backgroundColor: string;
388
- fontFamily: string;
389
- };
390
- declare const baseContentContainer: {
391
- padding: string;
392
- maxWidth: string;
393
- };
394
- declare const link: {
395
- color: string;
396
- textDecoration: string;
397
- fontWeight: string;
398
- opacity: number;
399
- };
400
- declare const main: {
401
- backgroundColor: string;
402
- maxWidth: string;
403
- width: string;
404
- height: string;
405
- marginLeft: string;
406
- marginRight: string;
407
- };
408
- declare const baseContainer: {
409
- width: string;
410
- height: string;
411
- padding: string;
412
- border: string;
413
- borderRadius: string;
414
- };
415
- declare const button: {
416
- fontSize: string;
417
- backgroundColor: string;
418
- display: string;
419
- color: string;
420
- padding: string;
421
- width: string;
422
- borderRadius: string;
423
- justifyContent: string;
424
- margin: string;
425
- textAlign: "center";
426
- fontWeight: string;
427
- };
428
- declare const baseText: {
429
- color: string;
430
- fontSize: string;
431
- lineHeight: string;
432
- };
433
- declare const centerBlock: {
434
- display: string;
435
- margin: string;
436
- };
437
- declare const centerText: {
438
- textAlign: "center";
439
- };
440
-
441
- declare const appBaseUrl = "https://promote.co.mz";
442
- declare const assetsBasePath = "https://s3.us-east-2.amazonaws.com/promote-mz.com/assets";
443
- declare const appRoutes: {
444
- homePageRoute: string;
445
- creatorsList: string;
446
- creatorPrivateProfile: string;
447
- termsAndConditions: string;
448
- creatorOrderDetails: (orderId: string) => string;
449
- brandOrderDetails: (orderId: string) => string;
450
- adminOrderDetails: (orderId: string) => string;
451
- creatorPublicProfile: (username: string) => string;
452
- };
453
- declare const socialNetworkLinks: {
454
- linkedin: string;
455
- instagram: string;
456
- facebook: string;
457
- };
565
+ declare function NewJobApplicationUnapprovedCreator(props: NewJobApplicationUnapprovedCreatorProps): react_jsx_runtime.JSX.Element;
566
+ declare namespace NewJobApplicationUnapprovedCreator {
567
+ var PreviewProps: {
568
+ creator: {
569
+ name: string;
570
+ email: string;
571
+ photo: string;
572
+ };
573
+ campaign: {
574
+ name: string;
575
+ description: string;
576
+ photo: string;
577
+ };
578
+ jobApplication: {
579
+ id: string;
580
+ rejectionReason: string;
581
+ };
582
+ };
583
+ }
458
584
 
459
585
  declare function Welcome({ name, userType }: WelcomeTemplateProps): react_jsx_runtime.JSX.Element;
460
586
  declare namespace Welcome {
@@ -464,4 +590,4 @@ declare namespace Welcome {
464
590
  };
465
591
  }
466
592
 
467
- export { AbortOrderRequest, type AbortOrderRequestProps, EvidenceApprovedCreator, type EvidenceApprovedCreatorProps, type EvidenceSubmittedBrandProps, EvidencesRejectedCreator, type EvidencesRejectedProps, EvidencesSubmittedBrand, NewOrderCreatedBrand, type NewOrderCreatedBrandProps, NewOrderCreatedCreator, type NewOrderCreatedCreatorProps, OrderAcceptedBrand, type OrderAcceptedBrandProps, OrderCancelledBrand, type OrderCancelledBrandProps, OrderCancelledCreator, type OrderCancelledCreatorProps, OrderEvidencesAcceptedBrand, type OrderEvidencesAcceptedBrandProps, type OrderOrderPaymentCreatorProps, OrderPaymentCreator, OrderRejectedBrand, type OrderRejectedBrandProps, RevertPaymentRequestAdmin, type RevertPaymentRequestAdminProps, USER_ROLES, Welcome, type WelcomeTemplateProps, appBaseUrl, appRoutes, assetsBasePath, baseContainer, baseContentContainer, baseText, button, centerBlock, centerText, colors, link, main, rootStyles, socialNetworkLinks };
593
+ export { AbortOrderRequest, type AbortOrderRequestProps, EvidenceApprovedCreator, type EvidenceApprovedCreatorProps, type EvidenceSubmittedBrandProps, EvidencesRejectedCreator, type EvidencesRejectedProps, EvidencesSubmittedBrand, NewJobApplicationUnapprovedCreator, type NewJobApplicationUnapprovedCreatorProps, NewJobApplicationsReceivedBrand, type NewJobApplicationsReceivedBrandProps, NewJobCreatedBrand, type NewJobCreatedBrandProps, NewOrderCreatedBrand, type NewOrderCreatedBrandProps, NewOrderCreatedCreator, type NewOrderCreatedCreatorProps, OrderAcceptedBrand, type OrderAcceptedBrandProps, OrderCancelledBrand, type OrderCancelledBrandProps, OrderCancelledCreator, type OrderCancelledCreatorProps, OrderEvidencesAcceptedBrand, type OrderEvidencesAcceptedBrandProps, type OrderOrderPaymentCreatorProps, OrderPaymentCreator, OrderRejectedBrand, type OrderRejectedBrandProps, RevertPaymentRequestAdmin, type RevertPaymentRequestAdminProps, USER_ROLES, Welcome, type WelcomeTemplateProps, appBaseUrl, appRoutes, assetsBasePath, baseContainer, baseContentContainer, baseText, button, centerBlock, centerText, colors, link, main, rootStyles, socialNetworkLinks };