@mailquilt/templates 0.0.0-stage → 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,175 @@
1
+ import {
2
+ br,
3
+ defineSavedRow,
4
+ dividerBlock,
5
+ doc,
6
+ linkText,
7
+ p,
8
+ singleColRow,
9
+ socialBlock,
10
+ tag,
11
+ textBlock,
12
+ } from "../builders.js";
13
+ import type { TemplateSavedRow } from "../types.js";
14
+
15
+ /** Centered Social Block row for light email layouts. */
16
+ export const socialBar: TemplateSavedRow =
17
+ /* #__PURE__ */
18
+ defineSavedRow({ category: "footer", name: "Social links bar" }, () =>
19
+ singleColRow(
20
+ "sr-social-row",
21
+ "sr-social-col",
22
+ [
23
+ socialBlock(
24
+ "sr-social-links",
25
+ [
26
+ { network: "website", url: "{{website_url}}" },
27
+ {
28
+ network: "linkedin",
29
+ url: "https://linkedin.com/company/northstar",
30
+ },
31
+ { network: "x", url: "https://x.com/northstar" },
32
+ { network: "youtube", url: "https://youtube.com/@northstar" },
33
+ ],
34
+ {
35
+ align: "center",
36
+ iconSize: 32,
37
+ iconStyle: "color",
38
+ paddingBottom: 8,
39
+ paddingLeft: 0,
40
+ paddingRight: 0,
41
+ paddingTop: 8,
42
+ }
43
+ ),
44
+ ],
45
+ {
46
+ backgroundColor: "#ffffff",
47
+ paddingBottom: 16,
48
+ paddingLeft: 24,
49
+ paddingRight: 24,
50
+ paddingTop: 16,
51
+ }
52
+ )
53
+ );
54
+
55
+ /** Clean light footer with company address, preferences, and unsubscribe link. */
56
+ export const footerLight: TemplateSavedRow =
57
+ /* #__PURE__ */
58
+ defineSavedRow({ category: "footer", name: "Light footer" }, () =>
59
+ singleColRow(
60
+ "sr-footer-light-row",
61
+ "sr-footer-light-col",
62
+ [
63
+ dividerBlock("sr-footer-light-rule", {
64
+ color: "#d4d4d8",
65
+ paddingBottom: 18,
66
+ paddingLeft: 0,
67
+ paddingRight: 0,
68
+ paddingTop: 0,
69
+ thickness: 1,
70
+ }),
71
+ textBlock(
72
+ "sr-footer-light-text",
73
+ doc(
74
+ p(
75
+ tag("company_name"),
76
+ " · ",
77
+ tag("company_address"),
78
+ br(),
79
+ linkText("Manage email preferences", "{{preferences_url}}"),
80
+ " · ",
81
+ linkText("Unsubscribe", "{{unsubscribe_url}}")
82
+ )
83
+ ),
84
+ {
85
+ align: "center",
86
+ color: "#52525b",
87
+ fontSize: 13,
88
+ paddingBottom: 0,
89
+ paddingLeft: 0,
90
+ paddingRight: 0,
91
+ paddingTop: 0,
92
+ }
93
+ ),
94
+ ],
95
+ {
96
+ backgroundColor: "#f4f4f5",
97
+ paddingBottom: 28,
98
+ paddingLeft: 28,
99
+ paddingRight: 28,
100
+ paddingTop: 20,
101
+ phone: { paddingLeft: 20, paddingRight: 20 },
102
+ }
103
+ )
104
+ );
105
+
106
+ /** High-contrast dark footer with white social icons, address, and unsubscribe link. */
107
+ export const footerDark: TemplateSavedRow =
108
+ /* #__PURE__ */
109
+ defineSavedRow({ category: "footer", name: "Dark footer" }, () =>
110
+ singleColRow(
111
+ "sr-footer-dark-row",
112
+ "sr-footer-dark-col",
113
+ [
114
+ socialBlock(
115
+ "sr-footer-dark-social",
116
+ [
117
+ { network: "website", url: "{{website_url}}" },
118
+ {
119
+ network: "linkedin",
120
+ url: "https://linkedin.com/company/northstar",
121
+ },
122
+ { network: "x", url: "https://x.com/northstar" },
123
+ ],
124
+ {
125
+ align: "center",
126
+ iconSize: 32,
127
+ iconStyle: "white",
128
+ paddingBottom: 16,
129
+ paddingLeft: 0,
130
+ paddingRight: 0,
131
+ paddingTop: 0,
132
+ }
133
+ ),
134
+ dividerBlock("sr-footer-dark-rule", {
135
+ color: "#3f3f46",
136
+ paddingBottom: 16,
137
+ paddingLeft: 0,
138
+ paddingRight: 0,
139
+ paddingTop: 0,
140
+ thickness: 1,
141
+ }),
142
+ textBlock(
143
+ "sr-footer-dark-text",
144
+ doc(
145
+ p(
146
+ tag("company_name"),
147
+ " · ",
148
+ tag("company_address"),
149
+ br(),
150
+ linkText("Manage email preferences", "{{preferences_url}}"),
151
+ " · ",
152
+ linkText("Unsubscribe", "{{unsubscribe_url}}")
153
+ )
154
+ ),
155
+ {
156
+ align: "center",
157
+ color: "#d4d4d8",
158
+ fontSize: 13,
159
+ paddingBottom: 0,
160
+ paddingLeft: 0,
161
+ paddingRight: 0,
162
+ paddingTop: 0,
163
+ }
164
+ ),
165
+ ],
166
+ {
167
+ backgroundColor: "#18181b",
168
+ paddingBottom: 32,
169
+ paddingLeft: 28,
170
+ paddingRight: 28,
171
+ paddingTop: 28,
172
+ phone: { paddingLeft: 20, paddingRight: 20 },
173
+ }
174
+ )
175
+ );
@@ -0,0 +1,122 @@
1
+ import {
2
+ col,
3
+ defineSavedRow,
4
+ dividerBlock,
5
+ doc,
6
+ menuBlock,
7
+ p,
8
+ row,
9
+ singleColRow,
10
+ tagLink,
11
+ textBlock,
12
+ } from "../builders.js";
13
+ import type { TemplateSavedRow } from "../types.js";
14
+
15
+ /** Simple brand wordmark header with a subtle bottom rule. */
16
+ export const headerMinimal: TemplateSavedRow =
17
+ /* #__PURE__ */
18
+ defineSavedRow({ category: "header", name: "Minimal header" }, () =>
19
+ singleColRow(
20
+ "sr-header-min-row",
21
+ "sr-header-min-col",
22
+ [
23
+ textBlock(
24
+ "sr-header-min-brand",
25
+ doc(
26
+ p(tagLink("company_name", "{{website_url}}", [{ type: "bold" }]))
27
+ ),
28
+ {
29
+ color: "#0f172a",
30
+ fontSize: 18,
31
+ paddingBottom: 14,
32
+ paddingLeft: 0,
33
+ paddingRight: 0,
34
+ paddingTop: 4,
35
+ }
36
+ ),
37
+ dividerBlock("sr-header-min-rule", {
38
+ color: "#e2e8f0",
39
+ paddingBottom: 0,
40
+ paddingLeft: 0,
41
+ paddingRight: 0,
42
+ paddingTop: 0,
43
+ thickness: 1,
44
+ }),
45
+ ],
46
+ {
47
+ backgroundColor: "#ffffff",
48
+ paddingBottom: 8,
49
+ paddingLeft: 32,
50
+ paddingRight: 32,
51
+ paddingTop: 24,
52
+ phone: { paddingLeft: 20, paddingRight: 20, paddingTop: 20 },
53
+ }
54
+ )
55
+ );
56
+
57
+ /** Two-column header pairing a linked brand wordmark with a Menu Block. */
58
+ export const headerWithNav: TemplateSavedRow =
59
+ /* #__PURE__ */
60
+ defineSavedRow({ category: "header", name: "Header with navigation" }, () =>
61
+ row(
62
+ "sr-header-nav-row",
63
+ [
64
+ col(
65
+ "sr-header-nav-brand-col",
66
+ 33,
67
+ [
68
+ textBlock(
69
+ "sr-header-nav-brand",
70
+ doc(
71
+ p(
72
+ tagLink("company_name", "{{website_url}}", [{ type: "bold" }])
73
+ )
74
+ ),
75
+ {
76
+ color: "#0f172a",
77
+ fontSize: 18,
78
+ paddingBottom: 8,
79
+ paddingLeft: 0,
80
+ paddingRight: 8,
81
+ paddingTop: 8,
82
+ }
83
+ ),
84
+ ],
85
+ { verticalAlign: "middle" }
86
+ ),
87
+ col(
88
+ "sr-header-nav-menu-col",
89
+ 67,
90
+ [
91
+ menuBlock(
92
+ "sr-header-nav-menu",
93
+ [
94
+ { label: "Product", url: "{{website_url}}" },
95
+ { label: "Updates", url: "{{changelog_url}}" },
96
+ { label: "Help center", url: "{{help_url}}" },
97
+ ],
98
+ {
99
+ align: "right",
100
+ color: "#334155",
101
+ fontSize: 14,
102
+ gap: 20,
103
+ paddingBottom: 8,
104
+ paddingLeft: 8,
105
+ paddingRight: 0,
106
+ paddingTop: 8,
107
+ }
108
+ ),
109
+ ],
110
+ { verticalAlign: "middle" }
111
+ ),
112
+ ],
113
+ {
114
+ backgroundColor: "#ffffff",
115
+ paddingBottom: 16,
116
+ paddingLeft: 28,
117
+ paddingRight: 28,
118
+ paddingTop: 20,
119
+ phone: { paddingLeft: 20, paddingRight: 20 },
120
+ }
121
+ )
122
+ );
@@ -0,0 +1,195 @@
1
+ import {
2
+ bold,
3
+ buttonBlock,
4
+ col,
5
+ defineSavedRow,
6
+ doc,
7
+ headingBlock,
8
+ headingDoc,
9
+ imageBlock,
10
+ p,
11
+ row,
12
+ singleColRow,
13
+ textBlock,
14
+ } from "../builders.js";
15
+ import type { TemplateSavedRow } from "../types.js";
16
+
17
+ /** Centered eyebrow, headline, subhead, and primary Button. */
18
+ export const heroCentered: TemplateSavedRow =
19
+ /* #__PURE__ */
20
+ defineSavedRow({ category: "hero", name: "Centered hero" }, () =>
21
+ singleColRow(
22
+ "sr-hero-center-row",
23
+ "sr-hero-center-col",
24
+ [
25
+ textBlock("sr-hero-center-eyebrow", doc(p(bold("FEATURED UPDATE"))), {
26
+ align: "center",
27
+ color: "#1d4ed8",
28
+ fontSize: 12,
29
+ paddingBottom: 8,
30
+ paddingLeft: 0,
31
+ paddingRight: 0,
32
+ paddingTop: 0,
33
+ }),
34
+ headingBlock(
35
+ "sr-hero-center-title",
36
+ 1,
37
+ headingDoc(p("Send clearer customer updates in half the time")),
38
+ {
39
+ align: "center",
40
+ color: "#0f172a",
41
+ fontSize: 32,
42
+ paddingBottom: 12,
43
+ paddingLeft: 0,
44
+ paddingRight: 0,
45
+ paddingTop: 0,
46
+ phone: { fontSize: 26 },
47
+ }
48
+ ),
49
+ textBlock(
50
+ "sr-hero-center-sub",
51
+ doc(
52
+ p(
53
+ "Build structured emails from reusable rows, check readability before sending, and export reliable HTML for every inbox."
54
+ )
55
+ ),
56
+ {
57
+ align: "center",
58
+ color: "#475569",
59
+ fontSize: 16,
60
+ paddingBottom: 20,
61
+ paddingLeft: 12,
62
+ paddingRight: 12,
63
+ paddingTop: 0,
64
+ phone: { paddingLeft: 0, paddingRight: 0 },
65
+ }
66
+ ),
67
+ buttonBlock(
68
+ "sr-hero-center-cta",
69
+ "Explore the new workflow",
70
+ "{{cta_url}}",
71
+ {
72
+ align: "center",
73
+ backgroundColor: "#1d4ed8",
74
+ borderRadius: 8,
75
+ color: "#ffffff",
76
+ paddingBottom: 0,
77
+ paddingLeft: 0,
78
+ paddingRight: 0,
79
+ paddingTop: 4,
80
+ }
81
+ ),
82
+ ],
83
+ {
84
+ backgroundColor: "#ffffff",
85
+ paddingBottom: 40,
86
+ paddingLeft: 32,
87
+ paddingRight: 32,
88
+ paddingTop: 40,
89
+ phone: {
90
+ paddingBottom: 28,
91
+ paddingLeft: 20,
92
+ paddingRight: 20,
93
+ paddingTop: 28,
94
+ },
95
+ }
96
+ )
97
+ );
98
+
99
+ /** Two-column hero pairing left-aligned copy and CTA with a visual slot. */
100
+ export const heroSplit: TemplateSavedRow =
101
+ /* #__PURE__ */
102
+ defineSavedRow({ category: "hero", name: "Split hero" }, () =>
103
+ row(
104
+ "sr-hero-split-row",
105
+ [
106
+ col(
107
+ "sr-hero-split-copy-col",
108
+ 50,
109
+ [
110
+ headingBlock(
111
+ "sr-hero-split-title",
112
+ 2,
113
+ headingDoc(p("Ship every campaign with confidence")),
114
+ {
115
+ color: "#0f172a",
116
+ fontSize: 24,
117
+ paddingBottom: 10,
118
+ paddingLeft: 0,
119
+ paddingRight: 12,
120
+ paddingTop: 0,
121
+ phone: { paddingRight: 0 },
122
+ }
123
+ ),
124
+ textBlock(
125
+ "sr-hero-split-body",
126
+ doc(
127
+ p(
128
+ "Review desktop and phone previews side by side so your layout stays crisp before a single message goes out."
129
+ )
130
+ ),
131
+ {
132
+ color: "#475569",
133
+ fontSize: 15,
134
+ paddingBottom: 18,
135
+ paddingLeft: 0,
136
+ paddingRight: 12,
137
+ paddingTop: 0,
138
+ phone: { paddingRight: 0 },
139
+ }
140
+ ),
141
+ buttonBlock(
142
+ "sr-hero-split-cta",
143
+ "Open your workspace",
144
+ "{{app_url}}",
145
+ {
146
+ align: "left",
147
+ backgroundColor: "#0f172a",
148
+ borderRadius: 6,
149
+ color: "#ffffff",
150
+ paddingBottom: 0,
151
+ paddingLeft: 0,
152
+ paddingRight: 0,
153
+ paddingTop: 0,
154
+ }
155
+ ),
156
+ ],
157
+ {
158
+ paddingBottom: 8,
159
+ paddingTop: 8,
160
+ verticalAlign: "middle",
161
+ }
162
+ ),
163
+ col(
164
+ "sr-hero-split-media-col",
165
+ 50,
166
+ [
167
+ imageBlock("sr-hero-split-img", {
168
+ alt: "Overview of the campaign workspace and live preview",
169
+ borderRadius: 8,
170
+ paddingBottom: 0,
171
+ paddingLeft: 8,
172
+ paddingRight: 0,
173
+ paddingTop: 0,
174
+ phone: { paddingLeft: 0, paddingTop: 16 },
175
+ src: "{{hero_image_url}}",
176
+ }),
177
+ ],
178
+ { verticalAlign: "middle" }
179
+ ),
180
+ ],
181
+ {
182
+ backgroundColor: "#ffffff",
183
+ paddingBottom: 32,
184
+ paddingLeft: 28,
185
+ paddingRight: 28,
186
+ paddingTop: 32,
187
+ phone: {
188
+ paddingBottom: 24,
189
+ paddingLeft: 20,
190
+ paddingRight: 20,
191
+ paddingTop: 24,
192
+ },
193
+ }
194
+ )
195
+ );
@@ -0,0 +1,34 @@
1
+ import type { TemplateSavedRow } from "../types.js";
2
+ import {
3
+ featureGridThreeCol,
4
+ featureGridTwoCol,
5
+ founderSignOff,
6
+ pricingHighlight,
7
+ statStrip,
8
+ testimonialQuote,
9
+ videoCard,
10
+ } from "./content.js";
11
+ import { ctaBannerDark, ctaBannerSoft } from "./cta.js";
12
+ import { footerDark, footerLight, socialBar } from "./footers.js";
13
+ import { headerMinimal, headerWithNav } from "./headers.js";
14
+ import { heroCentered, heroSplit } from "./heroes.js";
15
+
16
+ /** All 16 Saved Rows in catalog order, ready for `<mail-quilt>`'s `savedRows` property. */
17
+ export const SAVED_ROWS: readonly TemplateSavedRow[] = [
18
+ headerMinimal,
19
+ headerWithNav,
20
+ heroCentered,
21
+ heroSplit,
22
+ featureGridTwoCol,
23
+ featureGridThreeCol,
24
+ statStrip,
25
+ testimonialQuote,
26
+ ctaBannerDark,
27
+ ctaBannerSoft,
28
+ pricingHighlight,
29
+ videoCard,
30
+ founderSignOff,
31
+ socialBar,
32
+ footerLight,
33
+ footerDark,
34
+ ];