promote-email-templates 0.0.19 → 0.1.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.
Files changed (104) 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 +217 -83
  71. package/dist/index.d.ts +217 -83
  72. package/dist/index.js +362 -105
  73. package/dist/index.mjs +359 -105
  74. package/package.json +1 -1
  75. package/emails/admin/abort-order-request.tsx +0 -58
  76. package/emails/admin/index.ts +0 -2
  77. package/emails/admin/revert-payment-request-admin.tsx +0 -54
  78. package/emails/all/index.ts +0 -1
  79. package/emails/all/welcome.tsx +0 -104
  80. package/emails/brand/evidences-accepted-brand.tsx +0 -59
  81. package/emails/brand/evidences-submitted-brand.tsx +0 -65
  82. package/emails/brand/index.ts +0 -6
  83. package/emails/brand/new-order-created-brand.tsx +0 -74
  84. package/emails/brand/order-accepted-brand.tsx +0 -63
  85. package/emails/brand/order-cancelled-brand.tsx +0 -68
  86. package/emails/brand/order-rejected-brand.tsx +0 -79
  87. package/emails/creator/evidences-approved-creator.tsx +0 -62
  88. package/emails/creator/evidences-rejected-creator.tsx +0 -74
  89. package/emails/creator/index.ts +0 -5
  90. package/emails/creator/new-order-created-creator.tsx +0 -70
  91. package/emails/creator/order-cancelled-creator.tsx +0 -69
  92. package/emails/creator/order-payment-creator.tsx +0 -58
  93. package/emails/index.ts +0 -5
  94. package/emails/shared/components/base-head.tsx +0 -19
  95. package/emails/shared/components/comment-component.tsx +0 -32
  96. package/emails/shared/components/footer.tsx +0 -84
  97. package/emails/shared/components/header.tsx +0 -24
  98. package/emails/shared/components/new-order-info.tsx +0 -60
  99. package/emails/shared/components/payment-amount.tsx +0 -37
  100. package/emails/shared/components/user-Info.tsx +0 -55
  101. package/emails/shared/index.ts +0 -3
  102. package/emails/shared/styles.ts +0 -72
  103. package/emails/shared/types.ts +0 -179
  104. package/emails/shared/values.ts +0 -19
@@ -1,72 +0,0 @@
1
- export const colors = {
2
- primary: '#FF5C5C',
3
- white: '#FFFFFF',
4
- black: '#595959',
5
- grey: '#E0E0E0',
6
- grey01: '#7c7c7c',
7
- };
8
-
9
- export const rootStyles = {
10
- width: '100%',
11
- height: '100%',
12
- backgroundColor: colors.white,
13
- fontFamily: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif',
14
- };
15
-
16
- export const baseContentContainer = {
17
- padding: '0 auto',
18
- maxWidth: '90%',
19
- };
20
-
21
- export const link = {
22
- color: colors.primary,
23
- textDecoration: 'none',
24
- fontWeight: 'bold',
25
- opacity: 0.8,
26
- };
27
-
28
- export const main = {
29
- backgroundColor: colors.white,
30
- maxWidth: '650px',
31
- width: '100%',
32
- height: '100%',
33
- marginLeft: 'auto',
34
- marginRight: 'auto',
35
- };
36
-
37
- export const baseContainer = {
38
- width: '100%',
39
- height: 'auto',
40
- padding: '20px 0',
41
- border: '1px solid #e0e0e0',
42
- borderRadius: '8px',
43
- };
44
-
45
- export const button = {
46
- fontSize: '16px',
47
- backgroundColor: colors.primary,
48
- display: 'block',
49
- color: colors.white,
50
- padding: '15px 20px',
51
- width: 'auto',
52
- borderRadius: '8px',
53
- justifyContent: 'center',
54
- margin: '0 auto',
55
- textAlign: 'center' as const,
56
- fontWeight: 'bold',
57
- };
58
-
59
- export const baseText = {
60
- color: colors.black,
61
- fontSize: '18px',
62
- lineHeight: '1.5',
63
- };
64
-
65
- export const centerBlock = {
66
- display: 'block',
67
- margin: '0 auto',
68
- };
69
-
70
- export const centerText = {
71
- textAlign: 'center' as const,
72
- };
@@ -1,179 +0,0 @@
1
- export enum USER_ROLES {
2
- BRAND = 'brand',
3
- CREATOR = 'creator',
4
- }
5
-
6
- export interface NewOrderCreatedCreatorProps {
7
- creator: {
8
- name: string;
9
- };
10
- package: {
11
- name: string;
12
- price: string;
13
- };
14
- order: {
15
- id: string;
16
- createdAt: string;
17
- };
18
- brand: {
19
- name: string;
20
- photo: string;
21
- };
22
- }
23
-
24
- export type OrderCancelledBrandProps = {
25
- reason?: string;
26
- order: {
27
- id: string;
28
- };
29
- brand: {
30
- name: string;
31
- };
32
- };
33
-
34
- export interface EvidencesRejectedProps {
35
- reason?: string;
36
- evidenceLink: string;
37
- order: {
38
- id: string;
39
- };
40
- creator: {
41
- name: string;
42
- };
43
- brand: {
44
- name: string;
45
- photo: string;
46
- };
47
- }
48
-
49
- export interface OrderCancelledCreatorProps {
50
- reason?: string;
51
- order: {
52
- id: string;
53
- };
54
- creator: {
55
- name: string;
56
- };
57
- }
58
-
59
- export interface OrderAcceptedBrandProps {
60
- reason?: string;
61
- order: {
62
- id: string;
63
- };
64
- brand: {
65
- name: string;
66
- };
67
- creator: {
68
- username: string;
69
- name: string;
70
- photo: string;
71
- };
72
- }
73
-
74
- export interface OrderEvidencesAcceptedBrandProps {
75
- order: {
76
- id: string;
77
- };
78
- brand: {
79
- name: string;
80
- };
81
- totalAmount: string;
82
- }
83
-
84
- export interface AbortOrderRequestProps {
85
- order: {
86
- id: string;
87
- };
88
- requestedBy: USER_ROLES;
89
- }
90
-
91
- export interface OrderOrderPaymentCreatorProps {
92
- order: {
93
- id: string;
94
- };
95
- creator: {
96
- name: string;
97
- };
98
- totalAmount: string;
99
- }
100
-
101
- export interface RevertPaymentRequestAdminProps {
102
- order: {
103
- id: string;
104
- };
105
- totalAmount: string;
106
- }
107
-
108
- export interface EvidenceApprovedCreatorProps {
109
- order: {
110
- id: string;
111
- };
112
- creator: {
113
- name: string;
114
- };
115
- brand: {
116
- name: string;
117
- photo: string;
118
- };
119
- evidenceLink: string;
120
- }
121
-
122
- export interface EvidenceSubmittedBrandProps {
123
- brand: {
124
- name: string;
125
- };
126
- package: {
127
- name: string;
128
- };
129
- order: {
130
- id: string;
131
- };
132
- creator: {
133
- username: string;
134
- name: string;
135
- photo: string;
136
- };
137
- }
138
-
139
- export interface OrderRejectedBrandProps {
140
- brand: {
141
- name: string;
142
- };
143
- package: {
144
- name: string;
145
- };
146
- order: {
147
- id: string;
148
- };
149
- creator: {
150
- username: string;
151
- name: string;
152
- photo: string;
153
- };
154
- reason: string;
155
- }
156
-
157
- export interface NewOrderCreatedBrandProps {
158
- brand: {
159
- name: string;
160
- };
161
- package: {
162
- name: string;
163
- price: string;
164
- };
165
- order: {
166
- id: string;
167
- createdAt: string;
168
- };
169
- creator: {
170
- username: string;
171
- name: string;
172
- photo: string;
173
- };
174
- }
175
-
176
- export interface WelcomeTemplateProps {
177
- name?: string;
178
- userType: USER_ROLES;
179
- }
@@ -1,19 +0,0 @@
1
- export const appBaseUrl = `https://promote.co.mz`;
2
- export const assetsBasePath = `https://s3.us-east-2.amazonaws.com/promote-mz.com/assets`;
3
-
4
- export const appRoutes = {
5
- homePageRoute: `${appBaseUrl}/home`,
6
- creatorsList: `${appBaseUrl}/content-creators`,
7
- creatorPrivateProfile: `${appBaseUrl}/content-creators/profile`,
8
- termsAndConditions: `${appBaseUrl}/terms-and-conditions`,
9
- creatorOrderDetails: (orderId: string) => `${appBaseUrl}/content-creators/profile/orders/${orderId}`,
10
- brandOrderDetails: (orderId: string) => `${appBaseUrl}/brands/orders/${orderId}`,
11
- adminOrderDetails: (orderId: string) => `${appBaseUrl}/admin/orders/${orderId}`,
12
- creatorPublicProfile: (username: string) => `${appBaseUrl}/content-creators/${username}`,
13
- };
14
-
15
- export const socialNetworkLinks = {
16
- linkedin: 'https://www.linkedin.com/company/promotemz',
17
- instagram: 'https://www.instagram.com/promotemz/',
18
- facebook: 'https://www.facebook.com/promotemz',
19
- };