@rovela-ai/sdk 0.1.18 → 0.1.19

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 (298) hide show
  1. package/dist/admin/api/auth.js +5 -11
  2. package/dist/admin/api/auth.js.map +1 -1
  3. package/dist/admin/api/categories.js +43 -50
  4. package/dist/admin/api/categories.js.map +1 -1
  5. package/dist/admin/api/check.js +6 -9
  6. package/dist/admin/api/check.js.map +1 -1
  7. package/dist/admin/api/customers.js +17 -21
  8. package/dist/admin/api/customers.js.map +1 -1
  9. package/dist/admin/api/index.js +10 -38
  10. package/dist/admin/api/index.js.map +1 -1
  11. package/dist/admin/api/orders.js +30 -35
  12. package/dist/admin/api/orders.js.map +1 -1
  13. package/dist/admin/api/products.js +56 -66
  14. package/dist/admin/api/products.js.map +1 -1
  15. package/dist/admin/api/refund.js +26 -29
  16. package/dist/admin/api/refund.js.map +1 -1
  17. package/dist/admin/api/settings.js +17 -21
  18. package/dist/admin/api/settings.js.map +1 -1
  19. package/dist/admin/api/setup.js +17 -20
  20. package/dist/admin/api/setup.js.map +1 -1
  21. package/dist/admin/api/stats.js +14 -17
  22. package/dist/admin/api/stats.js.map +1 -1
  23. package/dist/admin/components/AdminGuard.js +13 -17
  24. package/dist/admin/components/AdminGuard.js.map +1 -1
  25. package/dist/admin/components/AdminHeader.js +8 -11
  26. package/dist/admin/components/AdminHeader.js.map +1 -1
  27. package/dist/admin/components/AdminLayout.js +5 -8
  28. package/dist/admin/components/AdminLayout.js.map +1 -1
  29. package/dist/admin/components/AdminLoginForm.js +11 -14
  30. package/dist/admin/components/AdminLoginForm.js.map +1 -1
  31. package/dist/admin/components/AdminNav.js +11 -14
  32. package/dist/admin/components/AdminNav.js.map +1 -1
  33. package/dist/admin/components/AdminSetupForm.js +11 -14
  34. package/dist/admin/components/AdminSetupForm.js.map +1 -1
  35. package/dist/admin/components/InventoryEditor.js +16 -19
  36. package/dist/admin/components/InventoryEditor.js.map +1 -1
  37. package/dist/admin/components/LowStockAlert.js +6 -9
  38. package/dist/admin/components/LowStockAlert.js.map +1 -1
  39. package/dist/admin/components/OrderDetails.js +15 -18
  40. package/dist/admin/components/OrderDetails.js.map +1 -1
  41. package/dist/admin/components/OrderTable.js +13 -16
  42. package/dist/admin/components/OrderTable.js.map +1 -1
  43. package/dist/admin/components/ProductForm.js +17 -20
  44. package/dist/admin/components/ProductForm.js.map +1 -1
  45. package/dist/admin/components/ProductTable.js +15 -18
  46. package/dist/admin/components/ProductTable.js.map +1 -1
  47. package/dist/admin/components/RecentOrders.js +6 -9
  48. package/dist/admin/components/RecentOrders.js.map +1 -1
  49. package/dist/admin/components/RefundDialog.js +12 -15
  50. package/dist/admin/components/RefundDialog.js.map +1 -1
  51. package/dist/admin/components/StatsCards.js +7 -10
  52. package/dist/admin/components/StatsCards.js.map +1 -1
  53. package/dist/admin/components/StoreSettings.js +10 -13
  54. package/dist/admin/components/StoreSettings.js.map +1 -1
  55. package/dist/admin/components/index.js +16 -35
  56. package/dist/admin/components/index.js.map +1 -1
  57. package/dist/admin/config.js +12 -54
  58. package/dist/admin/config.js.map +1 -1
  59. package/dist/admin/hooks/index.js +4 -11
  60. package/dist/admin/hooks/index.js.map +1 -1
  61. package/dist/admin/hooks/useAdminAuth.js +9 -12
  62. package/dist/admin/hooks/useAdminAuth.js.map +1 -1
  63. package/dist/admin/hooks/useAdminOrders.js +11 -14
  64. package/dist/admin/hooks/useAdminOrders.js.map +1 -1
  65. package/dist/admin/hooks/useAdminProducts.js +13 -16
  66. package/dist/admin/hooks/useAdminProducts.js.map +1 -1
  67. package/dist/admin/hooks/useAdminStats.js +11 -14
  68. package/dist/admin/hooks/useAdminStats.js.map +1 -1
  69. package/dist/admin/index.js +13 -66
  70. package/dist/admin/index.js.map +1 -1
  71. package/dist/admin/server/admin-service.js +39 -83
  72. package/dist/admin/server/admin-service.js.map +1 -1
  73. package/dist/admin/server/index.js +3 -13
  74. package/dist/admin/server/index.js.map +1 -1
  75. package/dist/admin/types.js +1 -2
  76. package/dist/admin/types.js.map +1 -1
  77. package/dist/auth/api/auth.js +6 -14
  78. package/dist/auth/api/auth.js.map +1 -1
  79. package/dist/auth/api/forgot-password.js +8 -11
  80. package/dist/auth/api/forgot-password.js.map +1 -1
  81. package/dist/auth/api/index.js +6 -18
  82. package/dist/auth/api/index.js.map +1 -1
  83. package/dist/auth/api/register.js +17 -20
  84. package/dist/auth/api/register.js.map +1 -1
  85. package/dist/auth/api/resend-verification.js +9 -12
  86. package/dist/auth/api/resend-verification.js.map +1 -1
  87. package/dist/auth/api/reset-password.js +18 -22
  88. package/dist/auth/api/reset-password.js.map +1 -1
  89. package/dist/auth/api/verify-email.js +14 -18
  90. package/dist/auth/api/verify-email.js.map +1 -1
  91. package/dist/auth/components/AuthGuard.js +13 -17
  92. package/dist/auth/components/AuthGuard.js.map +1 -1
  93. package/dist/auth/components/ForgotPasswordForm.js +11 -14
  94. package/dist/auth/components/ForgotPasswordForm.js.map +1 -1
  95. package/dist/auth/components/ResetPasswordForm.js +18 -21
  96. package/dist/auth/components/ResetPasswordForm.js.map +1 -1
  97. package/dist/auth/components/SignInForm.js +13 -16
  98. package/dist/auth/components/SignInForm.js.map +1 -1
  99. package/dist/auth/components/SignUpForm.js +15 -18
  100. package/dist/auth/components/SignUpForm.js.map +1 -1
  101. package/dist/auth/components/UserMenu.js +13 -16
  102. package/dist/auth/components/UserMenu.js.map +1 -1
  103. package/dist/auth/components/VerifyEmailNotice.js +10 -13
  104. package/dist/auth/components/VerifyEmailNotice.js.map +1 -1
  105. package/dist/auth/components/index.js +7 -18
  106. package/dist/auth/components/index.js.map +1 -1
  107. package/dist/auth/config.js +9 -49
  108. package/dist/auth/config.js.map +1 -1
  109. package/dist/auth/hooks/index.js +1 -5
  110. package/dist/auth/hooks/index.js.map +1 -1
  111. package/dist/auth/hooks/useAuth.js +14 -17
  112. package/dist/auth/hooks/useAuth.js.map +1 -1
  113. package/dist/auth/index.js +15 -37
  114. package/dist/auth/index.js.map +1 -1
  115. package/dist/auth/server/customer-service.js +39 -83
  116. package/dist/auth/server/customer-service.js.map +1 -1
  117. package/dist/auth/server/email-sender.js +11 -17
  118. package/dist/auth/server/email-sender.js.map +1 -1
  119. package/dist/auth/server/index.js +5 -36
  120. package/dist/auth/server/index.js.map +1 -1
  121. package/dist/auth/server/password-reset-service.js +30 -70
  122. package/dist/auth/server/password-reset-service.js.map +1 -1
  123. package/dist/auth/server/password.js +9 -18
  124. package/dist/auth/server/password.js.map +1 -1
  125. package/dist/auth/server/verification-service.js +35 -76
  126. package/dist/auth/server/verification-service.js.map +1 -1
  127. package/dist/auth/types.js +1 -2
  128. package/dist/auth/types.js.map +1 -1
  129. package/dist/cart/CartProvider.js +13 -17
  130. package/dist/cart/CartProvider.js.map +1 -1
  131. package/dist/cart/components/AddToCartButton.js +16 -19
  132. package/dist/cart/components/AddToCartButton.js.map +1 -1
  133. package/dist/cart/components/CartDrawer.js +17 -23
  134. package/dist/cart/components/CartDrawer.js.map +1 -1
  135. package/dist/cart/components/CartIcon.js +9 -12
  136. package/dist/cart/components/CartIcon.js.map +1 -1
  137. package/dist/cart/components/CartItem.js +7 -13
  138. package/dist/cart/components/CartItem.js.map +1 -1
  139. package/dist/cart/components/CartSummary.js +12 -15
  140. package/dist/cart/components/CartSummary.js.map +1 -1
  141. package/dist/cart/components/QuantitySelector.js +9 -12
  142. package/dist/cart/components/QuantitySelector.js.map +1 -1
  143. package/dist/cart/components/index.js +6 -15
  144. package/dist/cart/components/index.js.map +1 -1
  145. package/dist/cart/index.js +3 -17
  146. package/dist/cart/index.js.map +1 -1
  147. package/dist/cart/store.js +8 -13
  148. package/dist/cart/store.js.map +1 -1
  149. package/dist/checkout/api/checkout.js +12 -15
  150. package/dist/checkout/api/checkout.js.map +1 -1
  151. package/dist/checkout/api/index.js +2 -7
  152. package/dist/checkout/api/index.js.map +1 -1
  153. package/dist/checkout/api/webhook.js +8 -11
  154. package/dist/checkout/api/webhook.js.map +1 -1
  155. package/dist/checkout/components/CheckoutButton.js +8 -11
  156. package/dist/checkout/components/CheckoutButton.js.map +1 -1
  157. package/dist/checkout/components/CheckoutSuccess.js +11 -14
  158. package/dist/checkout/components/CheckoutSuccess.js.map +1 -1
  159. package/dist/checkout/components/OrderSummary.js +8 -11
  160. package/dist/checkout/components/OrderSummary.js.map +1 -1
  161. package/dist/checkout/components/ShippingForm.js +14 -17
  162. package/dist/checkout/components/ShippingForm.js.map +1 -1
  163. package/dist/checkout/components/index.js +4 -11
  164. package/dist/checkout/components/index.js.map +1 -1
  165. package/dist/checkout/hooks/index.js +1 -6
  166. package/dist/checkout/hooks/index.js.map +1 -1
  167. package/dist/checkout/hooks/useCheckout.js +10 -19
  168. package/dist/checkout/hooks/useCheckout.js.map +1 -1
  169. package/dist/checkout/index.js +7 -28
  170. package/dist/checkout/index.js.map +1 -1
  171. package/dist/checkout/server/create-checkout-session.js +11 -16
  172. package/dist/checkout/server/create-checkout-session.js.map +1 -1
  173. package/dist/checkout/server/handle-webhook.js +21 -24
  174. package/dist/checkout/server/handle-webhook.js.map +1 -1
  175. package/dist/checkout/server/index.js +3 -13
  176. package/dist/checkout/server/index.js.map +1 -1
  177. package/dist/checkout/server/order-service.js +11 -16
  178. package/dist/checkout/server/order-service.js.map +1 -1
  179. package/dist/checkout/stripe/client.js +13 -29
  180. package/dist/checkout/stripe/client.js.map +1 -1
  181. package/dist/checkout/stripe/index.js +1 -15
  182. package/dist/checkout/stripe/index.js.map +1 -1
  183. package/dist/checkout/types.js +1 -2
  184. package/dist/checkout/types.js.map +1 -1
  185. package/dist/core/config.js +12 -57
  186. package/dist/core/config.js.map +1 -1
  187. package/dist/core/db/client.js +16 -62
  188. package/dist/core/db/client.js.map +1 -1
  189. package/dist/core/db/index.js +14 -93
  190. package/dist/core/db/index.js.map +1 -1
  191. package/dist/core/db/queries.d.ts +6 -6
  192. package/dist/core/db/queries.js +207 -284
  193. package/dist/core/db/queries.js.map +1 -1
  194. package/dist/core/db/schema.js +179 -182
  195. package/dist/core/db/schema.js.map +1 -1
  196. package/dist/core/index.js +12 -42
  197. package/dist/core/index.js.map +1 -1
  198. package/dist/core/server/index.js +16 -68
  199. package/dist/core/server/index.js.map +1 -1
  200. package/dist/core/types.js +1 -2
  201. package/dist/core/types.js.map +1 -1
  202. package/dist/core/utils.js +26 -51
  203. package/dist/core/utils.js.map +1 -1
  204. package/dist/emails/config.js +13 -21
  205. package/dist/emails/config.js.map +1 -1
  206. package/dist/emails/index.js +10 -72
  207. package/dist/emails/index.js.map +1 -1
  208. package/dist/emails/send/auth.js +26 -34
  209. package/dist/emails/send/auth.js.map +1 -1
  210. package/dist/emails/send/index.js +2 -21
  211. package/dist/emails/send/index.js.map +1 -1
  212. package/dist/emails/send/orders.js +38 -50
  213. package/dist/emails/send/orders.js.map +1 -1
  214. package/dist/emails/sender.js +7 -12
  215. package/dist/emails/sender.js.map +1 -1
  216. package/dist/emails/templates/base.js +37 -53
  217. package/dist/emails/templates/base.js.map +1 -1
  218. package/dist/emails/templates/email-verification.js +12 -16
  219. package/dist/emails/templates/email-verification.js.map +1 -1
  220. package/dist/emails/templates/index.js +9 -43
  221. package/dist/emails/templates/index.js.map +1 -1
  222. package/dist/emails/templates/order-cancelled.js +18 -22
  223. package/dist/emails/templates/order-cancelled.js.map +1 -1
  224. package/dist/emails/templates/order-confirmation.js +30 -34
  225. package/dist/emails/templates/order-confirmation.js.map +1 -1
  226. package/dist/emails/templates/order-delivered.js +20 -24
  227. package/dist/emails/templates/order-delivered.js.map +1 -1
  228. package/dist/emails/templates/order-shipped.js +19 -23
  229. package/dist/emails/templates/order-shipped.js.map +1 -1
  230. package/dist/emails/templates/password-reset.js +12 -16
  231. package/dist/emails/templates/password-reset.js.map +1 -1
  232. package/dist/emails/templates/refund-processed.js +17 -21
  233. package/dist/emails/templates/refund-processed.js.map +1 -1
  234. package/dist/emails/templates/welcome.js +11 -15
  235. package/dist/emails/templates/welcome.js.map +1 -1
  236. package/dist/emails/types.js +1 -2
  237. package/dist/emails/types.js.map +1 -1
  238. package/dist/emails/utils.js +9 -20
  239. package/dist/emails/utils.js.map +1 -1
  240. package/dist/index.js +24 -176
  241. package/dist/index.js.map +1 -1
  242. package/dist/products/api/categories.js +7 -10
  243. package/dist/products/api/categories.js.map +1 -1
  244. package/dist/products/api/index.js +3 -9
  245. package/dist/products/api/index.js.map +1 -1
  246. package/dist/products/api/product.js +10 -13
  247. package/dist/products/api/product.js.map +1 -1
  248. package/dist/products/api/products.js +8 -11
  249. package/dist/products/api/products.js.map +1 -1
  250. package/dist/products/components/CategoryNav.js +20 -26
  251. package/dist/products/components/CategoryNav.js.map +1 -1
  252. package/dist/products/components/ProductBreadcrumb.js +7 -13
  253. package/dist/products/components/ProductBreadcrumb.js.map +1 -1
  254. package/dist/products/components/ProductCard.js +6 -12
  255. package/dist/products/components/ProductCard.js.map +1 -1
  256. package/dist/products/components/ProductDetails.js +14 -17
  257. package/dist/products/components/ProductDetails.js.map +1 -1
  258. package/dist/products/components/ProductFilters.js +15 -18
  259. package/dist/products/components/ProductFilters.js.map +1 -1
  260. package/dist/products/components/ProductGallery.js +17 -23
  261. package/dist/products/components/ProductGallery.js.map +1 -1
  262. package/dist/products/components/ProductGrid.js +10 -13
  263. package/dist/products/components/ProductGrid.js.map +1 -1
  264. package/dist/products/components/ProductSearch.js +14 -17
  265. package/dist/products/components/ProductSearch.js.map +1 -1
  266. package/dist/products/components/ProductSort.js +8 -11
  267. package/dist/products/components/ProductSort.js.map +1 -1
  268. package/dist/products/components/VariantSelector.js +16 -19
  269. package/dist/products/components/VariantSelector.js.map +1 -1
  270. package/dist/products/components/index.js +10 -23
  271. package/dist/products/components/index.js.map +1 -1
  272. package/dist/products/hooks/index.js +4 -11
  273. package/dist/products/hooks/index.js.map +1 -1
  274. package/dist/products/hooks/useCategories.js +12 -15
  275. package/dist/products/hooks/useCategories.js.map +1 -1
  276. package/dist/products/hooks/useProduct.js +9 -12
  277. package/dist/products/hooks/useProduct.js.map +1 -1
  278. package/dist/products/hooks/useProductAttributes.js +10 -13
  279. package/dist/products/hooks/useProductAttributes.js.map +1 -1
  280. package/dist/products/hooks/useProducts.js +15 -18
  281. package/dist/products/hooks/useProducts.js.map +1 -1
  282. package/dist/products/index.js +6 -23
  283. package/dist/products/index.js.map +1 -1
  284. package/dist/theme/ThemeProvider.js +12 -14
  285. package/dist/theme/ThemeProvider.js.map +1 -1
  286. package/dist/theme/colors.js +3 -8
  287. package/dist/theme/colors.js.map +1 -1
  288. package/dist/theme/defaults.js +27 -30
  289. package/dist/theme/defaults.js.map +1 -1
  290. package/dist/theme/fonts.js +12 -18
  291. package/dist/theme/fonts.js.map +1 -1
  292. package/dist/theme/generator.js +63 -69
  293. package/dist/theme/generator.js.map +1 -1
  294. package/dist/theme/hooks.js +11 -16
  295. package/dist/theme/hooks.js.map +1 -1
  296. package/dist/theme/index.js +6 -42
  297. package/dist/theme/index.js.map +1 -1
  298. package/package.json +31 -30
@@ -1,14 +1,10 @@
1
- "use strict";
2
1
  /**
3
2
  * @rovela/sdk/emails/templates/email-verification
4
3
  *
5
4
  * Email verification template for new account signups.
6
5
  */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.renderEmailVerification = renderEmailVerification;
9
- exports.getEmailVerificationSubject = getEmailVerificationSubject;
10
- const utils_1 = require("../utils");
11
- const base_1 = require("./base");
6
+ import { escapeHtml } from '../utils';
7
+ import { baseLayout, heading, paragraph, primaryButton, linkFallback, } from './base';
12
8
  /**
13
9
  * Render the email verification template.
14
10
  *
@@ -25,23 +21,23 @@ const base_1 = require("./base");
25
21
  * })
26
22
  * ```
27
23
  */
28
- function renderEmailVerification(data) {
24
+ export function renderEmailVerification(data) {
29
25
  const content = `
30
- ${(0, base_1.heading)('Verify Your Email Address')}
26
+ ${heading('Verify Your Email Address')}
31
27
 
32
- ${(0, base_1.paragraph)(`Hi ${(0, utils_1.escapeHtml)(data.customerName)},`)}
28
+ ${paragraph(`Hi ${escapeHtml(data.customerName)},`)}
33
29
 
34
- ${(0, base_1.paragraph)(`Thanks for signing up with ${(0, utils_1.escapeHtml)(data.config.storeName)}! To complete your registration and start shopping, please verify your email address by clicking the button below.`, '32px')}
30
+ ${paragraph(`Thanks for signing up with ${escapeHtml(data.config.storeName)}! To complete your registration and start shopping, please verify your email address by clicking the button below.`, '32px')}
35
31
 
36
- ${(0, base_1.primaryButton)('Verify Email Address', data.verificationLink)}
32
+ ${primaryButton('Verify Email Address', data.verificationLink)}
37
33
 
38
- ${(0, base_1.paragraph)(`This link will expire in ${(0, utils_1.escapeHtml)(data.expiryTime)} ${data.expiryTime === '1' ? 'hour' : 'hours'} for security reasons.`, '24px')}
34
+ ${paragraph(`This link will expire in ${escapeHtml(data.expiryTime)} ${data.expiryTime === '1' ? 'hour' : 'hours'} for security reasons.`, '24px')}
39
35
 
40
- ${(0, base_1.paragraph)("If you didn't create an account with us, you can safely ignore this email.", '24px')}
36
+ ${paragraph("If you didn't create an account with us, you can safely ignore this email.", '24px')}
41
37
 
42
- ${(0, base_1.linkFallback)(data.verificationLink)}
38
+ ${linkFallback(data.verificationLink)}
43
39
  `;
44
- return (0, base_1.baseLayout)({
40
+ return baseLayout({
45
41
  config: data.config,
46
42
  title: 'Verify Your Email Address',
47
43
  content,
@@ -50,7 +46,7 @@ function renderEmailVerification(data) {
50
46
  /**
51
47
  * Get the subject line for email verification emails.
52
48
  */
53
- function getEmailVerificationSubject(storeName) {
49
+ export function getEmailVerificationSubject(storeName) {
54
50
  return `Verify your email address - ${storeName}`;
55
51
  }
56
52
  //# sourceMappingURL=email-verification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"email-verification.js","sourceRoot":"","sources":["../../../src/emails/templates/email-verification.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA4BH,0DA+BC;AAKD,kEAEC;AA/DD,oCAAqC;AACrC,iCAMe;AAEf;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,uBAAuB,CAAC,IAA2B;IACjE,MAAM,OAAO,GAAG;MACZ,IAAA,cAAO,EAAC,2BAA2B,CAAC;;MAEpC,IAAA,gBAAS,EAAC,MAAM,IAAA,kBAAU,EAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;;MAEjD,IAAA,gBAAS,EACT,8BAA8B,IAAA,kBAAU,EAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,oHAAoH,EACnL,MAAM,CACP;;MAEC,IAAA,oBAAa,EAAC,sBAAsB,EAAE,IAAI,CAAC,gBAAgB,CAAC;;MAE5D,IAAA,gBAAS,EACT,4BAA4B,IAAA,kBAAU,EAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,wBAAwB,EAC7H,MAAM,CACP;;MAEC,IAAA,gBAAS,EACT,4EAA4E,EAC5E,MAAM,CACP;;MAEC,IAAA,mBAAY,EAAC,IAAI,CAAC,gBAAgB,CAAC;GACtC,CAAA;IAED,OAAO,IAAA,iBAAU,EAAC;QAChB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,KAAK,EAAE,2BAA2B;QAClC,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,2BAA2B,CAAC,SAAiB;IAC3D,OAAO,+BAA+B,SAAS,EAAE,CAAA;AACnD,CAAC"}
1
+ {"version":3,"file":"email-verification.js","sourceRoot":"","sources":["../../../src/emails/templates/email-verification.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,aAAa,EACb,YAAY,GACb,MAAM,QAAQ,CAAA;AAEf;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA2B;IACjE,MAAM,OAAO,GAAG;MACZ,OAAO,CAAC,2BAA2B,CAAC;;MAEpC,SAAS,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;;MAEjD,SAAS,CACT,8BAA8B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,oHAAoH,EACnL,MAAM,CACP;;MAEC,aAAa,CAAC,sBAAsB,EAAE,IAAI,CAAC,gBAAgB,CAAC;;MAE5D,SAAS,CACT,4BAA4B,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,wBAAwB,EAC7H,MAAM,CACP;;MAEC,SAAS,CACT,4EAA4E,EAC5E,MAAM,CACP;;MAEC,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC;GACtC,CAAA;IAED,OAAO,UAAU,CAAC;QAChB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,KAAK,EAAE,2BAA2B;QAClC,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAiB;IAC3D,OAAO,+BAA+B,SAAS,EAAE,CAAA;AACnD,CAAC"}
@@ -1,58 +1,24 @@
1
- "use strict";
2
1
  /**
3
2
  * @rovela/sdk/emails/templates
4
3
  *
5
4
  * Email template render functions.
6
5
  */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.getRefundProcessedSubject = exports.renderRefundProcessed = exports.getOrderCancelledSubject = exports.renderOrderCancelled = exports.getOrderDeliveredSubject = exports.renderOrderDelivered = exports.getOrderShippedSubject = exports.renderOrderShipped = exports.getOrderConfirmationSubject = exports.renderOrderConfirmation = exports.getPasswordResetSubject = exports.renderPasswordResetEmail = exports.getWelcomeEmailSubject = exports.renderWelcomeEmail = exports.getEmailVerificationSubject = exports.renderEmailVerification = exports.STYLES = exports.sectionHeading = exports.addressSection = exports.secondaryButton = exports.highlightBox = exports.labeledValueRow = exports.labeledValue = exports.statusBadge = exports.detailBox = exports.linkFallback = exports.infoBox = exports.paragraph = exports.heading = exports.primaryButton = exports.baseLayout = void 0;
9
6
  // =============================================================================
10
7
  // Base Components
11
8
  // =============================================================================
12
- var base_1 = require("./base");
13
- Object.defineProperty(exports, "baseLayout", { enumerable: true, get: function () { return base_1.baseLayout; } });
14
- Object.defineProperty(exports, "primaryButton", { enumerable: true, get: function () { return base_1.primaryButton; } });
15
- Object.defineProperty(exports, "heading", { enumerable: true, get: function () { return base_1.heading; } });
16
- Object.defineProperty(exports, "paragraph", { enumerable: true, get: function () { return base_1.paragraph; } });
17
- Object.defineProperty(exports, "infoBox", { enumerable: true, get: function () { return base_1.infoBox; } });
18
- Object.defineProperty(exports, "linkFallback", { enumerable: true, get: function () { return base_1.linkFallback; } });
19
- Object.defineProperty(exports, "detailBox", { enumerable: true, get: function () { return base_1.detailBox; } });
20
- Object.defineProperty(exports, "statusBadge", { enumerable: true, get: function () { return base_1.statusBadge; } });
21
- Object.defineProperty(exports, "labeledValue", { enumerable: true, get: function () { return base_1.labeledValue; } });
22
- Object.defineProperty(exports, "labeledValueRow", { enumerable: true, get: function () { return base_1.labeledValueRow; } });
23
- Object.defineProperty(exports, "highlightBox", { enumerable: true, get: function () { return base_1.highlightBox; } });
24
- Object.defineProperty(exports, "secondaryButton", { enumerable: true, get: function () { return base_1.secondaryButton; } });
25
- Object.defineProperty(exports, "addressSection", { enumerable: true, get: function () { return base_1.addressSection; } });
26
- Object.defineProperty(exports, "sectionHeading", { enumerable: true, get: function () { return base_1.sectionHeading; } });
27
- Object.defineProperty(exports, "STYLES", { enumerable: true, get: function () { return base_1.STYLES; } });
9
+ export { baseLayout, primaryButton, heading, paragraph, infoBox, linkFallback, detailBox, statusBadge, labeledValue, labeledValueRow, highlightBox, secondaryButton, addressSection, sectionHeading, STYLES, } from './base';
28
10
  // =============================================================================
29
11
  // Auth Templates
30
12
  // =============================================================================
31
- var email_verification_1 = require("./email-verification");
32
- Object.defineProperty(exports, "renderEmailVerification", { enumerable: true, get: function () { return email_verification_1.renderEmailVerification; } });
33
- Object.defineProperty(exports, "getEmailVerificationSubject", { enumerable: true, get: function () { return email_verification_1.getEmailVerificationSubject; } });
34
- var welcome_1 = require("./welcome");
35
- Object.defineProperty(exports, "renderWelcomeEmail", { enumerable: true, get: function () { return welcome_1.renderWelcomeEmail; } });
36
- Object.defineProperty(exports, "getWelcomeEmailSubject", { enumerable: true, get: function () { return welcome_1.getWelcomeEmailSubject; } });
37
- var password_reset_1 = require("./password-reset");
38
- Object.defineProperty(exports, "renderPasswordResetEmail", { enumerable: true, get: function () { return password_reset_1.renderPasswordResetEmail; } });
39
- Object.defineProperty(exports, "getPasswordResetSubject", { enumerable: true, get: function () { return password_reset_1.getPasswordResetSubject; } });
13
+ export { renderEmailVerification, getEmailVerificationSubject, } from './email-verification';
14
+ export { renderWelcomeEmail, getWelcomeEmailSubject } from './welcome';
15
+ export { renderPasswordResetEmail, getPasswordResetSubject, } from './password-reset';
40
16
  // =============================================================================
41
17
  // Order Templates
42
18
  // =============================================================================
43
- var order_confirmation_1 = require("./order-confirmation");
44
- Object.defineProperty(exports, "renderOrderConfirmation", { enumerable: true, get: function () { return order_confirmation_1.renderOrderConfirmation; } });
45
- Object.defineProperty(exports, "getOrderConfirmationSubject", { enumerable: true, get: function () { return order_confirmation_1.getOrderConfirmationSubject; } });
46
- var order_shipped_1 = require("./order-shipped");
47
- Object.defineProperty(exports, "renderOrderShipped", { enumerable: true, get: function () { return order_shipped_1.renderOrderShipped; } });
48
- Object.defineProperty(exports, "getOrderShippedSubject", { enumerable: true, get: function () { return order_shipped_1.getOrderShippedSubject; } });
49
- var order_delivered_1 = require("./order-delivered");
50
- Object.defineProperty(exports, "renderOrderDelivered", { enumerable: true, get: function () { return order_delivered_1.renderOrderDelivered; } });
51
- Object.defineProperty(exports, "getOrderDeliveredSubject", { enumerable: true, get: function () { return order_delivered_1.getOrderDeliveredSubject; } });
52
- var order_cancelled_1 = require("./order-cancelled");
53
- Object.defineProperty(exports, "renderOrderCancelled", { enumerable: true, get: function () { return order_cancelled_1.renderOrderCancelled; } });
54
- Object.defineProperty(exports, "getOrderCancelledSubject", { enumerable: true, get: function () { return order_cancelled_1.getOrderCancelledSubject; } });
55
- var refund_processed_1 = require("./refund-processed");
56
- Object.defineProperty(exports, "renderRefundProcessed", { enumerable: true, get: function () { return refund_processed_1.renderRefundProcessed; } });
57
- Object.defineProperty(exports, "getRefundProcessedSubject", { enumerable: true, get: function () { return refund_processed_1.getRefundProcessedSubject; } });
19
+ export { renderOrderConfirmation, getOrderConfirmationSubject, } from './order-confirmation';
20
+ export { renderOrderShipped, getOrderShippedSubject } from './order-shipped';
21
+ export { renderOrderDelivered, getOrderDeliveredSubject, } from './order-delivered';
22
+ export { renderOrderCancelled, getOrderCancelledSubject, } from './order-cancelled';
23
+ export { renderRefundProcessed, getRefundProcessedSubject, } from './refund-processed';
58
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/emails/templates/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,+BAgBe;AAfb,kGAAA,UAAU,OAAA;AACV,qGAAA,aAAa,OAAA;AACb,+FAAA,OAAO,OAAA;AACP,iGAAA,SAAS,OAAA;AACT,+FAAA,OAAO,OAAA;AACP,oGAAA,YAAY,OAAA;AACZ,iGAAA,SAAS,OAAA;AACT,mGAAA,WAAW,OAAA;AACX,oGAAA,YAAY,OAAA;AACZ,uGAAA,eAAe,OAAA;AACf,oGAAA,YAAY,OAAA;AACZ,uGAAA,eAAe,OAAA;AACf,sGAAA,cAAc,OAAA;AACd,sGAAA,cAAc,OAAA;AACd,8FAAA,MAAM,OAAA;AAGR,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF,2DAG6B;AAF3B,6HAAA,uBAAuB,OAAA;AACvB,iIAAA,2BAA2B,OAAA;AAG7B,qCAAsE;AAA7D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AO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAE5E,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAA"}
@@ -1,14 +1,10 @@
1
- "use strict";
2
1
  /**
3
2
  * @rovela/sdk/emails/templates/order-cancelled
4
3
  *
5
4
  * Order cancelled email template.
6
5
  */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.renderOrderCancelled = renderOrderCancelled;
9
- exports.getOrderCancelledSubject = getOrderCancelledSubject;
10
- const utils_1 = require("../utils");
11
- const base_1 = require("./base");
6
+ import { escapeHtml } from '../utils';
7
+ import { baseLayout, heading, paragraph, primaryButton, labeledValue, highlightBox, STYLES, } from './base';
12
8
  // =============================================================================
13
9
  // Main Template
14
10
  // =============================================================================
@@ -30,20 +26,20 @@ const base_1 = require("./base");
30
26
  * })
31
27
  * ```
32
28
  */
33
- function renderOrderCancelled(data) {
29
+ export function renderOrderCancelled(data) {
34
30
  // Build cancellation reason text
35
31
  const reasonText = data.cancellationReason
36
- ? ` ${(0, utils_1.escapeHtml)(data.cancellationReason)}`
32
+ ? ` ${escapeHtml(data.cancellationReason)}`
37
33
  : '';
38
34
  // Order details box
39
35
  const orderDetailsBox = `
40
- <div style="padding: 24px; background-color: ${base_1.STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${base_1.STYLES.cardBorder}; margin-bottom: 32px;">
36
+ <div style="padding: 24px; background-color: ${STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${STYLES.cardBorder}; margin-bottom: 32px;">
41
37
  <table width="100%" cellpadding="0" cellspacing="0">
42
- ${(0, base_1.labeledValue)('Order Number', `#${data.orderNumber}`, {
38
+ ${labeledValue('Order Number', `#${data.orderNumber}`, {
43
39
  valueSize: '16px',
44
40
  borderBottom: true,
45
41
  })}
46
- ${(0, base_1.labeledValue)('Cancelled On', data.cancellationDate, {
42
+ ${labeledValue('Cancelled On', data.cancellationDate, {
47
43
  valueSize: '16px',
48
44
  borderTop: true,
49
45
  })}
@@ -51,28 +47,28 @@ function renderOrderCancelled(data) {
51
47
  </div>
52
48
  `;
53
49
  // Refund information box
54
- const refundInfoBox = (0, base_1.highlightBox)(`
55
- <h3 style="margin: 0 0 12px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 18px; font-weight: 600; color: ${base_1.STYLES.textPrimary};">Refund Information</h3>
56
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 400; line-height: 1.5; color: ${base_1.STYLES.textSecondary};">
57
- ${(0, utils_1.escapeHtml)(data.refundMessage)}
50
+ const refundInfoBox = highlightBox(`
51
+ <h3 style="margin: 0 0 12px 0; font-family: ${STYLES.fontFamily}; font-size: 18px; font-weight: 600; color: ${STYLES.textPrimary};">Refund Information</h3>
52
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 400; line-height: 1.5; color: ${STYLES.textSecondary};">
53
+ ${escapeHtml(data.refundMessage)}
58
54
  </p>
59
55
  `);
60
56
  const content = `
61
- ${(0, base_1.heading)('Order Cancelled')}
57
+ ${heading('Order Cancelled')}
62
58
 
63
- ${(0, base_1.paragraph)(`Hi ${(0, utils_1.escapeHtml)(data.customerName)},`)}
59
+ ${paragraph(`Hi ${escapeHtml(data.customerName)},`)}
64
60
 
65
- ${(0, base_1.paragraph)(`Your order #${(0, utils_1.escapeHtml)(data.orderNumber)} has been cancelled as requested.${reasonText}`, '32px')}
61
+ ${paragraph(`Your order #${escapeHtml(data.orderNumber)} has been cancelled as requested.${reasonText}`, '32px')}
66
62
 
67
63
  ${orderDetailsBox}
68
64
 
69
65
  ${refundInfoBox}
70
66
 
71
- ${(0, base_1.paragraph)("If you have any questions about this cancellation, please don't hesitate to reach out to our support team.", '32px')}
67
+ ${paragraph("If you have any questions about this cancellation, please don't hesitate to reach out to our support team.", '32px')}
72
68
 
73
- ${(0, base_1.primaryButton)('Continue Shopping', data.config.shopUrl)}
69
+ ${primaryButton('Continue Shopping', data.config.shopUrl)}
74
70
  `;
75
- return (0, base_1.baseLayout)({
71
+ return baseLayout({
76
72
  config: data.config,
77
73
  title: `Order Cancelled - #${data.orderNumber}`,
78
74
  content,
@@ -81,7 +77,7 @@ function renderOrderCancelled(data) {
81
77
  /**
82
78
  * Get the subject line for order cancelled emails.
83
79
  */
84
- function getOrderCancelledSubject(storeName, orderNumber) {
80
+ export function getOrderCancelledSubject(storeName, orderNumber) {
85
81
  return `Order Cancelled - #${orderNumber} | ${storeName}`;
86
82
  }
87
83
  //# sourceMappingURL=order-cancelled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"order-cancelled.js","sourceRoot":"","sources":["../../../src/emails/templates/order-cancelled.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAoCH,oDAyDC;AAKD,4DAKC;AApGD,oCAAqC;AACrC,iCAQe;AAEf,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,oBAAoB,CAAC,IAAwB;IAC3D,iCAAiC;IACjC,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB;QACxC,CAAC,CAAC,IAAI,IAAA,kBAAU,EAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE;QAC3C,CAAC,CAAC,EAAE,CAAA;IAEN,oBAAoB;IACpB,MAAM,eAAe,GAAG;mDACyB,aAAM,CAAC,gBAAgB,4CAA4C,aAAM,CAAC,UAAU;;UAE7H,IAAA,mBAAY,EAAC,cAAc,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;QACrD,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,IAAI;KACnB,CAAC;UACA,IAAA,mBAAY,EAAC,cAAc,EAAE,IAAI,CAAC,gBAAgB,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AAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;GAC1D,CAAA;IAED,OAAO,UAAU,CAAC;QAChB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,KAAK,EAAE,sBAAsB,IAAI,CAAC,WAAW,EAAE;QAC/C,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,SAAiB,EACjB,WAAmB;IAEnB,OAAO,sBAAsB,WAAW,MAAM,SAAS,EAAE,CAAA;AAC3D,CAAC"}
@@ -1,21 +1,17 @@
1
- "use strict";
2
1
  /**
3
2
  * @rovela/sdk/emails/templates/order-confirmation
4
3
  *
5
4
  * Order confirmation email template.
6
5
  */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.renderOrderConfirmation = renderOrderConfirmation;
9
- exports.getOrderConfirmationSubject = getOrderConfirmationSubject;
10
- const utils_1 = require("../utils");
11
- const base_1 = require("./base");
6
+ import { escapeHtml, formatAddressHtml } from '../utils';
7
+ import { baseLayout, statusBadge, heading, primaryButton, labeledValueRow, labeledValue, sectionHeading, addressSection, STYLES, } from './base';
12
8
  // =============================================================================
13
9
  // Order Item Component
14
10
  // =============================================================================
15
11
  function renderOrderItem(item) {
16
12
  const imageHtml = item.imageUrl
17
13
  ? `<td width="80" style="padding-right: 16px;">
18
- <img src="${(0, utils_1.escapeHtml)(item.imageUrl)}" alt="${(0, utils_1.escapeHtml)(item.name)}" style="width: 80px; height: 80px; border-radius: 8px; object-fit: cover; border: 1px solid ${base_1.STYLES.cardBorder};" />
14
+ <img src="${escapeHtml(item.imageUrl)}" alt="${escapeHtml(item.name)}" style="width: 80px; height: 80px; border-radius: 8px; object-fit: cover; border: 1px solid ${STYLES.cardBorder};" />
19
15
  </td>`
20
16
  : '';
21
17
  return `
@@ -23,9 +19,9 @@ function renderOrderItem(item) {
23
19
  <tr>
24
20
  ${imageHtml}
25
21
  <td>
26
- <p style="margin: 0 0 4px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 16px; font-weight: 600; color: ${base_1.STYLES.textPrimary};">${(0, utils_1.escapeHtml)(item.name)}</p>
27
- <p style="margin: 0 0 8px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${base_1.STYLES.textSecondary};">Quantity: ${item.quantity}</p>
28
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 16px; font-weight: 600; color: ${base_1.STYLES.textPrimary};">${(0, utils_1.escapeHtml)(item.price)}</p>
22
+ <p style="margin: 0 0 4px 0; font-family: ${STYLES.fontFamily}; font-size: 16px; font-weight: 600; color: ${STYLES.textPrimary};">${escapeHtml(item.name)}</p>
23
+ <p style="margin: 0 0 8px 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${STYLES.textSecondary};">Quantity: ${item.quantity}</p>
24
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 16px; font-weight: 600; color: ${STYLES.textPrimary};">${escapeHtml(item.price)}</p>
29
25
  </td>
30
26
  </tr>
31
27
  </table>
@@ -39,38 +35,38 @@ function renderOrderItems(items) {
39
35
  // =============================================================================
40
36
  function renderOrderSummary(data) {
41
37
  return `
42
- <div style="padding: 24px; background-color: ${base_1.STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${base_1.STYLES.cardBorder}; margin-bottom: 32px;">
38
+ <div style="padding: 24px; background-color: ${STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${STYLES.cardBorder}; margin-bottom: 32px;">
43
39
  <table width="100%" cellpadding="0" cellspacing="0">
44
40
  <tr>
45
41
  <td style="padding-bottom: 8px;">
46
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${base_1.STYLES.textSecondary};">Subtotal</p>
42
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${STYLES.textSecondary};">Subtotal</p>
47
43
  </td>
48
44
  <td align="right" style="padding-bottom: 8px;">
49
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 500; color: ${base_1.STYLES.textPrimary};">${(0, utils_1.escapeHtml)(data.subtotal)}</p>
45
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 500; color: ${STYLES.textPrimary};">${escapeHtml(data.subtotal)}</p>
50
46
  </td>
51
47
  </tr>
52
48
  <tr>
53
49
  <td style="padding-bottom: 8px;">
54
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${base_1.STYLES.textSecondary};">Shipping</p>
50
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${STYLES.textSecondary};">Shipping</p>
55
51
  </td>
56
52
  <td align="right" style="padding-bottom: 8px;">
57
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 500; color: ${base_1.STYLES.textPrimary};">${(0, utils_1.escapeHtml)(data.shippingCost)}</p>
53
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 500; color: ${STYLES.textPrimary};">${escapeHtml(data.shippingCost)}</p>
58
54
  </td>
59
55
  </tr>
60
56
  <tr>
61
57
  <td style="padding-bottom: 8px;">
62
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${base_1.STYLES.textSecondary};">Tax</p>
58
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 400; color: ${STYLES.textSecondary};">Tax</p>
63
59
  </td>
64
60
  <td align="right" style="padding-bottom: 8px;">
65
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 500; color: ${base_1.STYLES.textPrimary};">${(0, utils_1.escapeHtml)(data.tax)}</p>
61
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 500; color: ${STYLES.textPrimary};">${escapeHtml(data.tax)}</p>
66
62
  </td>
67
63
  </tr>
68
64
  <tr>
69
- <td style="padding-top: 16px; border-top: 1px solid ${base_1.STYLES.cardBorder};">
70
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 18px; font-weight: 700; color: ${base_1.STYLES.textPrimary};">Total</p>
65
+ <td style="padding-top: 16px; border-top: 1px solid ${STYLES.cardBorder};">
66
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 18px; font-weight: 700; color: ${STYLES.textPrimary};">Total</p>
71
67
  </td>
72
- <td align="right" style="padding-top: 16px; border-top: 1px solid ${base_1.STYLES.cardBorder};">
73
- <p style="margin: 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 18px; font-weight: 700; color: ${base_1.STYLES.textPrimary};">${(0, utils_1.escapeHtml)(data.total)}</p>
68
+ <td align="right" style="padding-top: 16px; border-top: 1px solid ${STYLES.cardBorder};">
69
+ <p style="margin: 0; font-family: ${STYLES.fontFamily}; font-size: 18px; font-weight: 700; color: ${STYLES.textPrimary};">${escapeHtml(data.total)}</p>
74
70
  </td>
75
71
  </tr>
76
72
  </table>
@@ -104,15 +100,15 @@ function renderOrderSummary(data) {
104
100
  * })
105
101
  * ```
106
102
  */
107
- function renderOrderConfirmation(data) {
103
+ export function renderOrderConfirmation(data) {
108
104
  // Build the badge separately since it needs special positioning
109
- const badge = (0, base_1.statusBadge)('Order Confirmed');
105
+ const badge = statusBadge('Order Confirmed');
110
106
  // Order details box
111
107
  const orderDetailsBox = `
112
- <div style="padding: 24px; background-color: ${base_1.STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${base_1.STYLES.cardBorder}; margin-bottom: 32px;">
108
+ <div style="padding: 24px; background-color: ${STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${STYLES.cardBorder}; margin-bottom: 32px;">
113
109
  <table width="100%" cellpadding="0" cellspacing="0">
114
- ${(0, base_1.labeledValueRow)({ label: 'Order Number', value: `#${data.orderNumber}` }, { label: 'Order Date', value: data.orderDate }, true)}
115
- ${(0, base_1.labeledValue)('Payment Status', data.paymentStatus, {
110
+ ${labeledValueRow({ label: 'Order Number', value: `#${data.orderNumber}` }, { label: 'Order Date', value: data.orderDate }, true)}
111
+ ${labeledValue('Payment Status', data.paymentStatus, {
116
112
  valueColor: '#10B981',
117
113
  valueSize: '16px',
118
114
  borderTop: true,
@@ -122,16 +118,16 @@ function renderOrderConfirmation(data) {
122
118
  `;
123
119
  const content = `
124
120
  ${badge}
125
- ${(0, base_1.heading)('Thank You for Your Order!')}
121
+ ${heading('Thank You for Your Order!')}
126
122
 
127
- <p style="margin: 0 0 32px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 16px; font-weight: 400; line-height: 1.625; color: ${base_1.STYLES.textSecondary}; text-align: center;">
128
- Hi ${(0, utils_1.escapeHtml)(data.customerName)}, we've received your order and we're getting it ready. You'll receive a shipping confirmation email once your order is on its way.
123
+ <p style="margin: 0 0 32px 0; font-family: ${STYLES.fontFamily}; font-size: 16px; font-weight: 400; line-height: 1.625; color: ${STYLES.textSecondary}; text-align: center;">
124
+ Hi ${escapeHtml(data.customerName)}, we've received your order and we're getting it ready. You'll receive a shipping confirmation email once your order is on its way.
129
125
  </p>
130
126
 
131
127
  ${orderDetailsBox}
132
128
 
133
129
  <div style="margin-bottom: 32px;">
134
- ${(0, base_1.sectionHeading)('Order Items')}
130
+ ${sectionHeading('Order Items')}
135
131
  ${renderOrderItems(data.items)}
136
132
  </div>
137
133
 
@@ -142,11 +138,11 @@ function renderOrderConfirmation(data) {
142
138
  total: data.total,
143
139
  })}
144
140
 
145
- ${(0, base_1.addressSection)('Shipping Address', (0, utils_1.formatAddressHtml)(data.shippingAddress))}
141
+ ${addressSection('Shipping Address', formatAddressHtml(data.shippingAddress))}
146
142
 
147
- ${(0, base_1.primaryButton)('Track Your Order', data.orderTrackingUrl)}
143
+ ${primaryButton('Track Your Order', data.orderTrackingUrl)}
148
144
  `;
149
- return (0, base_1.baseLayout)({
145
+ return baseLayout({
150
146
  config: data.config,
151
147
  title: `Order Confirmation - #${data.orderNumber}`,
152
148
  content,
@@ -155,7 +151,7 @@ function renderOrderConfirmation(data) {
155
151
  /**
156
152
  * Get the subject line for order confirmation emails.
157
153
  */
158
- function getOrderConfirmationSubject(storeName, orderNumber) {
154
+ export function getOrderConfirmationSubject(storeName, orderNumber) {
159
155
  return `Order Confirmed - #${orderNumber} | ${storeName}`;
160
156
  }
161
157
  //# sourceMappingURL=order-confirmation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"order-confirmation.js","sourceRoot":"","sources":["../../../src/emails/templates/order-confirmation.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA4HH,0DAsDC;AAKD,kEAKC;AAzLD,oCAAwD;AACxD,iCAWe;AAEf,gFAAgF;AAChF,uBAAuB;AACvB,gFAAgF;AAEhF,SAAS,eAAe,CAAC,IAAoB;IAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ;QAC7B,CAAC,CAAC;oBACc,IAAA,kBAAU,EAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAA,kBAAU,EAAC,IAAI,CAAC,IAAI,CAAC,gGAAgG,aAAM,CAAC,UAAU;YACjL;QACR,CAAC,CAAC,EAAE,CAAA;IAEN,OAAO;;;UAGC,SAAS;;sDAEmC,aAAM,CAAC,UAAU,+CAA+C,aAAM,CAAC,WAAW,MAAM,IAAA,kBAAU,EAAC,IAAI,CAAC,IAAI,CAAC;sDAC7G,aAAM,CAAC,UAAU,+CAA+C,aAAM,CAAC,aAAa,gBAAgB,IAAI,CAAC,QAAQ;8CACzH,aAAM,CAAC,UAAU,+CAA+C,aAAM,CAAC,WAAW,MAAM,IAAA,kBAAU,EAAC,IAAI,CAAC,KAAK,CAAC;;;;GAIzJ,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAuB;IAC/C,OAAO,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC5C,CAAC;A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C;;;GAGP,CAAA;IAED,MAAM,OAAO,GAAG;MACZ,KAAK;MACL,OAAO,CAAC,2BAA2B,CAAC;;iDAEO,MAAM,CAAC,UAAU,mEAAmE,MAAM,CAAC,aAAa;WAC9I,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;;;MAGlC,eAAe;;;QAGb,cAAc,CAAC,aAAa,CAAC;QAC7B,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC;;;MAG9B,kBAAkB,CAAC;QACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,KAAK,EAAE,IAAI,CAAC,KAAK;KAClB,CAAC;;MAEA,cAAc,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;;MAE3E,aAAa,CAAC,kBAAkB,EAAE,IAAI,CAAC,gBAAgB,CAAC;GAC3D,CAAA;IAED,OAAO,UAAU,CAAC;QAChB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,KAAK,EAAE,yBAAyB,IAAI,CAAC,WAAW,EAAE;QAClD,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CACzC,SAAiB,EACjB,WAAmB;IAEnB,OAAO,sBAAsB,WAAW,MAAM,SAAS,EAAE,CAAA;AAC3D,CAAC"}
@@ -1,14 +1,10 @@
1
- "use strict";
2
1
  /**
3
2
  * @rovela/sdk/emails/templates/order-delivered
4
3
  *
5
4
  * Order delivered email template.
6
5
  */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.renderOrderDelivered = renderOrderDelivered;
9
- exports.getOrderDeliveredSubject = getOrderDeliveredSubject;
10
- const utils_1 = require("../utils");
11
- const base_1 = require("./base");
6
+ import { escapeHtml } from '../utils';
7
+ import { baseLayout, statusBadge, heading, secondaryButton, labeledValue, highlightBox, paragraph, STYLES, } from './base';
12
8
  // =============================================================================
13
9
  // Main Template
14
10
  // =============================================================================
@@ -31,19 +27,19 @@ const base_1 = require("./base");
31
27
  * })
32
28
  * ```
33
29
  */
34
- function renderOrderDelivered(data) {
35
- const badge = (0, base_1.statusBadge)('Delivered');
30
+ export function renderOrderDelivered(data) {
31
+ const badge = statusBadge('Delivered');
36
32
  // Delivery details box
37
33
  const deliveryDetailsBox = `
38
- <div style="padding: 24px; background-color: ${base_1.STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${base_1.STYLES.cardBorder}; margin-bottom: 32px;">
34
+ <div style="padding: 24px; background-color: ${STYLES.footerBackground}; border-radius: 16px; border: 1px solid ${STYLES.cardBorder}; margin-bottom: 32px;">
39
35
  <table width="100%" cellpadding="0" cellspacing="0">
40
- ${(0, base_1.labeledValue)('Order Number', `#${data.orderNumber}`, { borderBottom: true })}
41
- ${(0, base_1.labeledValue)('Delivered On', data.deliveryDate, {
42
- valueColor: base_1.STYLES.primaryColor,
36
+ ${labeledValue('Order Number', `#${data.orderNumber}`, { borderBottom: true })}
37
+ ${labeledValue('Delivered On', data.deliveryDate, {
38
+ valueColor: STYLES.primaryColor,
43
39
  borderTop: true,
44
40
  borderBottom: true,
45
41
  })}
46
- ${(0, base_1.labeledValue)('Delivered To', data.deliveryLocation, {
42
+ ${labeledValue('Delivered To', data.deliveryLocation, {
47
43
  valueSize: '16px',
48
44
  borderTop: true,
49
45
  })}
@@ -51,36 +47,36 @@ function renderOrderDelivered(data) {
51
47
  </div>
52
48
  `;
53
49
  // Feedback section
54
- const feedbackSection = (0, base_1.highlightBox)(`
55
- <h3 style="margin: 0 0 12px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 20px; font-weight: 600; color: ${base_1.STYLES.textPrimary}; text-align: center;">How's Everything?</h3>
56
- <p style="margin: 0 0 20px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 14px; font-weight: 400; line-height: 1.5; color: ${base_1.STYLES.textSecondary}; text-align: center;">
50
+ const feedbackSection = highlightBox(`
51
+ <h3 style="margin: 0 0 12px 0; font-family: ${STYLES.fontFamily}; font-size: 20px; font-weight: 600; color: ${STYLES.textPrimary}; text-align: center;">How's Everything?</h3>
52
+ <p style="margin: 0 0 20px 0; font-family: ${STYLES.fontFamily}; font-size: 14px; font-weight: 400; line-height: 1.5; color: ${STYLES.textSecondary}; text-align: center;">
57
53
  We'd love to hear your feedback! Your review helps other customers and helps us improve.
58
54
  </p>
59
55
  <table width="100%" cellpadding="0" cellspacing="0">
60
56
  <tr>
61
57
  <td align="center">
62
- <a href="${(0, utils_1.escapeHtml)(data.reviewUrl)}" style="display: inline-block; padding: 12px 32px; background-color: ${base_1.STYLES.primaryColor}; color: #FFFFFF; text-decoration: none; border-radius: 12px; font-family: ${base_1.STYLES.fontFamily}; font-size: 16px; font-weight: 600;">Leave a Review</a>
58
+ <a href="${escapeHtml(data.reviewUrl)}" style="display: inline-block; padding: 12px 32px; background-color: ${STYLES.primaryColor}; color: #FFFFFF; text-decoration: none; border-radius: 12px; font-family: ${STYLES.fontFamily}; font-size: 16px; font-weight: 600;">Leave a Review</a>
63
59
  </td>
64
60
  </tr>
65
61
  </table>
66
62
  `);
67
63
  const content = `
68
64
  ${badge}
69
- ${(0, base_1.heading)('Your Order Has Been Delivered!')}
65
+ ${heading('Your Order Has Been Delivered!')}
70
66
 
71
- <p style="margin: 0 0 32px 0; font-family: ${base_1.STYLES.fontFamily}; font-size: 16px; font-weight: 400; line-height: 1.625; color: ${base_1.STYLES.textSecondary}; text-align: center;">
72
- Hi ${(0, utils_1.escapeHtml)(data.customerName)}, your order has been successfully delivered. We hope you love your purchase!
67
+ <p style="margin: 0 0 32px 0; font-family: ${STYLES.fontFamily}; font-size: 16px; font-weight: 400; line-height: 1.625; color: ${STYLES.textSecondary}; text-align: center;">
68
+ Hi ${escapeHtml(data.customerName)}, your order has been successfully delivered. We hope you love your purchase!
73
69
  </p>
74
70
 
75
71
  ${deliveryDetailsBox}
76
72
 
77
73
  ${feedbackSection}
78
74
 
79
- ${(0, base_1.paragraph)('Need to return or exchange something?', '16px')}
75
+ ${paragraph('Need to return or exchange something?', '16px')}
80
76
 
81
- ${(0, base_1.secondaryButton)('Visit Return Center', data.returnCenterUrl)}
77
+ ${secondaryButton('Visit Return Center', data.returnCenterUrl)}
82
78
  `;
83
- return (0, base_1.baseLayout)({
79
+ return baseLayout({
84
80
  config: data.config,
85
81
  title: `Order Delivered - #${data.orderNumber}`,
86
82
  content,
@@ -89,7 +85,7 @@ function renderOrderDelivered(data) {
89
85
  /**
90
86
  * Get the subject line for order delivered emails.
91
87
  */
92
- function getOrderDeliveredSubject(storeName, orderNumber) {
88
+ export function getOrderDeliveredSubject(storeName, orderNumber) {
93
89
  return `Your Order Has Been Delivered - #${orderNumber} | ${storeName}`;
94
90
  }
95
91
  //# sourceMappingURL=order-delivered.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"order-delivered.js","sourceRoot":"","sources":["../../../src/emails/templates/order-delivered.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAuCH,oDA0DC;AAKD,4DAKC;AAxGD,oCAAqC;AACrC,iCAUe;AAEf,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,oBAAoB,CAAC,IAAwB;IAC3D,MAAM,KAAK,GAAG,IAAA,kBAAW,EAAC,WAAW,CAAC,CAAA;IAEtC,uBAAuB;IACvB,MAAM,kBAAkB,GAAG;mDACsB,aAAM,CAAC,gBAAgB,4CAA4C,aAAM,CAAC,UAAU;;UAE7H,IAAA,mBAAY,EAAC,cAAc,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;UAC5E,IAAA,mBAAY,EAAC,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE;QAChD,UAAU,EAAE,aAAM,CAAC,YAAY;QAC/B,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;KACnB,CAA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