@mailquilt/templates 0.0.0 → 0.5.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.
@@ -0,0 +1,1137 @@
1
+ import {
2
+ bold,
3
+ br,
4
+ buttonBlock,
5
+ col,
6
+ defineStarterEmail,
7
+ dividerBlock,
8
+ doc,
9
+ emailDoc,
10
+ FONT_SANS,
11
+ FONT_SERIF,
12
+ headingBlock,
13
+ headingDoc,
14
+ linkText,
15
+ menuBlock,
16
+ p,
17
+ row,
18
+ singleColRow,
19
+ socialBlock,
20
+ tag,
21
+ textBlock,
22
+ ul,
23
+ } from "../builders.js";
24
+ import type { TemplateStarterEmail } from "../types.js";
25
+
26
+ /** Live workshop or webinar invitation with date band, agenda, and speaker cards. */
27
+ export const eventInvite: TemplateStarterEmail =
28
+ /* #__PURE__ */
29
+ defineStarterEmail(
30
+ {
31
+ category: "engagement",
32
+ description: "Live session invite with date details and agenda",
33
+ name: "Event invitation",
34
+ },
35
+ () =>
36
+ emailDoc(
37
+ {
38
+ backgroundColor: "#f1f5f9",
39
+ fontFamily: FONT_SANS,
40
+ language: "en",
41
+ preheader:
42
+ "Join us live on {{event_date}} for a 45-minute workshop plus open Q&A.",
43
+ style: {
44
+ buttonBackgroundColor: "#0f766e",
45
+ buttonBorderRadius: 100,
46
+ emailBackgroundColor: "#ffffff",
47
+ heading1FontSize: 30,
48
+ heading2FontSize: 20,
49
+ heading3FontSize: 16,
50
+ headingFontFamily: FONT_SERIF,
51
+ linkColor: "#0f766e",
52
+ textColor: "#0f172a",
53
+ textFontSize: 16,
54
+ },
55
+ width: 600,
56
+ },
57
+ [
58
+ singleColRow(
59
+ "ei-hero-row",
60
+ "ei-hero-col",
61
+ [
62
+ textBlock(
63
+ "ei-eyebrow",
64
+ doc(p(bold("LIVE WORKSHOP"), " · ", tag("company_name"))),
65
+ {
66
+ color: "#ccfbf1",
67
+ fontSize: 12,
68
+ paddingBottom: 10,
69
+ paddingLeft: 0,
70
+ paddingRight: 0,
71
+ paddingTop: 0,
72
+ }
73
+ ),
74
+ headingBlock(
75
+ "ei-title",
76
+ 1,
77
+ headingDoc(
78
+ p("Designing emails that render reliably in every inbox")
79
+ ),
80
+ {
81
+ color: "#ffffff",
82
+ paddingBottom: 12,
83
+ paddingLeft: 0,
84
+ paddingRight: 0,
85
+ paddingTop: 0,
86
+ phone: { fontSize: 24 },
87
+ }
88
+ ),
89
+ textBlock(
90
+ "ei-date-line",
91
+ doc(
92
+ p(
93
+ tag("event_date", [{ type: "bold" }]),
94
+ " · 45 min + live Q&A"
95
+ )
96
+ ),
97
+ {
98
+ color: "#f0fdfa",
99
+ fontSize: 15,
100
+ paddingBottom: 0,
101
+ paddingLeft: 0,
102
+ paddingRight: 0,
103
+ paddingTop: 0,
104
+ }
105
+ ),
106
+ ],
107
+ {
108
+ backgroundColor: "#115e59",
109
+ paddingBottom: 34,
110
+ paddingLeft: 32,
111
+ paddingRight: 32,
112
+ paddingTop: 34,
113
+ phone: {
114
+ paddingBottom: 26,
115
+ paddingLeft: 20,
116
+ paddingRight: 20,
117
+ paddingTop: 26,
118
+ },
119
+ }
120
+ ),
121
+ singleColRow(
122
+ "ei-body-row",
123
+ "ei-body-col",
124
+ [
125
+ textBlock(
126
+ "ei-intro",
127
+ doc(
128
+ p("Hi ", tag("first_name"), ","),
129
+ p(
130
+ "Join our engineering and design leads for a practical live walkthrough on structuring responsive campaigns, handling Outlook quirks cleanly, and automating pre-send checks. Everyone who registers receives the recording and starter files."
131
+ )
132
+ ),
133
+ {
134
+ paddingBottom: 18,
135
+ paddingLeft: 0,
136
+ paddingRight: 0,
137
+ paddingTop: 8,
138
+ }
139
+ ),
140
+ buttonBlock("ei-rsvp-btn", "Reserve your seat", "{{rsvp_url}}", {
141
+ align: "left",
142
+ paddingBottom: 22,
143
+ paddingLeft: 0,
144
+ paddingRight: 0,
145
+ paddingTop: 0,
146
+ }),
147
+ headingBlock(
148
+ "ei-agenda-title",
149
+ 2,
150
+ headingDoc(p("What we will cover")),
151
+ {
152
+ paddingBottom: 10,
153
+ paddingLeft: 0,
154
+ paddingRight: 0,
155
+ paddingTop: 0,
156
+ }
157
+ ),
158
+ textBlock(
159
+ "ei-agenda-list",
160
+ doc(
161
+ ul(
162
+ p(
163
+ bold("Responsive column patterns: "),
164
+ "When to stack columns on phones and when to keep metadata side by side."
165
+ ),
166
+ p(
167
+ bold("Accessible contrast in dark and light rows: "),
168
+ "Testing text, buttons, and links before hitting send."
169
+ ),
170
+ p(
171
+ bold("Live Q&A: "),
172
+ "Bring your toughest client rendering question for real-time troubleshooting."
173
+ )
174
+ )
175
+ ),
176
+ {
177
+ color: "#334155",
178
+ fontSize: 15,
179
+ paddingBottom: 8,
180
+ paddingLeft: 0,
181
+ paddingRight: 0,
182
+ paddingTop: 0,
183
+ }
184
+ ),
185
+ ],
186
+ {
187
+ backgroundColor: "#ffffff",
188
+ paddingBottom: 16,
189
+ paddingLeft: 32,
190
+ paddingRight: 32,
191
+ paddingTop: 20,
192
+ phone: { paddingLeft: 20, paddingRight: 20 },
193
+ }
194
+ ),
195
+ row(
196
+ "ei-speakers-row",
197
+ [
198
+ col(
199
+ "ei-speaker-1-col",
200
+ 50,
201
+ [
202
+ textBlock(
203
+ "ei-speaker-1",
204
+ doc(
205
+ p(bold("Nadia Patel"), br(), "Principal Email Engineer")
206
+ ),
207
+ {
208
+ color: "#1e293b",
209
+ fontSize: 14,
210
+ paddingBottom: 14,
211
+ paddingLeft: 16,
212
+ paddingRight: 16,
213
+ paddingTop: 14,
214
+ }
215
+ ),
216
+ ],
217
+ {
218
+ backgroundColor: "#f8fafc",
219
+ borderColor: "#e2e8f0",
220
+ borderStyle: "solid",
221
+ borderWidth: 1,
222
+ }
223
+ ),
224
+ col(
225
+ "ei-speaker-2-col",
226
+ 50,
227
+ [
228
+ textBlock(
229
+ "ei-speaker-2",
230
+ doc(p(bold("David Chen"), br(), "Head of Design Systems")),
231
+ {
232
+ color: "#1e293b",
233
+ fontSize: 14,
234
+ paddingBottom: 14,
235
+ paddingLeft: 16,
236
+ paddingRight: 16,
237
+ paddingTop: 14,
238
+ }
239
+ ),
240
+ ],
241
+ {
242
+ backgroundColor: "#f8fafc",
243
+ borderColor: "#e2e8f0",
244
+ borderStyle: "solid",
245
+ borderWidth: 1,
246
+ }
247
+ ),
248
+ ],
249
+ {
250
+ backgroundColor: "#ffffff",
251
+ paddingBottom: 28,
252
+ paddingLeft: 32,
253
+ paddingRight: 32,
254
+ paddingTop: 8,
255
+ phone: { paddingLeft: 20, paddingRight: 20 },
256
+ }
257
+ ),
258
+ singleColRow(
259
+ "ei-footer-row",
260
+ "ei-footer-col",
261
+ [
262
+ socialBlock(
263
+ "ei-social",
264
+ [
265
+ { network: "website", url: "{{website_url}}" },
266
+ {
267
+ network: "linkedin",
268
+ url: "https://linkedin.com/company/northstar",
269
+ },
270
+ { network: "youtube", url: "https://youtube.com/@northstar" },
271
+ ],
272
+ {
273
+ align: "center",
274
+ iconSize: 32,
275
+ iconStyle: "color",
276
+ paddingBottom: 12,
277
+ paddingLeft: 0,
278
+ paddingRight: 0,
279
+ paddingTop: 4,
280
+ }
281
+ ),
282
+ textBlock(
283
+ "ei-footer-text",
284
+ doc(
285
+ p(
286
+ tag("company_name"),
287
+ " · ",
288
+ tag("company_address"),
289
+ br(),
290
+ linkText("Manage preferences", "{{preferences_url}}"),
291
+ " · ",
292
+ linkText(
293
+ "Unsubscribe from event invitations",
294
+ "{{unsubscribe_url}}"
295
+ )
296
+ )
297
+ ),
298
+ {
299
+ align: "center",
300
+ color: "#475569",
301
+ fontSize: 13,
302
+ paddingBottom: 0,
303
+ paddingLeft: 0,
304
+ paddingRight: 0,
305
+ paddingTop: 0,
306
+ }
307
+ ),
308
+ ],
309
+ {
310
+ backgroundColor: "#f8fafc",
311
+ paddingBottom: 24,
312
+ paddingLeft: 28,
313
+ paddingRight: 28,
314
+ paddingTop: 18,
315
+ phone: { paddingLeft: 20, paddingRight: 20 },
316
+ }
317
+ ),
318
+ ]
319
+ )
320
+ );
321
+
322
+ /** Friendly win-back and check-in email with zero guilt and clear opt-out. */
323
+ export const reengagement: TemplateStarterEmail =
324
+ /* #__PURE__ */
325
+ defineStarterEmail(
326
+ {
327
+ category: "engagement",
328
+ description: "Friendly low-pressure check-in with what's new",
329
+ name: "Win-back check-in",
330
+ },
331
+ () =>
332
+ emailDoc(
333
+ {
334
+ backgroundColor: "#fafaf9",
335
+ fontFamily: FONT_SANS,
336
+ language: "en",
337
+ preheader:
338
+ "Three upgrades waiting in your workspace whenever you are ready to drop back in.",
339
+ style: {
340
+ buttonBackgroundColor: "#9a3412",
341
+ buttonBorderRadius: 6,
342
+ emailBackgroundColor: "#ffffff",
343
+ heading1FontSize: 28,
344
+ heading3FontSize: 16,
345
+ headingFontFamily: FONT_SERIF,
346
+ linkColor: "#9a3412",
347
+ textColor: "#1c1917",
348
+ textFontSize: 16,
349
+ },
350
+ width: 560,
351
+ },
352
+ [
353
+ singleColRow(
354
+ "re-header-row",
355
+ "re-header-col",
356
+ [
357
+ textBlock(
358
+ "re-brand",
359
+ doc(p(tag("company_name", [{ type: "bold" }]))),
360
+ {
361
+ color: "#1c1917",
362
+ fontSize: 17,
363
+ paddingBottom: 14,
364
+ paddingLeft: 0,
365
+ paddingRight: 0,
366
+ paddingTop: 4,
367
+ }
368
+ ),
369
+ dividerBlock("re-top-rule", {
370
+ color: "#e7e5e4",
371
+ paddingBottom: 0,
372
+ paddingLeft: 0,
373
+ paddingRight: 0,
374
+ paddingTop: 0,
375
+ thickness: 1,
376
+ }),
377
+ ],
378
+ {
379
+ backgroundColor: "#ffffff",
380
+ paddingBottom: 8,
381
+ paddingLeft: 32,
382
+ paddingRight: 32,
383
+ paddingTop: 24,
384
+ phone: { paddingLeft: 20, paddingRight: 20 },
385
+ }
386
+ ),
387
+ singleColRow(
388
+ "re-body-row",
389
+ "re-body-col",
390
+ [
391
+ headingBlock(
392
+ "re-title",
393
+ 1,
394
+ headingDoc(p("It has been a while, ", tag("first_name"))),
395
+ {
396
+ paddingBottom: 12,
397
+ paddingLeft: 0,
398
+ paddingRight: 0,
399
+ paddingTop: 12,
400
+ phone: { fontSize: 24 },
401
+ }
402
+ ),
403
+ textBlock(
404
+ "re-intro",
405
+ doc(
406
+ p(
407
+ "We noticed you have not opened your ",
408
+ tag("company_name"),
409
+ " workspace recently, so we wanted to share a brief update on what changed since your last visit."
410
+ )
411
+ ),
412
+ {
413
+ paddingBottom: 16,
414
+ paddingLeft: 0,
415
+ paddingRight: 0,
416
+ paddingTop: 0,
417
+ }
418
+ ),
419
+ textBlock(
420
+ "re-updates-box",
421
+ doc(
422
+ p(bold("Three upgrades waiting in your account")),
423
+ ul(
424
+ p(
425
+ bold("Saved row library: "),
426
+ "Reuse approved headers, metrics, and footers across every new email."
427
+ ),
428
+ p(
429
+ bold("Phone-specific spacing: "),
430
+ "Tune font sizes and padding for small screens without breaking desktop layout."
431
+ ),
432
+ p(
433
+ bold("One-click pre-send checks: "),
434
+ "Verify contrast, alt text, and unsubscribe links before exporting."
435
+ )
436
+ )
437
+ ),
438
+ {
439
+ borderColor: "#e7e5e4",
440
+ borderRadius: 8,
441
+ borderStyle: "solid",
442
+ borderWidth: 1,
443
+ boxBackgroundColor: "#f5f5f4",
444
+ color: "#1c1917",
445
+ fontSize: 15,
446
+ paddingBottom: 18,
447
+ paddingLeft: 20,
448
+ paddingRight: 20,
449
+ paddingTop: 18,
450
+ }
451
+ ),
452
+ buttonBlock("re-cta", "Return to your workspace", "{{app_url}}", {
453
+ align: "left",
454
+ paddingBottom: 18,
455
+ paddingLeft: 0,
456
+ paddingRight: 0,
457
+ paddingTop: 22,
458
+ }),
459
+ textBlock(
460
+ "re-choice",
461
+ doc(
462
+ p(
463
+ "If this is not the right time, no problem at all — you can ",
464
+ linkText("unsubscribe in one click", "{{unsubscribe_url}}"),
465
+ " and we will stop sending check-ins."
466
+ ),
467
+ p("— ", tag("sender_name", [{ type: "bold" }]))
468
+ ),
469
+ {
470
+ color: "#44403c",
471
+ fontSize: 15,
472
+ paddingBottom: 8,
473
+ paddingLeft: 0,
474
+ paddingRight: 0,
475
+ paddingTop: 0,
476
+ }
477
+ ),
478
+ ],
479
+ {
480
+ backgroundColor: "#ffffff",
481
+ paddingBottom: 24,
482
+ paddingLeft: 32,
483
+ paddingRight: 32,
484
+ paddingTop: 4,
485
+ phone: { paddingLeft: 20, paddingRight: 20 },
486
+ }
487
+ ),
488
+ singleColRow(
489
+ "re-footer-row",
490
+ "re-footer-col",
491
+ [
492
+ textBlock(
493
+ "re-footer-text",
494
+ doc(
495
+ p(
496
+ tag("company_name"),
497
+ " · ",
498
+ tag("company_address"),
499
+ br(),
500
+ linkText("Manage preferences", "{{preferences_url}}"),
501
+ " · ",
502
+ linkText("Unsubscribe", "{{unsubscribe_url}}")
503
+ )
504
+ ),
505
+ {
506
+ align: "center",
507
+ color: "#57534e",
508
+ fontSize: 13,
509
+ paddingBottom: 0,
510
+ paddingLeft: 0,
511
+ paddingRight: 0,
512
+ paddingTop: 0,
513
+ }
514
+ ),
515
+ ],
516
+ {
517
+ backgroundColor: "#f5f5f4",
518
+ paddingBottom: 24,
519
+ paddingLeft: 24,
520
+ paddingRight: 24,
521
+ paddingTop: 20,
522
+ }
523
+ ),
524
+ ]
525
+ )
526
+ );
527
+
528
+ /** Clean retail or seasonal offer without visual clutter. */
529
+ export const promoOffer: TemplateStarterEmail =
530
+ /* #__PURE__ */
531
+ defineStarterEmail(
532
+ {
533
+ category: "engagement",
534
+ description: "Clean retail promotion with offer code box",
535
+ name: "Seasonal offer",
536
+ },
537
+ () =>
538
+ emailDoc(
539
+ {
540
+ backgroundColor: "#f5f5f4",
541
+ fontFamily: FONT_SANS,
542
+ language: "en",
543
+ preheader:
544
+ "Save 25% through {{offer_expires}} with code {{offer_code}} at checkout.",
545
+ style: {
546
+ buttonBackgroundColor: "#9f1239",
547
+ buttonBorderRadius: 0,
548
+ emailBackgroundColor: "#ffffff",
549
+ heading1FontSize: 34,
550
+ heading2FontSize: 22,
551
+ heading3FontSize: 17,
552
+ headingFontFamily: FONT_SERIF,
553
+ linkColor: "#9f1239",
554
+ textColor: "#18181b",
555
+ textFontSize: 15,
556
+ },
557
+ width: 600,
558
+ },
559
+ [
560
+ singleColRow(
561
+ "po-header-row",
562
+ "po-header-col",
563
+ [
564
+ textBlock(
565
+ "po-brand",
566
+ doc(p(tag("company_name", [{ type: "bold" }]))),
567
+ {
568
+ align: "center",
569
+ color: "#18181b",
570
+ fontSize: 20,
571
+ paddingBottom: 8,
572
+ paddingLeft: 0,
573
+ paddingRight: 0,
574
+ paddingTop: 4,
575
+ }
576
+ ),
577
+ menuBlock(
578
+ "po-menu",
579
+ [
580
+ { label: "New arrivals", url: "{{cta_url}}" },
581
+ { label: "Bestsellers", url: "{{website_url}}" },
582
+ { label: "Gift sets", url: "{{cta_url}}" },
583
+ ],
584
+ {
585
+ align: "center",
586
+ color: "#3f3f46",
587
+ fontSize: 13,
588
+ gap: 24,
589
+ paddingBottom: 4,
590
+ paddingLeft: 0,
591
+ paddingRight: 0,
592
+ paddingTop: 0,
593
+ }
594
+ ),
595
+ ],
596
+ {
597
+ backgroundColor: "#ffffff",
598
+ paddingBottom: 16,
599
+ paddingLeft: 24,
600
+ paddingRight: 24,
601
+ paddingTop: 20,
602
+ }
603
+ ),
604
+ singleColRow(
605
+ "po-hero-row",
606
+ "po-hero-col",
607
+ [
608
+ textBlock("po-eyebrow", doc(p(bold("SEASONAL OFFER"))), {
609
+ align: "center",
610
+ color: "#fde68a",
611
+ fontSize: 12,
612
+ paddingBottom: 10,
613
+ paddingLeft: 0,
614
+ paddingRight: 0,
615
+ paddingTop: 0,
616
+ }),
617
+ headingBlock(
618
+ "po-title",
619
+ 1,
620
+ headingDoc(p("Save 25% on your spring refresh")),
621
+ {
622
+ align: "center",
623
+ color: "#ffffff",
624
+ paddingBottom: 12,
625
+ paddingLeft: 0,
626
+ paddingRight: 0,
627
+ paddingTop: 0,
628
+ phone: { fontSize: 26 },
629
+ }
630
+ ),
631
+ textBlock(
632
+ "po-sub",
633
+ doc(
634
+ p(
635
+ "Thoughtfully crafted essentials for ",
636
+ tag("first_name"),
637
+ " — available through ",
638
+ tag("offer_expires"),
639
+ "."
640
+ )
641
+ ),
642
+ {
643
+ align: "center",
644
+ color: "#e4e4e7",
645
+ fontSize: 16,
646
+ paddingBottom: 24,
647
+ paddingLeft: 12,
648
+ paddingRight: 12,
649
+ paddingTop: 0,
650
+ phone: { paddingLeft: 0, paddingRight: 0 },
651
+ }
652
+ ),
653
+ buttonBlock(
654
+ "po-hero-btn",
655
+ "Shop the seasonal collection",
656
+ "{{cta_url}}",
657
+ {
658
+ align: "center",
659
+ backgroundColor: "#ffffff",
660
+ borderRadius: 0,
661
+ color: "#18181b",
662
+ paddingBottom: 0,
663
+ paddingLeft: 0,
664
+ paddingRight: 0,
665
+ paddingTop: 0,
666
+ }
667
+ ),
668
+ ],
669
+ {
670
+ backgroundColor: "#18181b",
671
+ paddingBottom: 40,
672
+ paddingLeft: 32,
673
+ paddingRight: 32,
674
+ paddingTop: 40,
675
+ phone: {
676
+ paddingBottom: 30,
677
+ paddingLeft: 20,
678
+ paddingRight: 20,
679
+ paddingTop: 30,
680
+ },
681
+ }
682
+ ),
683
+ singleColRow(
684
+ "po-code-row",
685
+ "po-code-col",
686
+ [
687
+ textBlock(
688
+ "po-code-box",
689
+ doc(
690
+ p(
691
+ "Enter code ",
692
+ tag("offer_code", [{ type: "bold" }]),
693
+ " at checkout before ",
694
+ tag("offer_expires"),
695
+ "."
696
+ )
697
+ ),
698
+ {
699
+ align: "center",
700
+ borderColor: "#a8a29e",
701
+ borderStyle: "dashed",
702
+ borderWidth: 1,
703
+ boxBackgroundColor: "#fafaf9",
704
+ color: "#18181b",
705
+ fontSize: 15,
706
+ paddingBottom: 16,
707
+ paddingLeft: 20,
708
+ paddingRight: 20,
709
+ paddingTop: 16,
710
+ }
711
+ ),
712
+ ],
713
+ {
714
+ backgroundColor: "#ffffff",
715
+ paddingBottom: 12,
716
+ paddingLeft: 32,
717
+ paddingRight: 32,
718
+ paddingTop: 24,
719
+ phone: { paddingLeft: 20, paddingRight: 20 },
720
+ }
721
+ ),
722
+ row(
723
+ "po-picks-row",
724
+ [
725
+ col(
726
+ "po-pick-1-col",
727
+ 50,
728
+ [
729
+ headingBlock(
730
+ "po-pick-1-title",
731
+ 3,
732
+ headingDoc(p("Everyday starter bundle")),
733
+ {
734
+ paddingBottom: 6,
735
+ paddingLeft: 16,
736
+ paddingRight: 16,
737
+ paddingTop: 16,
738
+ }
739
+ ),
740
+ textBlock(
741
+ "po-pick-1-body",
742
+ doc(
743
+ p(
744
+ "Our three most-requested daily staples paired in one reusable travel case with free ground shipping."
745
+ ),
746
+ p(linkText("View the starter bundle", "{{cta_url}}"))
747
+ ),
748
+ {
749
+ color: "#3f3f46",
750
+ fontSize: 14,
751
+ paddingBottom: 16,
752
+ paddingLeft: 16,
753
+ paddingRight: 16,
754
+ paddingTop: 0,
755
+ }
756
+ ),
757
+ ],
758
+ {
759
+ backgroundColor: "#fafaf9",
760
+ borderColor: "#e7e5e4",
761
+ borderStyle: "solid",
762
+ borderWidth: 1,
763
+ }
764
+ ),
765
+ col(
766
+ "po-pick-2-col",
767
+ 50,
768
+ [
769
+ headingBlock(
770
+ "po-pick-2-title",
771
+ 3,
772
+ headingDoc(p("Flexible refill cadence")),
773
+ {
774
+ paddingBottom: 6,
775
+ paddingLeft: 16,
776
+ paddingRight: 16,
777
+ paddingTop: 16,
778
+ }
779
+ ),
780
+ textBlock(
781
+ "po-pick-2-body",
782
+ doc(
783
+ p(
784
+ "Apply 25% off your first scheduled refill delivery and pause or adjust your schedule any time."
785
+ ),
786
+ p(linkText("Explore refill options", "{{website_url}}"))
787
+ ),
788
+ {
789
+ color: "#3f3f46",
790
+ fontSize: 14,
791
+ paddingBottom: 16,
792
+ paddingLeft: 16,
793
+ paddingRight: 16,
794
+ paddingTop: 0,
795
+ }
796
+ ),
797
+ ],
798
+ {
799
+ backgroundColor: "#fafaf9",
800
+ borderColor: "#e7e5e4",
801
+ borderStyle: "solid",
802
+ borderWidth: 1,
803
+ }
804
+ ),
805
+ ],
806
+ {
807
+ backgroundColor: "#ffffff",
808
+ paddingBottom: 28,
809
+ paddingLeft: 32,
810
+ paddingRight: 32,
811
+ paddingTop: 12,
812
+ phone: { paddingLeft: 20, paddingRight: 20 },
813
+ }
814
+ ),
815
+ singleColRow(
816
+ "po-footer-row",
817
+ "po-footer-col",
818
+ [
819
+ socialBlock(
820
+ "po-social",
821
+ [
822
+ {
823
+ network: "instagram",
824
+ url: "https://instagram.com/northstar",
825
+ },
826
+ {
827
+ network: "pinterest",
828
+ url: "https://pinterest.com/northstar",
829
+ },
830
+ { network: "website", url: "{{website_url}}" },
831
+ ],
832
+ {
833
+ align: "center",
834
+ iconSize: 32,
835
+ iconStyle: "color",
836
+ paddingBottom: 12,
837
+ paddingLeft: 0,
838
+ paddingRight: 0,
839
+ paddingTop: 4,
840
+ }
841
+ ),
842
+ textBlock(
843
+ "po-footer-text",
844
+ doc(
845
+ p(
846
+ tag("company_name"),
847
+ " · ",
848
+ tag("company_address"),
849
+ br(),
850
+ linkText("Manage preferences", "{{preferences_url}}"),
851
+ " · ",
852
+ linkText("Unsubscribe", "{{unsubscribe_url}}")
853
+ )
854
+ ),
855
+ {
856
+ align: "center",
857
+ color: "#57534e",
858
+ fontSize: 13,
859
+ paddingBottom: 0,
860
+ paddingLeft: 0,
861
+ paddingRight: 0,
862
+ paddingTop: 0,
863
+ }
864
+ ),
865
+ ],
866
+ {
867
+ backgroundColor: "#f5f5f4",
868
+ paddingBottom: 24,
869
+ paddingLeft: 24,
870
+ paddingRight: 24,
871
+ paddingTop: 18,
872
+ }
873
+ ),
874
+ ]
875
+ )
876
+ );
877
+
878
+ /** Quick customer feedback and NPS check-in with one-click response buttons. */
879
+ export const feedbackRequest: TemplateStarterEmail =
880
+ /* #__PURE__ */
881
+ defineStarterEmail(
882
+ {
883
+ category: "engagement",
884
+ description: "Quick customer check-in and 2-minute survey",
885
+ name: "Feedback request",
886
+ },
887
+ () =>
888
+ emailDoc(
889
+ {
890
+ backgroundColor: "#f8fafc",
891
+ fontFamily: FONT_SANS,
892
+ language: "en",
893
+ preheader:
894
+ "One quick question about your experience with {{company_name}} — takes under two minutes.",
895
+ style: {
896
+ buttonBackgroundColor: "#4338ca",
897
+ buttonBorderRadius: 8,
898
+ emailBackgroundColor: "#ffffff",
899
+ heading1FontSize: 26,
900
+ linkColor: "#4338ca",
901
+ textColor: "#0f172a",
902
+ textFontSize: 16,
903
+ },
904
+ width: 560,
905
+ },
906
+ [
907
+ singleColRow(
908
+ "fr-header-row",
909
+ "fr-header-col",
910
+ [
911
+ textBlock(
912
+ "fr-brand",
913
+ doc(p(tag("company_name", [{ type: "bold" }]))),
914
+ {
915
+ color: "#0f172a",
916
+ fontSize: 17,
917
+ paddingBottom: 14,
918
+ paddingLeft: 0,
919
+ paddingRight: 0,
920
+ paddingTop: 4,
921
+ }
922
+ ),
923
+ dividerBlock("fr-top-rule", {
924
+ color: "#e2e8f0",
925
+ paddingBottom: 0,
926
+ paddingLeft: 0,
927
+ paddingRight: 0,
928
+ paddingTop: 0,
929
+ thickness: 1,
930
+ }),
931
+ ],
932
+ {
933
+ backgroundColor: "#ffffff",
934
+ paddingBottom: 8,
935
+ paddingLeft: 32,
936
+ paddingRight: 32,
937
+ paddingTop: 24,
938
+ phone: { paddingLeft: 20, paddingRight: 20 },
939
+ }
940
+ ),
941
+ singleColRow(
942
+ "fr-body-row",
943
+ "fr-body-col",
944
+ [
945
+ headingBlock(
946
+ "fr-title",
947
+ 1,
948
+ headingDoc(
949
+ p(
950
+ "How is ",
951
+ tag("company_name"),
952
+ " working for you, ",
953
+ tag("first_name"),
954
+ "?"
955
+ )
956
+ ),
957
+ {
958
+ paddingBottom: 12,
959
+ paddingLeft: 0,
960
+ paddingRight: 0,
961
+ paddingTop: 12,
962
+ phone: { fontSize: 23 },
963
+ }
964
+ ),
965
+ textBlock(
966
+ "fr-copy",
967
+ doc(
968
+ p(
969
+ "Your honest feedback goes straight to our product and engineering team and guides what we improve next. Pick the option below that best reflects your experience so far:"
970
+ )
971
+ ),
972
+ {
973
+ color: "#334155",
974
+ paddingBottom: 8,
975
+ paddingLeft: 0,
976
+ paddingRight: 0,
977
+ paddingTop: 0,
978
+ }
979
+ ),
980
+ ],
981
+ {
982
+ backgroundColor: "#ffffff",
983
+ paddingBottom: 4,
984
+ paddingLeft: 32,
985
+ paddingRight: 32,
986
+ paddingTop: 4,
987
+ phone: { paddingLeft: 20, paddingRight: 20 },
988
+ }
989
+ ),
990
+ row(
991
+ "fr-rating-row",
992
+ [
993
+ col("fr-rate-low-col", 33.33, [
994
+ buttonBlock(
995
+ "fr-rate-low",
996
+ "Needs work",
997
+ "{{survey_url}}?score=low",
998
+ {
999
+ align: "center",
1000
+ backgroundColor: "#e2e8f0",
1001
+ borderRadius: 8,
1002
+ color: "#0f172a",
1003
+ paddingBottom: 8,
1004
+ paddingLeft: 6,
1005
+ paddingRight: 6,
1006
+ paddingTop: 8,
1007
+ }
1008
+ ),
1009
+ ]),
1010
+ col("fr-rate-mid-col", 33.33, [
1011
+ buttonBlock(
1012
+ "fr-rate-mid",
1013
+ "Working well",
1014
+ "{{survey_url}}?score=mid",
1015
+ {
1016
+ align: "center",
1017
+ backgroundColor: "#e0e7ff",
1018
+ borderRadius: 8,
1019
+ color: "#312e81",
1020
+ paddingBottom: 8,
1021
+ paddingLeft: 6,
1022
+ paddingRight: 6,
1023
+ paddingTop: 8,
1024
+ }
1025
+ ),
1026
+ ]),
1027
+ col("fr-rate-high-col", 33.34, [
1028
+ buttonBlock(
1029
+ "fr-rate-high",
1030
+ "Love using it",
1031
+ "{{survey_url}}?score=high",
1032
+ {
1033
+ align: "center",
1034
+ backgroundColor: "#4338ca",
1035
+ borderRadius: 8,
1036
+ color: "#ffffff",
1037
+ paddingBottom: 8,
1038
+ paddingLeft: 6,
1039
+ paddingRight: 6,
1040
+ paddingTop: 8,
1041
+ }
1042
+ ),
1043
+ ]),
1044
+ ],
1045
+ {
1046
+ backgroundColor: "#ffffff",
1047
+ paddingBottom: 12,
1048
+ paddingLeft: 24,
1049
+ paddingRight: 24,
1050
+ paddingTop: 8,
1051
+ phone: { paddingLeft: 16, paddingRight: 16 },
1052
+ }
1053
+ ),
1054
+ singleColRow(
1055
+ "fr-closing-row",
1056
+ "fr-closing-col",
1057
+ [
1058
+ textBlock(
1059
+ "fr-closing",
1060
+ doc(
1061
+ p(
1062
+ "Have specific suggestions? You can also ",
1063
+ linkText(
1064
+ "open the 3-question feedback form",
1065
+ "{{survey_url}}"
1066
+ ),
1067
+ " or reply directly to this message."
1068
+ ),
1069
+ p(
1070
+ "Thank you for taking a moment,",
1071
+ br(),
1072
+ tag("sender_name", [{ type: "bold" }]),
1073
+ br(),
1074
+ tag("sender_role")
1075
+ )
1076
+ ),
1077
+ {
1078
+ color: "#334155",
1079
+ fontSize: 15,
1080
+ paddingBottom: 8,
1081
+ paddingLeft: 0,
1082
+ paddingRight: 0,
1083
+ paddingTop: 8,
1084
+ }
1085
+ ),
1086
+ ],
1087
+ {
1088
+ backgroundColor: "#ffffff",
1089
+ paddingBottom: 24,
1090
+ paddingLeft: 32,
1091
+ paddingRight: 32,
1092
+ paddingTop: 4,
1093
+ phone: { paddingLeft: 20, paddingRight: 20 },
1094
+ }
1095
+ ),
1096
+ singleColRow(
1097
+ "fr-footer-row",
1098
+ "fr-footer-col",
1099
+ [
1100
+ textBlock(
1101
+ "fr-footer-text",
1102
+ doc(
1103
+ p(
1104
+ tag("company_name"),
1105
+ " · ",
1106
+ tag("company_address"),
1107
+ br(),
1108
+ linkText("Manage preferences", "{{preferences_url}}"),
1109
+ " · ",
1110
+ linkText(
1111
+ "Unsubscribe from feedback requests",
1112
+ "{{unsubscribe_url}}"
1113
+ )
1114
+ )
1115
+ ),
1116
+ {
1117
+ align: "center",
1118
+ color: "#475569",
1119
+ fontSize: 13,
1120
+ paddingBottom: 0,
1121
+ paddingLeft: 0,
1122
+ paddingRight: 0,
1123
+ paddingTop: 0,
1124
+ }
1125
+ ),
1126
+ ],
1127
+ {
1128
+ backgroundColor: "#f8fafc",
1129
+ paddingBottom: 24,
1130
+ paddingLeft: 24,
1131
+ paddingRight: 24,
1132
+ paddingTop: 20,
1133
+ }
1134
+ ),
1135
+ ]
1136
+ )
1137
+ );