@marlinjai/email-editor-blocks 0.2.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.
package/dist/index.mjs ADDED
@@ -0,0 +1,2725 @@
1
+ // src/registry.ts
2
+ import { createBlockRegistry } from "@marlinjai/email-editor-core";
3
+
4
+ // src/prebuilt/section-defaults.ts
5
+ var PALETTE = {
6
+ // Primary colors
7
+ primary: "#374151",
8
+ // Slate - buttons and accents
9
+ primaryDark: "#111827",
10
+ // Near black - headings
11
+ primaryLight: "#9ca3af",
12
+ // Light slate - secondary accents
13
+ // Background colors
14
+ bgMuted: "#f5f5f5",
15
+ // Main background
16
+ bgWhite: "#ffffff",
17
+ // White sections
18
+ bgLight: "#fafafa",
19
+ // Slightly off white
20
+ // Text colors
21
+ textDark: "#111827",
22
+ // Near black for headings
23
+ textBody: "#4b5563",
24
+ // Grey for body text
25
+ textLight: "#9ca3af",
26
+ // Light grey for captions
27
+ textWhite: "#ffffff",
28
+ // White text on dark bg
29
+ // Border & divider
30
+ border: "#e5e7eb",
31
+ // Subtle grey border
32
+ divider: "#d1d5db"
33
+ // Grey divider
34
+ };
35
+ var TYPOGRAPHY = {
36
+ // Heading styles
37
+ h1: "font-family: Helvetica, Arial, sans-serif; font-weight: 700; font-size: 32px; line-height: 1.2;",
38
+ h2: "font-family: Helvetica, Arial, sans-serif; font-weight: 700; font-size: 26px; line-height: 1.3;",
39
+ h3: "font-family: Helvetica, Arial, sans-serif; font-weight: 600; font-size: 21px; line-height: 1.4;",
40
+ h4: "font-family: Helvetica, Arial, sans-serif; font-weight: 600; font-size: 18px; line-height: 1.4;",
41
+ // Body styles
42
+ body: "font-family: Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.6;",
43
+ bodySmall: "font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.5;",
44
+ caption: "font-family: Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1.4;",
45
+ // Special styles
46
+ signature: 'font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 22px;',
47
+ label: "font-family: Helvetica, Arial, sans-serif; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;",
48
+ price: 'font-family: Georgia, "Times New Roman", serif; font-weight: 600;'
49
+ };
50
+ function placeholderImage(width, height) {
51
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}"><rect width="${width}" height="${height}" fill="${PALETTE.bgMuted}" stroke="${PALETTE.border}" stroke-width="2"/></svg>`;
52
+ return `data:image/svg+xml,${encodeURIComponent(svg)}`;
53
+ }
54
+ function placeholderSize(src) {
55
+ if (!src.startsWith("data:image/svg+xml,")) return null;
56
+ const decoded = decodeURIComponent(src.slice("data:image/svg+xml,".length));
57
+ const match = /^<svg [^>]*\bwidth="(\d+)" height="(\d+)"/.exec(decoded);
58
+ return match ? { width: Number(match[1]), height: Number(match[2]) } : null;
59
+ }
60
+ function hostedPlaceholder(src, base) {
61
+ if (!base) return src;
62
+ const size = placeholderSize(src);
63
+ if (!size) return src;
64
+ return `${base.replace(/\/+$/, "")}/p/${size.width}x${size.height}.png`;
65
+ }
66
+ var PLACEHOLDER_ALT = "Placeholder image, replace with your own";
67
+ var PLACEHOLDER = {
68
+ // Branding
69
+ companyName: "Your company",
70
+ tagline: "Your tagline goes here",
71
+ // Sender details
72
+ ownerName: "Your name",
73
+ ownerTitle: "Your title",
74
+ ownerContact: "Your email address",
75
+ // Common CTAs
76
+ ctaBookSession: "Book now",
77
+ ctaLearnMore: "Learn more",
78
+ ctaReadMore: "Read more",
79
+ ctaGetStarted: "Get started",
80
+ ctaExplore: "Explore more",
81
+ // Headlines
82
+ headlines: [
83
+ "Your headline here",
84
+ "A second headline",
85
+ "A third headline",
86
+ "One, two, three.",
87
+ "Your subject in a few words"
88
+ ],
89
+ // Common body text
90
+ bodyText: {
91
+ intro: "A short paragraph introducing this section. Replace it with your own text, and keep it to a couple of sentences so it stays readable on a phone.",
92
+ destination: "A closing line that says what the reader gets out of it.",
93
+ welcome: "Thank you for subscribing. Replace this paragraph with a welcome in your own words."
94
+ },
95
+ // Closing
96
+ closing: {
97
+ gratitude: "With kind regards,",
98
+ signature: "Your name"
99
+ },
100
+ // Footer
101
+ footer: {
102
+ unsubscribe: "If you no longer wish to receive these emails, you can",
103
+ unsubscribeLink: "unsubscribe here",
104
+ received: "You received this email because you subscribed to this newsletter."
105
+ },
106
+ // Logo, a placeholder square until the host sets its own
107
+ logoUrl: placeholderImage(120, 120),
108
+ // Website
109
+ website: "https://example.com"
110
+ };
111
+ function styledHeading(text, level = 1) {
112
+ const tag = `h${level}`;
113
+ const style = TYPOGRAPHY[`h${level}`];
114
+ return `<${tag} style="margin:0;${style}color:${PALETTE.textDark};">${text}</${tag}>`;
115
+ }
116
+ function styledBody(text, centered = false) {
117
+ const align = centered ? "text-align:center;" : "";
118
+ return `<p style="margin:0;${TYPOGRAPHY.body}color:${PALETTE.textBody};${align}">${text}</p>`;
119
+ }
120
+ function styledLabel(text) {
121
+ return `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">${text}</p>`;
122
+ }
123
+
124
+ // src/placeholders.ts
125
+ var LOADING_KEYS = /* @__PURE__ */ new Set(["src", "backgroundImage", "logoUrl", "thumbnail", "poster"]);
126
+ function withHostedPlaceholders(value, base) {
127
+ if (!base) return value;
128
+ return walk(value, base);
129
+ }
130
+ function walk(value, base, key) {
131
+ if (typeof value === "string") return key && LOADING_KEYS.has(key) ? hostedPlaceholder(value, base) : value;
132
+ if (Array.isArray(value)) return value.map((v) => walk(v, base, key));
133
+ if (value && typeof value === "object") {
134
+ return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, walk(v, base, k)]));
135
+ }
136
+ return value;
137
+ }
138
+
139
+ // src/text/index.ts
140
+ import { TextBlockSchema } from "@marlinjai/email-editor-core";
141
+ var textBlockDefinition = {
142
+ type: "text",
143
+ label: "Text",
144
+ category: "text",
145
+ description: "Rich text content",
146
+ defaultProps: {
147
+ content: "<p>Enter your text here...</p>",
148
+ align: "left",
149
+ color: "#000000",
150
+ fontSize: "14px",
151
+ fontFamily: "Georgia, serif"
152
+ },
153
+ propSchema: TextBlockSchema.omit({ id: true, type: true }),
154
+ toMJML: (block) => {
155
+ const attrs = [];
156
+ if (block.align) attrs.push(`align="${block.align}"`);
157
+ if (block.color) attrs.push(`color="${block.color}"`);
158
+ if (block.fontSize) attrs.push(`font-size="${block.fontSize}"`);
159
+ if (block.fontFamily) attrs.push(`font-family="${block.fontFamily}"`);
160
+ if (block.lineHeight) attrs.push(`line-height="${block.lineHeight}"`);
161
+ if (block.padding) {
162
+ const padding = [
163
+ block.padding.top,
164
+ block.padding.right,
165
+ block.padding.bottom,
166
+ block.padding.left
167
+ ].filter(Boolean).join(" ");
168
+ if (padding) attrs.push(`padding="${padding}"`);
169
+ }
170
+ return `<mj-text ${attrs.join(" ")} css-class="el-text el-${block.id}">${block.content}</mj-text>`;
171
+ }
172
+ };
173
+
174
+ // src/image/index.ts
175
+ import { ImageBlockSchema } from "@marlinjai/email-editor-core";
176
+ var imageBlockDefinition = {
177
+ type: "image",
178
+ label: "Image",
179
+ category: "media",
180
+ description: "Insert an image",
181
+ defaultProps: {
182
+ // A `data:` URI, not an address on an image host: a workspace whose
183
+ // `asset_policy` is `service_only` refuses every remote address at compile,
184
+ // so a freshly dropped image block would otherwise produce a mail that
185
+ // cannot be sent until its src is replaced.
186
+ src: placeholderImage(600, 400),
187
+ alt: PLACEHOLDER_ALT,
188
+ align: "center",
189
+ width: "600px"
190
+ },
191
+ propSchema: ImageBlockSchema.omit({ id: true, type: true }),
192
+ toMJML: (block) => {
193
+ const attrs = [`src="${block.src}"`, `data-block-id="${block.id}"`];
194
+ if (block.alt) attrs.push(`alt="${block.alt}"`);
195
+ if (block.width) attrs.push(`width="${block.width}"`);
196
+ if (block.height) attrs.push(`height="${block.height}"`);
197
+ if (block.align) attrs.push(`align="${block.align}"`);
198
+ if (block.href) attrs.push(`href="${block.href}"`);
199
+ if (block.padding) {
200
+ const padding = [
201
+ block.padding.top,
202
+ block.padding.right,
203
+ block.padding.bottom,
204
+ block.padding.left
205
+ ].filter(Boolean).join(" ");
206
+ if (padding) attrs.push(`padding="${padding}"`);
207
+ }
208
+ return `<mj-image ${attrs.join(" ")} css-class="el-image el-${block.id}" />`;
209
+ }
210
+ };
211
+
212
+ // src/button/index.ts
213
+ import { ButtonBlockSchema } from "@marlinjai/email-editor-core";
214
+ var buttonBlockDefinition = {
215
+ type: "button",
216
+ label: "Button",
217
+ category: "media",
218
+ description: "Call-to-action button",
219
+ defaultProps: {
220
+ label: "Click Here",
221
+ href: "https://example.com",
222
+ align: "center",
223
+ backgroundColor: "#944923",
224
+ color: "#ffffff",
225
+ borderRadius: "4px",
226
+ innerPadding: "12px 24px"
227
+ },
228
+ propSchema: ButtonBlockSchema.omit({ id: true, type: true }),
229
+ toMJML: (block) => {
230
+ const attrs = [`href="${block.href}"`, `data-block-id="${block.id}"`];
231
+ if (block.align) attrs.push(`align="${block.align}"`);
232
+ if (block.backgroundColor) attrs.push(`background-color="${block.backgroundColor}"`);
233
+ if (block.color) attrs.push(`color="${block.color}"`);
234
+ if (block.borderRadius) attrs.push(`border-radius="${block.borderRadius}"`);
235
+ if (block.innerPadding) attrs.push(`inner-padding="${block.innerPadding}"`);
236
+ if (block.padding) {
237
+ const padding = [
238
+ block.padding.top,
239
+ block.padding.right,
240
+ block.padding.bottom,
241
+ block.padding.left
242
+ ].filter(Boolean).join(" ");
243
+ if (padding) attrs.push(`padding="${padding}"`);
244
+ }
245
+ return `<mj-button ${attrs.join(" ")} css-class="el-button el-${block.id}">${block.label}</mj-button>`;
246
+ }
247
+ };
248
+
249
+ // src/divider/index.ts
250
+ import { DividerBlockSchema } from "@marlinjai/email-editor-core";
251
+ var dividerBlockDefinition = {
252
+ type: "divider",
253
+ label: "Divider",
254
+ category: "layout",
255
+ description: "Horizontal divider line",
256
+ defaultProps: {
257
+ borderColor: "#cccccc",
258
+ borderWidth: "1px",
259
+ borderStyle: "solid"
260
+ },
261
+ propSchema: DividerBlockSchema.omit({ id: true, type: true }),
262
+ toMJML: (block) => {
263
+ const attrs = [`data-block-id="${block.id}"`];
264
+ if (block.borderColor) attrs.push(`border-color="${block.borderColor}"`);
265
+ if (block.borderWidth) attrs.push(`border-width="${block.borderWidth}"`);
266
+ if (block.borderStyle) attrs.push(`border-style="${block.borderStyle}"`);
267
+ if (block.padding) {
268
+ const padding = [
269
+ block.padding.top,
270
+ block.padding.right,
271
+ block.padding.bottom,
272
+ block.padding.left
273
+ ].filter(Boolean).join(" ");
274
+ if (padding) attrs.push(`padding="${padding}"`);
275
+ }
276
+ return `<mj-divider ${attrs.join(" ")} css-class="el-divider el-${block.id}" />`;
277
+ }
278
+ };
279
+
280
+ // src/spacer/index.ts
281
+ import { SpacerBlockSchema } from "@marlinjai/email-editor-core";
282
+ var spacerBlockDefinition = {
283
+ type: "spacer",
284
+ label: "Spacer",
285
+ category: "layout",
286
+ description: "Vertical spacing",
287
+ defaultProps: {
288
+ height: "20px"
289
+ },
290
+ propSchema: SpacerBlockSchema.omit({ id: true, type: true }),
291
+ toMJML: (block) => {
292
+ return `<mj-spacer height="${block.height}" css-class="el-spacer el-${block.id}" />`;
293
+ }
294
+ };
295
+
296
+ // src/social/index.ts
297
+ import { SocialBlockSchema } from "@marlinjai/email-editor-core";
298
+ var SOCIAL_COLORS = {
299
+ facebook: "#1877F2",
300
+ twitter: "#000000",
301
+ instagram: "#E4405F",
302
+ linkedin: "#0A66C2",
303
+ youtube: "#FF0000",
304
+ pinterest: "#BD081C",
305
+ github: "#181717"
306
+ };
307
+ function getSocialIconDataUri(platform) {
308
+ const svgIcons = {
309
+ facebook: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>',
310
+ twitter: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg>',
311
+ instagram: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 0C8.74 0 8.333.015 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.74 0 12s.015 3.667.072 4.947c.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.74 24 12 24s3.667-.015 4.947-.072c4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"/></svg>',
312
+ linkedin: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>',
313
+ youtube: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/></svg>',
314
+ pinterest: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345c-.091.378-.293 1.194-.333 1.361-.052.218-.174.265-.402.159-1.495-.696-2.428-2.882-2.428-4.64 0-3.779 2.744-7.253 7.917-7.253 4.158 0 7.389 2.963 7.389 6.923 0 4.13-2.607 7.461-6.229 7.461-1.217 0-2.36-.632-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"/></svg>',
315
+ github: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>'
316
+ };
317
+ const svg = svgIcons[platform] || svgIcons.facebook;
318
+ return `data:image/svg+xml;base64,${Buffer.from(svg).toString("base64")}`;
319
+ }
320
+ var socialBlockDefinition = {
321
+ type: "social",
322
+ label: "Social Icons",
323
+ category: "media",
324
+ description: "Social media links",
325
+ defaultProps: {
326
+ mode: "horizontal",
327
+ align: "center",
328
+ iconSize: "40px",
329
+ iconPadding: "8px",
330
+ borderRadius: "999px",
331
+ // Round icons by default
332
+ links: [
333
+ { platform: "facebook", url: "https://facebook.com" },
334
+ { platform: "instagram", url: "https://instagram.com" },
335
+ { platform: "linkedin", url: "https://linkedin.com" }
336
+ ]
337
+ },
338
+ propSchema: SocialBlockSchema.omit({ id: true, type: true }),
339
+ toMJML: (block) => {
340
+ const iconSize = block.iconSize || "40px";
341
+ const iconPadding = block.iconPadding || "8px";
342
+ const borderRadius = block.borderRadius || "999px";
343
+ const align = block.align || "center";
344
+ const isVertical = block.mode === "vertical";
345
+ const sizeNum = parseInt(iconSize, 10) || 40;
346
+ const innerIconSize = Math.round(sizeNum * 0.5);
347
+ const paddingNum = parseInt(iconPadding, 10) || 8;
348
+ const getLinkColor = (link) => {
349
+ return link.color || SOCIAL_COLORS[link.platform] || "#666666";
350
+ };
351
+ if (isVertical) {
352
+ return block.links.map((link) => {
353
+ const bgColor = getLinkColor(link);
354
+ const iconUrl = getSocialIconDataUri(link.platform);
355
+ return `<mj-button href="${link.url}" background-color="${bgColor}" border-radius="${borderRadius}" width="${iconSize}" height="${iconSize}" padding="${iconPadding} 0" inner-padding="0" align="${align}" css-class="el-social-btn el-${block.id}-${link.platform}"><img src="${iconUrl}" alt="${link.platform}" width="${innerIconSize}" height="${innerIconSize}" style="display:block;margin:auto;" /></mj-button>`;
356
+ }).join("\n");
357
+ }
358
+ const alignMargin = align === "center" ? "0 auto" : align === "right" ? "0 0 0 auto" : "0 auto 0 0";
359
+ const socialCells = block.links.map((link, index) => {
360
+ const bgColor = getLinkColor(link);
361
+ const iconUrl = getSocialIconDataUri(link.platform);
362
+ const isLast = index === block.links.length - 1;
363
+ const cellPadding = isLast ? "0" : `0 ${paddingNum}px 0 0`;
364
+ const paddingForCentering = Math.round((sizeNum - innerIconSize) / 2);
365
+ return `<td style="padding: ${cellPadding};"><a href="${link.url}" target="_blank" style="display: block; width: ${iconSize}; height: ${iconSize}; background-color: ${bgColor}; border-radius: ${borderRadius}; text-decoration: none;"><img src="${iconUrl}" alt="${link.platform}" width="${innerIconSize}" height="${innerIconSize}" style="display: block; margin: ${paddingForCentering}px auto 0 auto;" /></a></td>`;
366
+ }).join("");
367
+ return `<mj-raw><table align="${align}" role="presentation" cellpadding="0" cellspacing="0" style="margin: ${alignMargin};"><tr>${socialCells}</tr></table></mj-raw>`;
368
+ }
369
+ };
370
+
371
+ // src/hero/index.ts
372
+ import { HeroBlockSchema } from "@marlinjai/email-editor-core";
373
+ var heroBlockDefinition = {
374
+ type: "hero",
375
+ label: "Hero",
376
+ category: "layout",
377
+ description: "Full-width hero with background",
378
+ defaultProps: {
379
+ // A `data:` URI rather than a remote one, so a `service_only` workspace can
380
+ // send a mail containing a hero whose background has not been chosen yet.
381
+ backgroundImage: placeholderImage(1200, 600),
382
+ backgroundHeight: "400px",
383
+ backgroundColor: "#374151",
384
+ verticalAlign: "middle",
385
+ mode: "fluid-height"
386
+ },
387
+ propSchema: HeroBlockSchema.omit({ id: true, type: true }),
388
+ toMJML: (block) => {
389
+ const attrs = [
390
+ `background-url="${block.backgroundImage}"`,
391
+ `css-class="el-hero el-${block.id}"`
392
+ ];
393
+ if (block.backgroundHeight) attrs.push(`background-height="${block.backgroundHeight}"`);
394
+ if (block.backgroundWidth) attrs.push(`background-width="${block.backgroundWidth}"`);
395
+ if (block.backgroundColor) attrs.push(`background-color="${block.backgroundColor}"`);
396
+ if (block.verticalAlign) attrs.push(`vertical-align="${block.verticalAlign}"`);
397
+ if (block.mode) attrs.push(`mode="${block.mode}"`);
398
+ return `
399
+ <mj-hero ${attrs.join(" ")}>
400
+ <mj-text align="center" color="#ffffff" font-size="32px" font-weight="bold">
401
+ Hero Title
402
+ </mj-text>
403
+ <mj-text align="center" color="#ffffff" font-size="16px">
404
+ Add your hero content here
405
+ </mj-text>
406
+ </mj-hero>
407
+ `.trim();
408
+ }
409
+ };
410
+
411
+ // src/accordion/index.ts
412
+ import { AccordionBlockSchema } from "@marlinjai/email-editor-core";
413
+ var accordionBlockDefinition = {
414
+ type: "accordion",
415
+ label: "Accordion",
416
+ category: "text",
417
+ description: "Collapsible FAQ sections",
418
+ defaultProps: {
419
+ items: [
420
+ { title: "Question 1", content: "Answer to question 1" },
421
+ { title: "Question 2", content: "Answer to question 2" }
422
+ ],
423
+ iconPosition: "right",
424
+ borderColor: "#e0e0e0"
425
+ },
426
+ propSchema: AccordionBlockSchema.omit({ id: true, type: true }),
427
+ toMJML: (block) => {
428
+ const attrs = [`css-class="el-accordion el-${block.id}"`];
429
+ if (block.iconPosition) attrs.push(`icon-position="${block.iconPosition}"`);
430
+ if (block.borderColor) attrs.push(`border="${block.borderColor}"`);
431
+ if (block.fontFamily) attrs.push(`font-family="${block.fontFamily}"`);
432
+ const items = block.items.map(
433
+ (item) => `
434
+ <mj-accordion-element>
435
+ <mj-accordion-title>${item.title}</mj-accordion-title>
436
+ <mj-accordion-text>${item.content}</mj-accordion-text>
437
+ </mj-accordion-element>`
438
+ ).join("\n");
439
+ return `
440
+ <mj-accordion ${attrs.join(" ")}>
441
+ ${items}
442
+ </mj-accordion>
443
+ `.trim();
444
+ }
445
+ };
446
+
447
+ // src/raw/index.ts
448
+ import { RawBlockSchema } from "@marlinjai/email-editor-core";
449
+ var rawBlockDefinition = {
450
+ type: "raw",
451
+ label: "HTML Block",
452
+ category: "layout",
453
+ description: "Custom HTML code",
454
+ defaultProps: {
455
+ html: "<!-- Custom HTML here -->"
456
+ },
457
+ propSchema: RawBlockSchema.omit({ id: true, type: true }),
458
+ toMJML: (block) => {
459
+ return `<mj-raw css-class="el-raw el-${block.id}">${block.html}</mj-raw>`;
460
+ }
461
+ };
462
+
463
+ // src/navbar/index.ts
464
+ import { NavbarBlockSchema } from "@marlinjai/email-editor-core";
465
+ var navbarBlockDefinition = {
466
+ type: "navbar",
467
+ label: "Navigation",
468
+ category: "layout",
469
+ description: "Navigation menu with links",
470
+ defaultProps: {
471
+ // `example.com`, not `#`: a fragment is a dead end in a reader's inbox,
472
+ // where there is no page to scroll. It has to be replaced either way, and
473
+ // an address that goes somewhere fails visibly rather than silently.
474
+ links: [
475
+ { label: "Home", href: "https://example.com" },
476
+ { label: "About", href: "https://example.com" },
477
+ { label: "Contact", href: "https://example.com" }
478
+ ],
479
+ hamburger: true,
480
+ align: "center"
481
+ },
482
+ propSchema: NavbarBlockSchema.omit({ id: true, type: true }),
483
+ toMJML: (block) => {
484
+ const attrs = [`css-class="el-navbar el-${block.id}"`];
485
+ if (block.hamburger) attrs.push('hamburger="hamburger"');
486
+ if (block.baseUrl) attrs.push(`base-url="${block.baseUrl}"`);
487
+ if (block.align) attrs.push(`align="${block.align}"`);
488
+ if (block.icoColor) attrs.push(`ico-color="${block.icoColor}"`);
489
+ if (block.padding) {
490
+ const padding = [
491
+ block.padding.top,
492
+ block.padding.right,
493
+ block.padding.bottom,
494
+ block.padding.left
495
+ ].filter(Boolean).join(" ");
496
+ if (padding) attrs.push(`padding="${padding}"`);
497
+ }
498
+ const links = block.links.map((link) => {
499
+ const linkAttrs = [`href="${link.href}"`];
500
+ if (link.color) linkAttrs.push(`color="${link.color}"`);
501
+ return `<mj-navbar-link ${linkAttrs.join(" ")}>${link.label}</mj-navbar-link>`;
502
+ }).join("\n ");
503
+ return `
504
+ <mj-navbar ${attrs.join(" ")}>
505
+ ${links}
506
+ </mj-navbar>
507
+ `.trim();
508
+ }
509
+ };
510
+
511
+ // src/carousel/index.ts
512
+ import { CarouselBlockSchema } from "@marlinjai/email-editor-core";
513
+ var carouselBlockDefinition = {
514
+ type: "carousel",
515
+ label: "Carousel",
516
+ category: "media",
517
+ description: "Image gallery with navigation",
518
+ defaultProps: {
519
+ images: [
520
+ // `data:` URIs, so a `service_only` workspace can send a carousel whose
521
+ // slides have not been replaced yet.
522
+ { src: placeholderImage(600, 300), alt: PLACEHOLDER_ALT },
523
+ { src: placeholderImage(600, 300), alt: PLACEHOLDER_ALT },
524
+ { src: placeholderImage(600, 300), alt: PLACEHOLDER_ALT }
525
+ ],
526
+ thumbnails: "visible",
527
+ borderRadius: "6px"
528
+ },
529
+ propSchema: CarouselBlockSchema.omit({ id: true, type: true }),
530
+ toMJML: (block) => {
531
+ const attrs = [`css-class="el-carousel el-${block.id}"`];
532
+ if (block.thumbnails) attrs.push(`thumbnails="${block.thumbnails}"`);
533
+ if (block.borderRadius) attrs.push(`border-radius="${block.borderRadius}"`);
534
+ if (block.iconWidth) attrs.push(`icon-width="${block.iconWidth}"`);
535
+ if (block.tbBorderRadius) attrs.push(`tb-border-radius="${block.tbBorderRadius}"`);
536
+ if (block.padding) {
537
+ const padding = [
538
+ block.padding.top,
539
+ block.padding.right,
540
+ block.padding.bottom,
541
+ block.padding.left
542
+ ].filter(Boolean).join(" ");
543
+ if (padding) attrs.push(`padding="${padding}"`);
544
+ }
545
+ const images = block.images.map((img) => {
546
+ const imgAttrs = [`src="${img.src}"`];
547
+ if (img.alt) imgAttrs.push(`alt="${img.alt}"`);
548
+ if (img.href) imgAttrs.push(`href="${img.href}"`);
549
+ if (img.thumbnailSrc) imgAttrs.push(`thumbnails-src="${img.thumbnailSrc}"`);
550
+ return `<mj-carousel-image ${imgAttrs.join(" ")} />`;
551
+ }).join("\n ");
552
+ return `
553
+ <mj-carousel ${attrs.join(" ")}>
554
+ ${images}
555
+ </mj-carousel>
556
+ `.trim();
557
+ }
558
+ };
559
+
560
+ // src/table/index.ts
561
+ import { TableBlockSchema } from "@marlinjai/email-editor-core";
562
+ var tableBlockDefinition = {
563
+ type: "table",
564
+ label: "Table",
565
+ category: "text",
566
+ description: "Data table with rows and columns",
567
+ defaultProps: {
568
+ headers: ["Column 1", "Column 2", "Column 3"],
569
+ rows: [
570
+ ["Data 1", "Data 2", "Data 3"],
571
+ ["Data 4", "Data 5", "Data 6"]
572
+ ],
573
+ align: "left",
574
+ color: "#000000",
575
+ fontSize: "14px",
576
+ cellpadding: "8px"
577
+ },
578
+ propSchema: TableBlockSchema.omit({ id: true, type: true }),
579
+ toMJML: (block) => {
580
+ const attrs = [`css-class="el-table el-${block.id}"`];
581
+ if (block.align) attrs.push(`align="${block.align}"`);
582
+ if (block.color) attrs.push(`color="${block.color}"`);
583
+ if (block.fontFamily) attrs.push(`font-family="${block.fontFamily}"`);
584
+ if (block.fontSize) attrs.push(`font-size="${block.fontSize}"`);
585
+ if (block.cellpadding) attrs.push(`cellpadding="${block.cellpadding}"`);
586
+ if (block.cellspacing) attrs.push(`cellspacing="${block.cellspacing}"`);
587
+ if (block.border) attrs.push(`border="${block.border}"`);
588
+ if (block.padding) {
589
+ const padding = [
590
+ block.padding.top,
591
+ block.padding.right,
592
+ block.padding.bottom,
593
+ block.padding.left
594
+ ].filter(Boolean).join(" ");
595
+ if (padding) attrs.push(`padding="${padding}"`);
596
+ }
597
+ const headerCells = block.headers.map((h) => `<th style="padding: 8px; border-bottom: 1px solid #ddd; text-align: left;">${h}</th>`).join("");
598
+ const headerRow = `<tr style="background-color: #f5f5f5;">${headerCells}</tr>`;
599
+ const dataRows = block.rows.map((row) => {
600
+ const cells = row.map((cell) => `<td style="padding: 8px; border-bottom: 1px solid #eee;">${cell}</td>`).join("");
601
+ return `<tr>${cells}</tr>`;
602
+ }).join("\n ");
603
+ return `
604
+ <mj-table ${attrs.join(" ")}>
605
+ ${headerRow}
606
+ ${dataRows}
607
+ </mj-table>
608
+ `.trim();
609
+ }
610
+ };
611
+
612
+ // src/branded/index.ts
613
+ import { HeaderBlockSchema, FooterBlockSchema } from "@marlinjai/email-editor-core";
614
+ var headerBlockDefinition = {
615
+ type: "header",
616
+ label: "Header",
617
+ category: "brand",
618
+ description: "Newsletter header",
619
+ locked: true,
620
+ defaultProps: {
621
+ locked: true
622
+ },
623
+ propSchema: HeaderBlockSchema.omit({ id: true, type: true }),
624
+ toMJML: (block) => {
625
+ return `
626
+ <mj-wrapper background-color="#ffffff" padding="20px" css-class="el-header el-${block.id}">
627
+ <mj-section>
628
+ <mj-column>
629
+ <!-- Nothing: this block carries no props, so anything here is content
630
+ whoever sends the mail cannot change. It held a placeholder logo,
631
+ which the send guard would refuse with no way for them to fix it. -->
632
+ <mj-spacer height="1px" />
633
+ </mj-column>
634
+ </mj-section>
635
+ </mj-wrapper>
636
+ `.trim();
637
+ }
638
+ };
639
+ var footerBlockDefinition = {
640
+ type: "footer",
641
+ label: "Footer",
642
+ category: "brand",
643
+ description: "Newsletter footer with the unsubscribe link",
644
+ locked: true,
645
+ defaultProps: {
646
+ locked: true
647
+ },
648
+ propSchema: FooterBlockSchema.omit({ id: true, type: true }),
649
+ toMJML: (block) => {
650
+ return `
651
+ <mj-wrapper background-color="#f5f5f5" padding="20px" css-class="el-footer el-${block.id}">
652
+ <mj-section>
653
+ <mj-column>
654
+ <mj-text align="center" font-size="12px" color="#666666">
655
+ <a href="{{unsubscribe_url}}" style="color: #374151; text-decoration: underline;">Unsubscribe</a>
656
+ </mj-text>
657
+ </mj-column>
658
+ </mj-section>
659
+ </mj-wrapper>
660
+ `.trim();
661
+ }
662
+ };
663
+
664
+ // src/registry.ts
665
+ function createStandardBlockRegistry(options = {}) {
666
+ const registry = createBlockRegistry();
667
+ const hosted = (definition) => options.placeholderBase ? { ...definition, defaultProps: withHostedPlaceholders(definition.defaultProps, options.placeholderBase) } : definition;
668
+ registry.register(textBlockDefinition);
669
+ registry.register(hosted(imageBlockDefinition));
670
+ registry.register(buttonBlockDefinition);
671
+ registry.register(dividerBlockDefinition);
672
+ registry.register(spacerBlockDefinition);
673
+ registry.register(socialBlockDefinition);
674
+ registry.register(hosted(heroBlockDefinition));
675
+ registry.register(accordionBlockDefinition);
676
+ registry.register(rawBlockDefinition);
677
+ registry.register(navbarBlockDefinition);
678
+ registry.register(hosted(carouselBlockDefinition));
679
+ registry.register(tableBlockDefinition);
680
+ registry.register(headerBlockDefinition);
681
+ registry.register(footerBlockDefinition);
682
+ return registry;
683
+ }
684
+
685
+ // src/prebuilt/index.ts
686
+ import { createPrebuiltTemplateRegistry } from "@marlinjai/email-editor-core";
687
+
688
+ // src/prebuilt/hero-templates.ts
689
+ var heroMainTemplate = {
690
+ id: "hero-main",
691
+ name: "Hero - Main",
692
+ category: "hero",
693
+ description: "Full-width hero with a coloured background and a button",
694
+ section: {
695
+ id: "hero-main-section",
696
+ type: "section",
697
+ backgroundColor: PALETTE.primary,
698
+ padding: { top: "80px", bottom: "80px" },
699
+ columns: [
700
+ {
701
+ id: "hero-main-col",
702
+ blocks: [
703
+ {
704
+ id: "hero-main-title",
705
+ type: "text",
706
+ content: `<h1 style="margin:0;${TYPOGRAPHY.h1}color:${PALETTE.textWhite};">Your headline here</h1>`,
707
+ align: "center"
708
+ },
709
+ {
710
+ id: "hero-main-subtitle",
711
+ type: "text",
712
+ content: `<p style="margin:20px 0 32px 0;${TYPOGRAPHY.body}color:${PALETTE.textWhite};">${PLACEHOLDER.tagline}</p>`,
713
+ align: "center"
714
+ },
715
+ {
716
+ id: "hero-main-button",
717
+ type: "button",
718
+ label: PLACEHOLDER.ctaBookSession,
719
+ href: PLACEHOLDER.website,
720
+ align: "center",
721
+ backgroundColor: PALETTE.bgWhite,
722
+ color: PALETTE.primary,
723
+ borderRadius: "30px",
724
+ padding: { left: "32px", right: "32px", top: "14px", bottom: "14px" }
725
+ }
726
+ ]
727
+ }
728
+ ]
729
+ }
730
+ };
731
+ var heroNewsletterTemplate = {
732
+ id: "hero-newsletter",
733
+ name: "Hero - Newsletter Header",
734
+ category: "hero",
735
+ description: "Centered logo with welcome headline for newsletters",
736
+ section: {
737
+ id: "hero-newsletter-section",
738
+ type: "section",
739
+ backgroundColor: PALETTE.bgMuted,
740
+ padding: { top: "50px", bottom: "40px" },
741
+ columns: [
742
+ {
743
+ id: "hero-newsletter-col",
744
+ blocks: [
745
+ {
746
+ id: "hero-newsletter-logo",
747
+ type: "image",
748
+ src: PLACEHOLDER.logoUrl,
749
+ alt: PLACEHOLDER_ALT,
750
+ width: "120px",
751
+ align: "center"
752
+ },
753
+ {
754
+ id: "hero-newsletter-title",
755
+ type: "text",
756
+ content: `<h1 style="margin:30px 0 16px 0;${TYPOGRAPHY.h1}color:${PALETTE.textDark};">Your newsletter title</h1>`,
757
+ align: "center"
758
+ },
759
+ {
760
+ id: "hero-newsletter-tagline",
761
+ type: "text",
762
+ content: `<p style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.primary};">${PLACEHOLDER.tagline}</p>`,
763
+ align: "center"
764
+ }
765
+ ]
766
+ }
767
+ ]
768
+ }
769
+ };
770
+ var heroMinimalTemplate = {
771
+ id: "hero-minimal",
772
+ name: "Hero - Minimal",
773
+ category: "hero",
774
+ description: "Clean minimal hero with divider",
775
+ section: {
776
+ id: "hero-minimal-section",
777
+ type: "section",
778
+ backgroundColor: PALETTE.bgWhite,
779
+ padding: { top: "50px", bottom: "40px" },
780
+ columns: [
781
+ {
782
+ id: "hero-minimal-col",
783
+ blocks: [
784
+ {
785
+ id: "hero-minimal-title",
786
+ type: "text",
787
+ content: `<h1 style="margin:0;${TYPOGRAPHY.h1}color:${PALETTE.textDark};">A second headline</h1>`,
788
+ align: "center"
789
+ },
790
+ {
791
+ id: "hero-minimal-divider",
792
+ type: "divider",
793
+ borderColor: PALETTE.divider,
794
+ borderWidth: "2px",
795
+ borderStyle: "solid",
796
+ padding: { top: "24px", bottom: "24px" }
797
+ },
798
+ {
799
+ id: "hero-minimal-text",
800
+ type: "text",
801
+ content: `<p style="margin:0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.destination}</p>`,
802
+ align: "center"
803
+ }
804
+ ]
805
+ }
806
+ ]
807
+ }
808
+ };
809
+ var heroSplitTemplate = {
810
+ id: "hero-split",
811
+ name: "Hero - Split",
812
+ category: "hero",
813
+ description: "Hero with image and text side by side",
814
+ section: {
815
+ id: "hero-split-section",
816
+ type: "section",
817
+ backgroundColor: PALETTE.bgMuted,
818
+ padding: { top: "40px", bottom: "40px" },
819
+ noStack: true,
820
+ columns: [
821
+ {
822
+ id: "hero-split-text-col",
823
+ width: 50,
824
+ verticalAlign: "middle",
825
+ padding: { right: "20px" },
826
+ blocks: [
827
+ {
828
+ id: "hero-split-label",
829
+ type: "text",
830
+ content: `<p style="margin:0 0 12px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">CATEGORY</p>`,
831
+ align: "left"
832
+ },
833
+ {
834
+ id: "hero-split-title",
835
+ type: "text",
836
+ content: `<h1 style="margin:0;${TYPOGRAPHY.h1}color:${PALETTE.textDark};">A third headline</h1>`,
837
+ align: "left"
838
+ },
839
+ {
840
+ id: "hero-split-desc",
841
+ type: "text",
842
+ content: `<p style="margin:20px 0 28px 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.intro}</p>`,
843
+ align: "left"
844
+ },
845
+ {
846
+ id: "hero-split-button",
847
+ type: "button",
848
+ label: PLACEHOLDER.ctaLearnMore,
849
+ href: PLACEHOLDER.website,
850
+ align: "left",
851
+ backgroundColor: PALETTE.primary,
852
+ color: PALETTE.textWhite,
853
+ borderRadius: "30px",
854
+ padding: { left: "28px", right: "28px", top: "12px", bottom: "12px" }
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ id: "hero-split-image-col",
860
+ width: 50,
861
+ blocks: [
862
+ {
863
+ id: "hero-split-image",
864
+ type: "image",
865
+ src: placeholderImage(400, 350),
866
+ alt: PLACEHOLDER_ALT,
867
+ width: "100%",
868
+ align: "center",
869
+ borderRadius: "8px"
870
+ }
871
+ ]
872
+ }
873
+ ]
874
+ }
875
+ };
876
+ var heroTemplates = [
877
+ heroMainTemplate,
878
+ heroNewsletterTemplate,
879
+ heroMinimalTemplate,
880
+ heroSplitTemplate
881
+ ];
882
+
883
+ // src/prebuilt/content-templates.ts
884
+ var textImageRightTemplate = {
885
+ id: "text-image-right",
886
+ name: "Text + Image Right",
887
+ category: "content",
888
+ description: "Text block with image on the right",
889
+ section: {
890
+ id: "text-image-right-section",
891
+ type: "section",
892
+ backgroundColor: PALETTE.bgWhite,
893
+ padding: { top: "40px", bottom: "40px" },
894
+ noStack: true,
895
+ columns: [
896
+ {
897
+ id: "text-image-right-text-col",
898
+ width: 55,
899
+ verticalAlign: "middle",
900
+ padding: { right: "24px" },
901
+ blocks: [
902
+ {
903
+ id: "text-image-right-label",
904
+ type: "text",
905
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">YOUR JOURNEY</p>`,
906
+ align: "left"
907
+ },
908
+ {
909
+ id: "text-image-right-title",
910
+ type: "text",
911
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h2}color:${PALETTE.textDark};">Your headline here</h2>`,
912
+ align: "left"
913
+ },
914
+ {
915
+ id: "text-image-right-body",
916
+ type: "text",
917
+ content: `<p style="margin:16px 0 0 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.intro}</p>`,
918
+ align: "left"
919
+ }
920
+ ]
921
+ },
922
+ {
923
+ id: "text-image-right-image-col",
924
+ width: 45,
925
+ blocks: [
926
+ {
927
+ id: "text-image-right-image",
928
+ type: "image",
929
+ src: placeholderImage(350, 280),
930
+ alt: PLACEHOLDER_ALT,
931
+ width: "100%",
932
+ align: "center",
933
+ borderRadius: "8px"
934
+ }
935
+ ]
936
+ }
937
+ ]
938
+ }
939
+ };
940
+ var textImageLeftTemplate = {
941
+ id: "text-image-left",
942
+ name: "Text + Image Left",
943
+ category: "content",
944
+ description: "Text block with image on the left",
945
+ section: {
946
+ id: "text-image-left-section",
947
+ type: "section",
948
+ backgroundColor: PALETTE.bgMuted,
949
+ padding: { top: "40px", bottom: "40px" },
950
+ noStack: true,
951
+ columns: [
952
+ {
953
+ id: "text-image-left-image-col",
954
+ width: 45,
955
+ blocks: [
956
+ {
957
+ id: "text-image-left-image",
958
+ type: "image",
959
+ src: placeholderImage(350, 280),
960
+ alt: PLACEHOLDER_ALT,
961
+ width: "100%",
962
+ align: "center",
963
+ borderRadius: "8px"
964
+ }
965
+ ]
966
+ },
967
+ {
968
+ id: "text-image-left-text-col",
969
+ width: 55,
970
+ verticalAlign: "middle",
971
+ padding: { left: "24px" },
972
+ blocks: [
973
+ {
974
+ id: "text-image-left-label",
975
+ type: "text",
976
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">THE SESSION</p>`,
977
+ align: "left"
978
+ },
979
+ {
980
+ id: "text-image-left-title",
981
+ type: "text",
982
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h2}color:${PALETTE.textDark};">What to Expect</h2>`,
983
+ align: "left"
984
+ },
985
+ {
986
+ id: "text-image-left-body",
987
+ type: "text",
988
+ content: `<p style="margin:16px 0 0 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.intro}</p>`,
989
+ align: "left"
990
+ }
991
+ ]
992
+ }
993
+ ]
994
+ }
995
+ };
996
+ var sectionTitle1Template = {
997
+ id: "section-title-1",
998
+ name: "Section Title - Simple",
999
+ category: "content",
1000
+ description: "Centered headline with body text",
1001
+ section: {
1002
+ id: "section-title-1-section",
1003
+ type: "section",
1004
+ backgroundColor: PALETTE.bgWhite,
1005
+ padding: { top: "40px", bottom: "40px", left: "40px", right: "40px" },
1006
+ columns: [
1007
+ {
1008
+ id: "section-title-1-col",
1009
+ blocks: [
1010
+ {
1011
+ id: "section-title-1-title",
1012
+ type: "text",
1013
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h2}color:${PALETTE.textDark};">A second headline</h2>`,
1014
+ align: "left"
1015
+ },
1016
+ {
1017
+ id: "section-title-1-divider",
1018
+ type: "divider",
1019
+ borderColor: PALETTE.primary,
1020
+ borderWidth: "2px",
1021
+ borderStyle: "solid",
1022
+ padding: { top: "16px", bottom: "16px" },
1023
+ width: "60px"
1024
+ },
1025
+ {
1026
+ id: "section-title-1-body",
1027
+ type: "text",
1028
+ content: `<p style="margin:0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.intro}</p>`,
1029
+ align: "left"
1030
+ }
1031
+ ]
1032
+ }
1033
+ ]
1034
+ }
1035
+ };
1036
+ var sectionTitle2Template = {
1037
+ id: "section-title-2",
1038
+ name: "Section Title - With Button",
1039
+ category: "content",
1040
+ description: "Headline with body text and CTA button",
1041
+ section: {
1042
+ id: "section-title-2-section",
1043
+ type: "section",
1044
+ backgroundColor: PALETTE.bgMuted,
1045
+ padding: { top: "40px", bottom: "40px", left: "40px", right: "40px" },
1046
+ columns: [
1047
+ {
1048
+ id: "section-title-2-col",
1049
+ blocks: [
1050
+ {
1051
+ id: "section-title-2-title",
1052
+ type: "text",
1053
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h2}color:${PALETTE.textDark};">Ready to Begin?</h2>`,
1054
+ align: "left"
1055
+ },
1056
+ {
1057
+ id: "section-title-2-divider",
1058
+ type: "divider",
1059
+ borderColor: PALETTE.primary,
1060
+ borderWidth: "2px",
1061
+ borderStyle: "solid",
1062
+ padding: { top: "16px", bottom: "16px" },
1063
+ width: "60px"
1064
+ },
1065
+ {
1066
+ id: "section-title-2-body",
1067
+ type: "text",
1068
+ content: `<p style="margin:0 0 24px 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.destination}</p>`,
1069
+ align: "left"
1070
+ },
1071
+ {
1072
+ id: "section-title-2-button",
1073
+ type: "button",
1074
+ label: PLACEHOLDER.ctaBookSession,
1075
+ href: PLACEHOLDER.website,
1076
+ align: "left",
1077
+ backgroundColor: PALETTE.primary,
1078
+ color: PALETTE.textWhite,
1079
+ borderRadius: "30px",
1080
+ padding: { left: "28px", right: "28px", top: "12px", bottom: "12px" }
1081
+ }
1082
+ ]
1083
+ }
1084
+ ]
1085
+ }
1086
+ };
1087
+ var sectionTitle3Template = {
1088
+ id: "section-title-3",
1089
+ name: "Section Title - Colored",
1090
+ category: "content",
1091
+ description: "Headline with colored background strip",
1092
+ section: {
1093
+ id: "section-title-3-section",
1094
+ type: "section",
1095
+ backgroundColor: PALETTE.primary,
1096
+ padding: { top: "30px", bottom: "30px", left: "40px", right: "40px" },
1097
+ columns: [
1098
+ {
1099
+ id: "section-title-3-col",
1100
+ blocks: [
1101
+ {
1102
+ id: "section-title-3-title",
1103
+ type: "text",
1104
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h2}color:${PALETTE.textWhite};">A third headline</h2>`,
1105
+ align: "center"
1106
+ },
1107
+ {
1108
+ id: "section-title-3-body",
1109
+ type: "text",
1110
+ content: `<p style="margin:12px 0 0 0;${TYPOGRAPHY.body}color:rgba(255,255,255,0.9);">${PLACEHOLDER.bodyText.destination}</p>`,
1111
+ align: "center"
1112
+ }
1113
+ ]
1114
+ }
1115
+ ]
1116
+ }
1117
+ };
1118
+ var quoteBlockTemplate = {
1119
+ id: "quote-block",
1120
+ name: "Quote Block",
1121
+ category: "content",
1122
+ description: "Centered quote with attribution",
1123
+ section: {
1124
+ id: "quote-block-section",
1125
+ type: "section",
1126
+ backgroundColor: PALETTE.bgLight,
1127
+ padding: { top: "50px", bottom: "50px", left: "60px", right: "60px" },
1128
+ columns: [
1129
+ {
1130
+ id: "quote-block-col",
1131
+ blocks: [
1132
+ {
1133
+ id: "quote-block-text",
1134
+ type: "text",
1135
+ content: `<p style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">&ldquo;A short quotation goes here. Replace it with something a reader of yours would want to pass on.&rdquo;</p>`,
1136
+ align: "center"
1137
+ },
1138
+ {
1139
+ id: "quote-block-divider",
1140
+ type: "divider",
1141
+ borderColor: PALETTE.divider,
1142
+ borderWidth: "1px",
1143
+ borderStyle: "solid",
1144
+ padding: { top: "24px", bottom: "24px" },
1145
+ width: "80px"
1146
+ },
1147
+ {
1148
+ id: "quote-block-attribution",
1149
+ type: "text",
1150
+ content: `<p style="margin:0;${TYPOGRAPHY.bodySmall}color:${PALETTE.primary};">${PLACEHOLDER.ownerName}</p>`,
1151
+ align: "center"
1152
+ }
1153
+ ]
1154
+ }
1155
+ ]
1156
+ }
1157
+ };
1158
+ var dividerSectionTemplate = {
1159
+ id: "divider-section",
1160
+ name: "Divider",
1161
+ category: "content",
1162
+ description: "Simple decorative divider",
1163
+ section: {
1164
+ id: "divider-section-section",
1165
+ type: "section",
1166
+ backgroundColor: PALETTE.bgWhite,
1167
+ padding: { top: "20px", bottom: "20px" },
1168
+ columns: [
1169
+ {
1170
+ id: "divider-section-col",
1171
+ blocks: [
1172
+ {
1173
+ id: "divider-section-divider",
1174
+ type: "divider",
1175
+ borderColor: PALETTE.border,
1176
+ borderWidth: "1px",
1177
+ borderStyle: "solid"
1178
+ }
1179
+ ]
1180
+ }
1181
+ ]
1182
+ }
1183
+ };
1184
+ var spacerSectionTemplate = {
1185
+ id: "spacer-section",
1186
+ name: "Spacer",
1187
+ category: "content",
1188
+ description: "Empty space between sections",
1189
+ section: {
1190
+ id: "spacer-section-section",
1191
+ type: "section",
1192
+ backgroundColor: PALETTE.bgMuted,
1193
+ padding: { top: "0px", bottom: "0px" },
1194
+ columns: [
1195
+ {
1196
+ id: "spacer-section-col",
1197
+ blocks: [
1198
+ {
1199
+ id: "spacer-section-spacer",
1200
+ type: "spacer",
1201
+ height: "40px"
1202
+ }
1203
+ ]
1204
+ }
1205
+ ]
1206
+ }
1207
+ };
1208
+ var contentTemplates = [
1209
+ textImageRightTemplate,
1210
+ textImageLeftTemplate,
1211
+ sectionTitle1Template,
1212
+ sectionTitle2Template,
1213
+ sectionTitle3Template,
1214
+ quoteBlockTemplate,
1215
+ dividerSectionTemplate,
1216
+ spacerSectionTemplate
1217
+ ];
1218
+
1219
+ // src/prebuilt/feature-templates.ts
1220
+ var features2ColTemplate = {
1221
+ id: "features-2col",
1222
+ name: "Features - 2 Columns",
1223
+ category: "content",
1224
+ description: "Two feature boxes with icons side by side",
1225
+ section: {
1226
+ id: "features-2col-section",
1227
+ type: "section",
1228
+ backgroundColor: PALETTE.bgWhite,
1229
+ padding: { top: "50px", bottom: "50px" },
1230
+ noStack: true,
1231
+ columns: [
1232
+ {
1233
+ id: "features-2col-col-1",
1234
+ width: 50,
1235
+ padding: { left: "20px", right: "20px" },
1236
+ backgroundColor: PALETTE.bgLight,
1237
+ blocks: [
1238
+ {
1239
+ id: "features-2col-1-icon",
1240
+ type: "image",
1241
+ src: placeholderImage(60, 60),
1242
+ alt: PLACEHOLDER_ALT,
1243
+ width: "60px",
1244
+ align: "center"
1245
+ },
1246
+ {
1247
+ id: "features-2col-1-title",
1248
+ type: "text",
1249
+ content: `<h3 style="margin:16px 0 8px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature one</h3>`,
1250
+ align: "center"
1251
+ },
1252
+ {
1253
+ id: "features-2col-1-body",
1254
+ type: "text",
1255
+ content: `<p style="margin:0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">A sentence or two about this feature. Replace it with your own.</p>`,
1256
+ align: "center"
1257
+ }
1258
+ ]
1259
+ },
1260
+ {
1261
+ id: "features-2col-col-2",
1262
+ width: 50,
1263
+ padding: { left: "20px", right: "20px" },
1264
+ backgroundColor: PALETTE.bgLight,
1265
+ blocks: [
1266
+ {
1267
+ id: "features-2col-2-icon",
1268
+ type: "image",
1269
+ src: placeholderImage(60, 60),
1270
+ alt: PLACEHOLDER_ALT,
1271
+ width: "60px",
1272
+ align: "center"
1273
+ },
1274
+ {
1275
+ id: "features-2col-2-title",
1276
+ type: "text",
1277
+ content: `<h3 style="margin:16px 0 8px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature two</h3>`,
1278
+ align: "center"
1279
+ },
1280
+ {
1281
+ id: "features-2col-2-body",
1282
+ type: "text",
1283
+ content: `<p style="margin:0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">A sentence or two about this feature. Replace it with your own.</p>`,
1284
+ align: "center"
1285
+ }
1286
+ ]
1287
+ }
1288
+ ]
1289
+ }
1290
+ };
1291
+ var features3ColTemplate = {
1292
+ id: "features-3col",
1293
+ name: "Features - 3 Columns",
1294
+ category: "content",
1295
+ description: "Three feature boxes with icons",
1296
+ section: {
1297
+ id: "features-3col-section",
1298
+ type: "section",
1299
+ backgroundColor: PALETTE.bgMuted,
1300
+ padding: { top: "50px", bottom: "50px" },
1301
+ noStack: true,
1302
+ columns: [
1303
+ {
1304
+ id: "features-3col-col-1",
1305
+ width: 33,
1306
+ padding: { left: "16px", right: "16px" },
1307
+ blocks: [
1308
+ {
1309
+ id: "features-3col-1-icon",
1310
+ type: "image",
1311
+ src: placeholderImage(50, 50),
1312
+ alt: PLACEHOLDER_ALT,
1313
+ width: "50px",
1314
+ align: "center"
1315
+ },
1316
+ {
1317
+ id: "features-3col-1-title",
1318
+ type: "text",
1319
+ content: `<h3 style="margin:14px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature one</h3>`,
1320
+ align: "center"
1321
+ },
1322
+ {
1323
+ id: "features-3col-1-body",
1324
+ type: "text",
1325
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1326
+ align: "center"
1327
+ }
1328
+ ]
1329
+ },
1330
+ {
1331
+ id: "features-3col-col-2",
1332
+ width: 33,
1333
+ padding: { left: "16px", right: "16px" },
1334
+ blocks: [
1335
+ {
1336
+ id: "features-3col-2-icon",
1337
+ type: "image",
1338
+ src: placeholderImage(50, 50),
1339
+ alt: PLACEHOLDER_ALT,
1340
+ width: "50px",
1341
+ align: "center"
1342
+ },
1343
+ {
1344
+ id: "features-3col-2-title",
1345
+ type: "text",
1346
+ content: `<h3 style="margin:14px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature two</h3>`,
1347
+ align: "center"
1348
+ },
1349
+ {
1350
+ id: "features-3col-2-body",
1351
+ type: "text",
1352
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1353
+ align: "center"
1354
+ }
1355
+ ]
1356
+ },
1357
+ {
1358
+ id: "features-3col-col-3",
1359
+ width: 33,
1360
+ padding: { left: "16px", right: "16px" },
1361
+ blocks: [
1362
+ {
1363
+ id: "features-3col-3-icon",
1364
+ type: "image",
1365
+ src: placeholderImage(50, 50),
1366
+ alt: PLACEHOLDER_ALT,
1367
+ width: "50px",
1368
+ align: "center"
1369
+ },
1370
+ {
1371
+ id: "features-3col-3-title",
1372
+ type: "text",
1373
+ content: `<h3 style="margin:14px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature three</h3>`,
1374
+ align: "center"
1375
+ },
1376
+ {
1377
+ id: "features-3col-3-body",
1378
+ type: "text",
1379
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1380
+ align: "center"
1381
+ }
1382
+ ]
1383
+ }
1384
+ ]
1385
+ }
1386
+ };
1387
+ var features4ColTemplate = {
1388
+ id: "features-4col",
1389
+ name: "Features - 4 Grid",
1390
+ category: "content",
1391
+ description: "Four feature boxes in 2x2 grid",
1392
+ section: {
1393
+ id: "features-4col-section",
1394
+ type: "section",
1395
+ backgroundColor: PALETTE.bgWhite,
1396
+ padding: { top: "40px", bottom: "40px" },
1397
+ noStack: true,
1398
+ columns: [
1399
+ {
1400
+ id: "features-4col-col-1",
1401
+ width: 50,
1402
+ padding: { left: "20px", right: "20px", bottom: "30px" },
1403
+ blocks: [
1404
+ {
1405
+ id: "features-4col-1-icon",
1406
+ type: "image",
1407
+ src: placeholderImage(45, 45),
1408
+ alt: PLACEHOLDER_ALT,
1409
+ width: "45px",
1410
+ align: "center"
1411
+ },
1412
+ {
1413
+ id: "features-4col-1-title",
1414
+ type: "text",
1415
+ content: `<h3 style="margin:12px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature one</h3>`,
1416
+ align: "center"
1417
+ },
1418
+ {
1419
+ id: "features-4col-1-body",
1420
+ type: "text",
1421
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1422
+ align: "center"
1423
+ }
1424
+ ]
1425
+ },
1426
+ {
1427
+ id: "features-4col-col-2",
1428
+ width: 50,
1429
+ padding: { left: "20px", right: "20px", bottom: "30px" },
1430
+ blocks: [
1431
+ {
1432
+ id: "features-4col-2-icon",
1433
+ type: "image",
1434
+ src: placeholderImage(45, 45),
1435
+ alt: PLACEHOLDER_ALT,
1436
+ width: "45px",
1437
+ align: "center"
1438
+ },
1439
+ {
1440
+ id: "features-4col-2-title",
1441
+ type: "text",
1442
+ content: `<h3 style="margin:12px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature two</h3>`,
1443
+ align: "center"
1444
+ },
1445
+ {
1446
+ id: "features-4col-2-body",
1447
+ type: "text",
1448
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1449
+ align: "center"
1450
+ }
1451
+ ]
1452
+ }
1453
+ ]
1454
+ }
1455
+ };
1456
+ var features4ColRow2Template = {
1457
+ id: "features-4col-row2",
1458
+ name: "Features - 4 Grid (Row 2)",
1459
+ category: "content",
1460
+ description: "Second row of 4-column grid",
1461
+ section: {
1462
+ id: "features-4col-row2-section",
1463
+ type: "section",
1464
+ backgroundColor: PALETTE.bgWhite,
1465
+ padding: { top: "0px", bottom: "40px" },
1466
+ noStack: true,
1467
+ columns: [
1468
+ {
1469
+ id: "features-4col-row2-col-1",
1470
+ width: 50,
1471
+ padding: { left: "20px", right: "20px" },
1472
+ blocks: [
1473
+ {
1474
+ id: "features-4col-row2-1-icon",
1475
+ type: "image",
1476
+ src: placeholderImage(45, 45),
1477
+ alt: PLACEHOLDER_ALT,
1478
+ width: "45px",
1479
+ align: "center"
1480
+ },
1481
+ {
1482
+ id: "features-4col-row2-1-title",
1483
+ type: "text",
1484
+ content: `<h3 style="margin:12px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature three</h3>`,
1485
+ align: "center"
1486
+ },
1487
+ {
1488
+ id: "features-4col-row2-1-body",
1489
+ type: "text",
1490
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1491
+ align: "center"
1492
+ }
1493
+ ]
1494
+ },
1495
+ {
1496
+ id: "features-4col-row2-col-2",
1497
+ width: 50,
1498
+ padding: { left: "20px", right: "20px" },
1499
+ blocks: [
1500
+ {
1501
+ id: "features-4col-row2-2-icon",
1502
+ type: "image",
1503
+ src: placeholderImage(45, 45),
1504
+ alt: PLACEHOLDER_ALT,
1505
+ width: "45px",
1506
+ align: "center"
1507
+ },
1508
+ {
1509
+ id: "features-4col-row2-2-title",
1510
+ type: "text",
1511
+ content: `<h3 style="margin:12px 0 6px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Feature four</h3>`,
1512
+ align: "center"
1513
+ },
1514
+ {
1515
+ id: "features-4col-row2-2-body",
1516
+ type: "text",
1517
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textBody};">A short line about this feature. Replace it with your own.</p>`,
1518
+ align: "center"
1519
+ }
1520
+ ]
1521
+ }
1522
+ ]
1523
+ }
1524
+ };
1525
+ var takeActionTemplate = {
1526
+ id: "take-action",
1527
+ name: "Take Action / CTA",
1528
+ category: "content",
1529
+ description: "Call-to-action section with guidance label",
1530
+ section: {
1531
+ id: "take-action-section",
1532
+ type: "section",
1533
+ backgroundColor: PALETTE.bgWhite,
1534
+ padding: { top: "40px", bottom: "40px", left: "30px", right: "30px" },
1535
+ columns: [
1536
+ {
1537
+ id: "take-action-col",
1538
+ blocks: [
1539
+ {
1540
+ id: "take-action-label",
1541
+ type: "text",
1542
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">GUIDANCE</p>`,
1543
+ align: "left"
1544
+ },
1545
+ {
1546
+ id: "take-action-title",
1547
+ type: "text",
1548
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">Your headline here</h2>`,
1549
+ align: "left"
1550
+ },
1551
+ {
1552
+ id: "take-action-body",
1553
+ type: "text",
1554
+ content: `<p style="margin:16px 0 24px 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.intro}</p>`,
1555
+ align: "left"
1556
+ },
1557
+ {
1558
+ id: "take-action-button",
1559
+ type: "button",
1560
+ label: PLACEHOLDER.ctaExplore,
1561
+ href: PLACEHOLDER.website,
1562
+ align: "left",
1563
+ backgroundColor: PALETTE.primaryDark,
1564
+ color: PALETTE.textWhite,
1565
+ borderRadius: "4px",
1566
+ padding: { left: "24px", right: "24px", top: "12px", bottom: "12px" }
1567
+ }
1568
+ ]
1569
+ }
1570
+ ]
1571
+ }
1572
+ };
1573
+ var featureTemplates = [
1574
+ features2ColTemplate,
1575
+ features3ColTemplate,
1576
+ features4ColTemplate,
1577
+ features4ColRow2Template,
1578
+ takeActionTemplate
1579
+ ];
1580
+
1581
+ // src/prebuilt/marketing-templates.ts
1582
+ var eventSimpleTemplate = {
1583
+ id: "event-simple",
1584
+ name: "Event - Simple",
1585
+ category: "content",
1586
+ description: "Event with date and time details",
1587
+ section: {
1588
+ id: "event-simple-section",
1589
+ type: "section",
1590
+ backgroundColor: PALETTE.bgWhite,
1591
+ padding: { top: "40px", bottom: "40px", left: "30px", right: "30px" },
1592
+ columns: [
1593
+ {
1594
+ id: "event-simple-col",
1595
+ blocks: [
1596
+ {
1597
+ id: "event-simple-label",
1598
+ type: "text",
1599
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">CATEGORY</p>`,
1600
+ align: "left"
1601
+ },
1602
+ {
1603
+ id: "event-simple-title",
1604
+ type: "text",
1605
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">Your event name</h2>`,
1606
+ align: "left"
1607
+ },
1608
+ {
1609
+ id: "event-simple-desc",
1610
+ type: "text",
1611
+ content: `<p style="margin:16px 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.bodyText.intro}</p>`,
1612
+ align: "left"
1613
+ },
1614
+ {
1615
+ id: "event-simple-date",
1616
+ type: "text",
1617
+ content: `<p style="margin:0 0 4px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textDark};"><strong>Date:</strong> Your date</p>`,
1618
+ align: "left"
1619
+ },
1620
+ {
1621
+ id: "event-simple-time",
1622
+ type: "text",
1623
+ content: `<p style="margin:0 0 20px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textDark};"><strong>Time:</strong> Your time</p>`,
1624
+ align: "left"
1625
+ },
1626
+ {
1627
+ id: "event-simple-button",
1628
+ type: "button",
1629
+ label: "Register Now",
1630
+ href: PLACEHOLDER.website,
1631
+ align: "left",
1632
+ backgroundColor: PALETTE.primary,
1633
+ color: PALETTE.textWhite,
1634
+ borderRadius: "4px",
1635
+ padding: { left: "24px", right: "24px", top: "12px", bottom: "12px" }
1636
+ }
1637
+ ]
1638
+ }
1639
+ ]
1640
+ }
1641
+ };
1642
+ var eventImageTemplate = {
1643
+ id: "event-image",
1644
+ name: "Event - With Image",
1645
+ category: "content",
1646
+ description: "Event card with image",
1647
+ section: {
1648
+ id: "event-image-section",
1649
+ type: "section",
1650
+ backgroundColor: PALETTE.bgMuted,
1651
+ padding: { top: "40px", bottom: "40px" },
1652
+ noStack: true,
1653
+ columns: [
1654
+ {
1655
+ id: "event-image-text-col",
1656
+ width: 55,
1657
+ padding: { left: "30px", right: "20px" },
1658
+ blocks: [
1659
+ {
1660
+ id: "event-image-label",
1661
+ type: "text",
1662
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">CATEGORY</p>`,
1663
+ align: "left"
1664
+ },
1665
+ {
1666
+ id: "event-image-title",
1667
+ type: "text",
1668
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">Your second event name</h2>`,
1669
+ align: "left"
1670
+ },
1671
+ {
1672
+ id: "event-image-desc",
1673
+ type: "text",
1674
+ content: `<p style="margin:12px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">A short line about this event. Replace it with your own.</p>`,
1675
+ align: "left"
1676
+ },
1677
+ {
1678
+ id: "event-image-datetime",
1679
+ type: "text",
1680
+ content: `<p style="margin:0 0 16px 0;${TYPOGRAPHY.caption}color:${PALETTE.textLight};">Your date and time</p>`,
1681
+ align: "left"
1682
+ },
1683
+ {
1684
+ id: "event-image-button",
1685
+ type: "button",
1686
+ label: "Add to Calendar",
1687
+ href: PLACEHOLDER.website,
1688
+ align: "left",
1689
+ backgroundColor: PALETTE.primaryDark,
1690
+ color: PALETTE.textWhite,
1691
+ borderRadius: "4px",
1692
+ padding: { left: "20px", right: "20px", top: "10px", bottom: "10px" }
1693
+ }
1694
+ ]
1695
+ },
1696
+ {
1697
+ id: "event-image-image-col",
1698
+ width: 45,
1699
+ padding: { right: "30px" },
1700
+ blocks: [
1701
+ {
1702
+ id: "event-image-image",
1703
+ type: "image",
1704
+ src: placeholderImage(280, 220),
1705
+ alt: PLACEHOLDER_ALT,
1706
+ width: "100%",
1707
+ align: "center",
1708
+ borderRadius: "8px"
1709
+ }
1710
+ ]
1711
+ }
1712
+ ]
1713
+ }
1714
+ };
1715
+ var couponDiscountTemplate = {
1716
+ id: "coupon-discount",
1717
+ name: "Coupon - Discount",
1718
+ category: "content",
1719
+ description: "Discount offer with code box",
1720
+ section: {
1721
+ id: "coupon-discount-section",
1722
+ type: "section",
1723
+ backgroundColor: PALETTE.bgWhite,
1724
+ padding: { top: "40px", bottom: "40px" },
1725
+ noStack: true,
1726
+ columns: [
1727
+ {
1728
+ id: "coupon-discount-text-col",
1729
+ width: 60,
1730
+ padding: { left: "30px", right: "20px" },
1731
+ verticalAlign: "middle",
1732
+ blocks: [
1733
+ {
1734
+ id: "coupon-discount-label",
1735
+ type: "text",
1736
+ content: `<p style="margin:0 0 6px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">SPECIAL OFFER</p>`,
1737
+ align: "left"
1738
+ },
1739
+ {
1740
+ id: "coupon-discount-title",
1741
+ type: "text",
1742
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">Your offer</h2>`,
1743
+ align: "left"
1744
+ },
1745
+ {
1746
+ id: "coupon-discount-desc",
1747
+ type: "text",
1748
+ content: `<p style="margin:12px 0 0 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">A short line about this offer. Replace it with your own.</p>`,
1749
+ align: "left"
1750
+ }
1751
+ ]
1752
+ },
1753
+ {
1754
+ id: "coupon-discount-code-col",
1755
+ width: 40,
1756
+ padding: { right: "30px" },
1757
+ verticalAlign: "middle",
1758
+ blocks: [
1759
+ {
1760
+ id: "coupon-discount-amount",
1761
+ type: "text",
1762
+ content: `<p style="margin:0;font-family:Georgia,'Times New Roman',serif;font-size:48px;font-weight:600;color:${PALETTE.primary};">FREE</p>`,
1763
+ align: "center"
1764
+ },
1765
+ {
1766
+ id: "coupon-discount-codelabel",
1767
+ type: "text",
1768
+ content: `<p style="margin:8px 0 4px 0;${TYPOGRAPHY.caption}color:${PALETTE.textLight};">USE CODE:</p>`,
1769
+ align: "center"
1770
+ },
1771
+ {
1772
+ id: "coupon-discount-code",
1773
+ type: "text",
1774
+ content: `<p style="margin:0;padding:8px 16px;background:${PALETTE.bgMuted};border:2px dashed ${PALETTE.primary};border-radius:4px;${TYPOGRAPHY.label}color:${PALETTE.primary};display:inline-block;">YOUR-CODE</p>`,
1775
+ align: "center"
1776
+ }
1777
+ ]
1778
+ }
1779
+ ]
1780
+ }
1781
+ };
1782
+ var couponGiftCardTemplate = {
1783
+ id: "coupon-giftcard",
1784
+ name: "Coupon - Gift Card",
1785
+ category: "content",
1786
+ description: "Gift card style layout",
1787
+ section: {
1788
+ id: "coupon-giftcard-section",
1789
+ type: "section",
1790
+ backgroundColor: PALETTE.bgMuted,
1791
+ padding: { top: "50px", bottom: "50px", left: "40px", right: "40px" },
1792
+ columns: [
1793
+ {
1794
+ id: "coupon-giftcard-col",
1795
+ blocks: [
1796
+ {
1797
+ id: "coupon-giftcard-title",
1798
+ type: "text",
1799
+ content: `<h1 style="margin:0;font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:42px;font-weight:600;color:${PALETTE.primary};">Your gift certificate</h1>`,
1800
+ align: "center"
1801
+ },
1802
+ {
1803
+ id: "coupon-giftcard-divider",
1804
+ type: "divider",
1805
+ borderColor: PALETTE.textDark,
1806
+ borderWidth: "1px",
1807
+ borderStyle: "solid",
1808
+ padding: { top: "20px", bottom: "20px" },
1809
+ width: "120px"
1810
+ },
1811
+ {
1812
+ id: "coupon-giftcard-codelabel",
1813
+ type: "text",
1814
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.textLight};">CERTIFICATE CODE:</p>`,
1815
+ align: "center"
1816
+ },
1817
+ {
1818
+ id: "coupon-giftcard-code",
1819
+ type: "text",
1820
+ content: `<p style="margin:0;font-family:Georgia,'Times New Roman',serif;font-size:28px;font-weight:600;color:${PALETTE.primary};letter-spacing:4px;">YOUR-CODE</p>`,
1821
+ align: "center"
1822
+ }
1823
+ ]
1824
+ }
1825
+ ]
1826
+ }
1827
+ };
1828
+ var couponBannerTemplate = {
1829
+ id: "coupon-banner",
1830
+ name: "Coupon - Banner",
1831
+ category: "content",
1832
+ description: "Simple banner with promotional code",
1833
+ section: {
1834
+ id: "coupon-banner-section",
1835
+ type: "section",
1836
+ backgroundColor: PALETTE.primary,
1837
+ padding: { top: "20px", bottom: "20px" },
1838
+ columns: [
1839
+ {
1840
+ id: "coupon-banner-col",
1841
+ blocks: [
1842
+ {
1843
+ id: "coupon-banner-code",
1844
+ type: "text",
1845
+ content: `<p style="margin:0;${TYPOGRAPHY.label}color:${PALETTE.textWhite};letter-spacing:6px;font-size:18px;">YOUR-CODE</p>`,
1846
+ align: "center"
1847
+ }
1848
+ ]
1849
+ }
1850
+ ]
1851
+ }
1852
+ };
1853
+ var productRightTemplate = {
1854
+ id: "product-right",
1855
+ name: "Service - Image Right",
1856
+ category: "products",
1857
+ description: "Service offering with image on right",
1858
+ section: {
1859
+ id: "product-right-section",
1860
+ type: "section",
1861
+ backgroundColor: PALETTE.bgWhite,
1862
+ padding: { top: "40px", bottom: "40px" },
1863
+ noStack: true,
1864
+ columns: [
1865
+ {
1866
+ id: "product-right-text-col",
1867
+ width: 55,
1868
+ padding: { left: "30px", right: "20px" },
1869
+ verticalAlign: "middle",
1870
+ blocks: [
1871
+ {
1872
+ id: "product-right-label",
1873
+ type: "text",
1874
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">CATEGORY</p>`,
1875
+ align: "left"
1876
+ },
1877
+ {
1878
+ id: "product-right-title",
1879
+ type: "text",
1880
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">Your product name</h2>`,
1881
+ align: "left"
1882
+ },
1883
+ {
1884
+ id: "product-right-desc",
1885
+ type: "text",
1886
+ content: `<p style="margin:12px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">A short line about this product. Replace it with your own.</p>`,
1887
+ align: "left"
1888
+ },
1889
+ {
1890
+ id: "product-right-price",
1891
+ type: "text",
1892
+ content: `<p style="margin:0 0 16px 0;font-family:Georgia,'Times New Roman',serif;font-size:24px;font-weight:600;color:${PALETTE.primary};">$99</p>`,
1893
+ align: "left"
1894
+ },
1895
+ {
1896
+ id: "product-right-button",
1897
+ type: "button",
1898
+ label: "Book Now",
1899
+ href: PLACEHOLDER.website,
1900
+ align: "left",
1901
+ backgroundColor: PALETTE.primaryDark,
1902
+ color: PALETTE.textWhite,
1903
+ borderRadius: "4px",
1904
+ padding: { left: "24px", right: "24px", top: "10px", bottom: "10px" }
1905
+ }
1906
+ ]
1907
+ },
1908
+ {
1909
+ id: "product-right-image-col",
1910
+ width: 45,
1911
+ padding: { right: "30px" },
1912
+ blocks: [
1913
+ {
1914
+ id: "product-right-image",
1915
+ type: "image",
1916
+ src: placeholderImage(300, 300),
1917
+ alt: PLACEHOLDER_ALT,
1918
+ width: "100%",
1919
+ align: "center",
1920
+ borderRadius: "8px"
1921
+ }
1922
+ ]
1923
+ }
1924
+ ]
1925
+ }
1926
+ };
1927
+ var productLeftTemplate = {
1928
+ id: "product-left",
1929
+ name: "Service - Image Left",
1930
+ category: "products",
1931
+ description: "Service offering with image on left",
1932
+ section: {
1933
+ id: "product-left-section",
1934
+ type: "section",
1935
+ backgroundColor: PALETTE.bgMuted,
1936
+ padding: { top: "40px", bottom: "40px" },
1937
+ noStack: true,
1938
+ columns: [
1939
+ {
1940
+ id: "product-left-image-col",
1941
+ width: 45,
1942
+ padding: { left: "30px" },
1943
+ blocks: [
1944
+ {
1945
+ id: "product-left-image",
1946
+ type: "image",
1947
+ src: placeholderImage(300, 300),
1948
+ alt: PLACEHOLDER_ALT,
1949
+ width: "100%",
1950
+ align: "center",
1951
+ borderRadius: "8px"
1952
+ }
1953
+ ]
1954
+ },
1955
+ {
1956
+ id: "product-left-text-col",
1957
+ width: 55,
1958
+ padding: { left: "20px", right: "30px" },
1959
+ verticalAlign: "middle",
1960
+ blocks: [
1961
+ {
1962
+ id: "product-left-label",
1963
+ type: "text",
1964
+ content: `<p style="margin:0 0 8px 0;${TYPOGRAPHY.label}color:${PALETTE.primary};">PACKAGE</p>`,
1965
+ align: "left"
1966
+ },
1967
+ {
1968
+ id: "product-left-title",
1969
+ type: "text",
1970
+ content: `<h2 style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.textDark};">Your bundle name</h2>`,
1971
+ align: "left"
1972
+ },
1973
+ {
1974
+ id: "product-left-desc",
1975
+ type: "text",
1976
+ content: `<p style="margin:12px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">A short line about this bundle. Replace it with your own.</p>`,
1977
+ align: "left"
1978
+ },
1979
+ {
1980
+ id: "product-left-price",
1981
+ type: "text",
1982
+ content: `<p style="margin:0;"><span style="${TYPOGRAPHY.caption}color:${PALETTE.textLight};text-decoration:line-through;">$297</span> <span style="font-family:Georgia,'Times New Roman',serif;font-size:24px;font-weight:600;color:${PALETTE.primary};">$249</span></p>`,
1983
+ align: "left"
1984
+ },
1985
+ {
1986
+ id: "product-left-save",
1987
+ type: "text",
1988
+ content: `<p style="margin:4px 0 16px 0;${TYPOGRAPHY.caption}color:${PALETTE.primary};">You save $48</p>`,
1989
+ align: "left"
1990
+ },
1991
+ {
1992
+ id: "product-left-button",
1993
+ type: "button",
1994
+ label: "Learn More",
1995
+ href: PLACEHOLDER.website,
1996
+ align: "left",
1997
+ backgroundColor: PALETTE.primary,
1998
+ color: PALETTE.textWhite,
1999
+ borderRadius: "4px",
2000
+ padding: { left: "24px", right: "24px", top: "10px", bottom: "10px" }
2001
+ }
2002
+ ]
2003
+ }
2004
+ ]
2005
+ }
2006
+ };
2007
+ var products2ColTemplate = {
2008
+ id: "products-2col",
2009
+ name: "Services - 2 Columns",
2010
+ category: "products",
2011
+ description: "Two service offerings side by side",
2012
+ section: {
2013
+ id: "products-2col-section",
2014
+ type: "section",
2015
+ backgroundColor: PALETTE.bgWhite,
2016
+ padding: { top: "40px", bottom: "40px" },
2017
+ noStack: true,
2018
+ columns: [
2019
+ {
2020
+ id: "products-2col-col-1",
2021
+ width: 50,
2022
+ padding: { left: "20px", right: "15px" },
2023
+ blocks: [
2024
+ {
2025
+ id: "products-2col-1-image",
2026
+ type: "image",
2027
+ src: placeholderImage(260, 200),
2028
+ alt: PLACEHOLDER_ALT,
2029
+ width: "100%",
2030
+ align: "center",
2031
+ borderRadius: "6px"
2032
+ },
2033
+ {
2034
+ id: "products-2col-1-title",
2035
+ type: "text",
2036
+ content: `<h3 style="margin:16px 0 8px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Your first product</h3>`,
2037
+ align: "left"
2038
+ },
2039
+ {
2040
+ id: "products-2col-1-price",
2041
+ type: "text",
2042
+ content: `<p style="margin:0 0 12px 0;font-family:Georgia,'Times New Roman',serif;font-size:20px;font-weight:600;color:${PALETTE.primary};">$99</p>`,
2043
+ align: "left"
2044
+ },
2045
+ {
2046
+ id: "products-2col-1-button",
2047
+ type: "button",
2048
+ label: "Book Now",
2049
+ href: PLACEHOLDER.website,
2050
+ align: "left",
2051
+ backgroundColor: PALETTE.primaryDark,
2052
+ color: PALETTE.textWhite,
2053
+ borderRadius: "4px",
2054
+ padding: { left: "20px", right: "20px", top: "8px", bottom: "8px" }
2055
+ }
2056
+ ]
2057
+ },
2058
+ {
2059
+ id: "products-2col-col-2",
2060
+ width: 50,
2061
+ padding: { left: "15px", right: "20px" },
2062
+ blocks: [
2063
+ {
2064
+ id: "products-2col-2-image",
2065
+ type: "image",
2066
+ src: placeholderImage(260, 200),
2067
+ alt: PLACEHOLDER_ALT,
2068
+ width: "100%",
2069
+ align: "center",
2070
+ borderRadius: "6px"
2071
+ },
2072
+ {
2073
+ id: "products-2col-2-title",
2074
+ type: "text",
2075
+ content: `<h3 style="margin:16px 0 8px 0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};">Your second product</h3>`,
2076
+ align: "left"
2077
+ },
2078
+ {
2079
+ id: "products-2col-2-price",
2080
+ type: "text",
2081
+ content: `<p style="margin:0 0 12px 0;font-family:Georgia,'Times New Roman',serif;font-size:20px;font-weight:600;color:${PALETTE.primary};">$149</p>`,
2082
+ align: "left"
2083
+ },
2084
+ {
2085
+ id: "products-2col-2-button",
2086
+ type: "button",
2087
+ label: "Book Now",
2088
+ href: PLACEHOLDER.website,
2089
+ align: "left",
2090
+ backgroundColor: PALETTE.primaryDark,
2091
+ color: PALETTE.textWhite,
2092
+ borderRadius: "4px",
2093
+ padding: { left: "20px", right: "20px", top: "8px", bottom: "8px" }
2094
+ }
2095
+ ]
2096
+ }
2097
+ ]
2098
+ }
2099
+ };
2100
+ var products3ColTemplate = {
2101
+ id: "products-3col",
2102
+ name: "Services - 3 Columns",
2103
+ category: "products",
2104
+ description: "Three service offerings in a row",
2105
+ section: {
2106
+ id: "products-3col-section",
2107
+ type: "section",
2108
+ backgroundColor: PALETTE.bgMuted,
2109
+ padding: { top: "40px", bottom: "40px" },
2110
+ noStack: true,
2111
+ columns: [
2112
+ {
2113
+ id: "products-3col-col-1",
2114
+ width: 33,
2115
+ padding: { left: "15px", right: "10px" },
2116
+ blocks: [
2117
+ {
2118
+ id: "products-3col-1-image",
2119
+ type: "image",
2120
+ src: placeholderImage(180, 140),
2121
+ alt: PLACEHOLDER_ALT,
2122
+ width: "100%",
2123
+ align: "center",
2124
+ borderRadius: "4px"
2125
+ },
2126
+ {
2127
+ id: "products-3col-1-title",
2128
+ type: "text",
2129
+ content: `<h4 style="margin:12px 0 4px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textDark};font-weight:600;">Your first tier</h4>`,
2130
+ align: "center"
2131
+ },
2132
+ {
2133
+ id: "products-3col-1-price",
2134
+ type: "text",
2135
+ content: `<p style="margin:0 0 10px 0;font-family:Georgia,'Times New Roman',serif;font-size:18px;color:${PALETTE.primary};">Free</p>`,
2136
+ align: "center"
2137
+ },
2138
+ {
2139
+ id: "products-3col-1-button",
2140
+ type: "button",
2141
+ label: "Schedule",
2142
+ href: PLACEHOLDER.website,
2143
+ align: "center",
2144
+ backgroundColor: PALETTE.primary,
2145
+ color: PALETTE.textWhite,
2146
+ borderRadius: "4px",
2147
+ padding: { left: "16px", right: "16px", top: "6px", bottom: "6px" }
2148
+ }
2149
+ ]
2150
+ },
2151
+ {
2152
+ id: "products-3col-col-2",
2153
+ width: 33,
2154
+ padding: { left: "10px", right: "10px" },
2155
+ blocks: [
2156
+ {
2157
+ id: "products-3col-2-image",
2158
+ type: "image",
2159
+ src: placeholderImage(180, 140),
2160
+ alt: PLACEHOLDER_ALT,
2161
+ width: "100%",
2162
+ align: "center",
2163
+ borderRadius: "4px"
2164
+ },
2165
+ {
2166
+ id: "products-3col-2-title",
2167
+ type: "text",
2168
+ content: `<h4 style="margin:12px 0 4px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textDark};font-weight:600;">Your second tier</h4>`,
2169
+ align: "center"
2170
+ },
2171
+ {
2172
+ id: "products-3col-2-price",
2173
+ type: "text",
2174
+ content: `<p style="margin:0 0 10px 0;font-family:Georgia,'Times New Roman',serif;font-size:18px;color:${PALETTE.primary};">$99</p>`,
2175
+ align: "center"
2176
+ },
2177
+ {
2178
+ id: "products-3col-2-button",
2179
+ type: "button",
2180
+ label: "Book",
2181
+ href: PLACEHOLDER.website,
2182
+ align: "center",
2183
+ backgroundColor: PALETTE.primary,
2184
+ color: PALETTE.textWhite,
2185
+ borderRadius: "4px",
2186
+ padding: { left: "16px", right: "16px", top: "6px", bottom: "6px" }
2187
+ }
2188
+ ]
2189
+ },
2190
+ {
2191
+ id: "products-3col-col-3",
2192
+ width: 33,
2193
+ padding: { left: "10px", right: "15px" },
2194
+ blocks: [
2195
+ {
2196
+ id: "products-3col-3-image",
2197
+ type: "image",
2198
+ src: placeholderImage(180, 140),
2199
+ alt: PLACEHOLDER_ALT,
2200
+ width: "100%",
2201
+ align: "center",
2202
+ borderRadius: "4px"
2203
+ },
2204
+ {
2205
+ id: "products-3col-3-title",
2206
+ type: "text",
2207
+ content: `<h4 style="margin:12px 0 4px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textDark};font-weight:600;">Your third tier</h4>`,
2208
+ align: "center"
2209
+ },
2210
+ {
2211
+ id: "products-3col-3-price",
2212
+ type: "text",
2213
+ content: `<p style="margin:0 0 10px 0;font-family:Georgia,'Times New Roman',serif;font-size:18px;color:${PALETTE.primary};">$249</p>`,
2214
+ align: "center"
2215
+ },
2216
+ {
2217
+ id: "products-3col-3-button",
2218
+ type: "button",
2219
+ label: "Book",
2220
+ href: PLACEHOLDER.website,
2221
+ align: "center",
2222
+ backgroundColor: PALETTE.primary,
2223
+ color: PALETTE.textWhite,
2224
+ borderRadius: "4px",
2225
+ padding: { left: "16px", right: "16px", top: "6px", bottom: "6px" }
2226
+ }
2227
+ ]
2228
+ }
2229
+ ]
2230
+ }
2231
+ };
2232
+ var marketingTemplates = [
2233
+ eventSimpleTemplate,
2234
+ eventImageTemplate,
2235
+ couponDiscountTemplate,
2236
+ couponGiftCardTemplate,
2237
+ couponBannerTemplate,
2238
+ productRightTemplate,
2239
+ productLeftTemplate,
2240
+ products2ColTemplate,
2241
+ products3ColTemplate
2242
+ ];
2243
+
2244
+ // src/prebuilt/utility-templates.ts
2245
+ var signature1Template = {
2246
+ id: "signature-1",
2247
+ name: "Signature - Simple",
2248
+ category: "footer",
2249
+ description: "Simple name and title signature",
2250
+ section: {
2251
+ id: "signature-1-section",
2252
+ type: "section",
2253
+ backgroundColor: PALETTE.bgWhite,
2254
+ padding: { top: "30px", bottom: "30px", left: "30px", right: "30px" },
2255
+ columns: [
2256
+ {
2257
+ id: "signature-1-col",
2258
+ blocks: [
2259
+ {
2260
+ id: "signature-1-name",
2261
+ type: "text",
2262
+ content: `<p style="margin:0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};font-weight:600;">${PLACEHOLDER.ownerName}</p>`,
2263
+ align: "left"
2264
+ },
2265
+ {
2266
+ id: "signature-1-title",
2267
+ type: "text",
2268
+ content: `<p style="margin:4px 0 0 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">${PLACEHOLDER.ownerTitle}</p>`,
2269
+ align: "left"
2270
+ }
2271
+ ]
2272
+ }
2273
+ ]
2274
+ }
2275
+ };
2276
+ var signature2Template = {
2277
+ id: "signature-2",
2278
+ name: "Signature - Centered",
2279
+ category: "footer",
2280
+ description: "Centered name with cursive signature style",
2281
+ section: {
2282
+ id: "signature-2-section",
2283
+ type: "section",
2284
+ backgroundColor: PALETTE.bgMuted,
2285
+ padding: { top: "40px", bottom: "40px" },
2286
+ columns: [
2287
+ {
2288
+ id: "signature-2-col",
2289
+ blocks: [
2290
+ {
2291
+ id: "signature-2-name",
2292
+ type: "text",
2293
+ content: `<p style="margin:0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};font-weight:600;">${PLACEHOLDER.ownerName}</p>`,
2294
+ align: "center"
2295
+ },
2296
+ {
2297
+ id: "signature-2-title",
2298
+ type: "text",
2299
+ content: `<p style="margin:4px 0 16px 0;${TYPOGRAPHY.caption}color:${PALETTE.textLight};">${PLACEHOLDER.ownerTitle}</p>`,
2300
+ align: "center"
2301
+ },
2302
+ {
2303
+ id: "signature-2-cursive",
2304
+ type: "text",
2305
+ content: `<p style="margin:0;${TYPOGRAPHY.signature}color:${PALETTE.primary};">${PLACEHOLDER.ownerName}</p>`,
2306
+ align: "center"
2307
+ }
2308
+ ]
2309
+ }
2310
+ ]
2311
+ }
2312
+ };
2313
+ var signature3Template = {
2314
+ id: "signature-3",
2315
+ name: "Signature - With Contact",
2316
+ category: "footer",
2317
+ description: "Name with email and phone contact",
2318
+ section: {
2319
+ id: "signature-3-section",
2320
+ type: "section",
2321
+ backgroundColor: PALETTE.bgWhite,
2322
+ padding: { top: "30px", bottom: "30px", left: "30px", right: "30px" },
2323
+ columns: [
2324
+ {
2325
+ id: "signature-3-col",
2326
+ blocks: [
2327
+ {
2328
+ id: "signature-3-name",
2329
+ type: "text",
2330
+ content: `<p style="margin:0;${TYPOGRAPHY.h4}color:${PALETTE.textDark};font-weight:600;">${PLACEHOLDER.ownerName}</p>`,
2331
+ align: "center"
2332
+ },
2333
+ {
2334
+ id: "signature-3-title",
2335
+ type: "text",
2336
+ content: `<p style="margin:4px 0 12px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">${PLACEHOLDER.ownerTitle}</p>`,
2337
+ align: "center"
2338
+ },
2339
+ {
2340
+ id: "signature-3-contact",
2341
+ type: "text",
2342
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textLight};">\u2709 ${PLACEHOLDER.ownerContact}</p>`,
2343
+ align: "center"
2344
+ }
2345
+ ]
2346
+ }
2347
+ ]
2348
+ }
2349
+ };
2350
+ var signature4Template = {
2351
+ id: "signature-4",
2352
+ name: "Signature - Full",
2353
+ category: "footer",
2354
+ description: "Full signature with closing message",
2355
+ section: {
2356
+ id: "signature-4-section",
2357
+ type: "section",
2358
+ backgroundColor: PALETTE.bgWhite,
2359
+ padding: { top: "40px", bottom: "40px", left: "40px", right: "40px" },
2360
+ columns: [
2361
+ {
2362
+ id: "signature-4-col",
2363
+ blocks: [
2364
+ {
2365
+ id: "signature-4-closing",
2366
+ type: "text",
2367
+ content: `<p style="margin:0 0 16px 0;${TYPOGRAPHY.body}color:${PALETTE.textBody};">${PLACEHOLDER.closing.gratitude}</p>`,
2368
+ align: "center"
2369
+ },
2370
+ {
2371
+ id: "signature-4-name",
2372
+ type: "text",
2373
+ content: `<p style="margin:0;${TYPOGRAPHY.h3}color:${PALETTE.primary};">${PLACEHOLDER.ownerName}</p>`,
2374
+ align: "center"
2375
+ },
2376
+ {
2377
+ id: "signature-4-title",
2378
+ type: "text",
2379
+ content: `<p style="margin:8px 0 0 0;font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:16px;color:${PALETTE.textBody};">${PLACEHOLDER.ownerTitle}</p>`,
2380
+ align: "center"
2381
+ }
2382
+ ]
2383
+ }
2384
+ ]
2385
+ }
2386
+ };
2387
+ var buttonsDualTemplate = {
2388
+ id: "buttons-dual",
2389
+ name: "Buttons - Dual CTA",
2390
+ category: "content",
2391
+ description: "Two side-by-side call-to-action buttons",
2392
+ section: {
2393
+ id: "buttons-dual-section",
2394
+ type: "section",
2395
+ backgroundColor: PALETTE.bgWhite,
2396
+ padding: { top: "30px", bottom: "30px" },
2397
+ noStack: true,
2398
+ columns: [
2399
+ {
2400
+ id: "buttons-dual-col-1",
2401
+ width: 50,
2402
+ padding: { left: "30px", right: "10px" },
2403
+ blocks: [
2404
+ {
2405
+ id: "buttons-dual-primary",
2406
+ type: "button",
2407
+ label: PLACEHOLDER.ctaBookSession,
2408
+ href: PLACEHOLDER.website,
2409
+ align: "right",
2410
+ backgroundColor: PALETTE.primary,
2411
+ color: PALETTE.textWhite,
2412
+ borderRadius: "30px",
2413
+ padding: { left: "28px", right: "28px", top: "14px", bottom: "14px" }
2414
+ }
2415
+ ]
2416
+ },
2417
+ {
2418
+ id: "buttons-dual-col-2",
2419
+ width: 50,
2420
+ padding: { left: "10px", right: "30px" },
2421
+ blocks: [
2422
+ {
2423
+ id: "buttons-dual-secondary",
2424
+ type: "button",
2425
+ label: PLACEHOLDER.ctaLearnMore,
2426
+ href: PLACEHOLDER.website,
2427
+ align: "left",
2428
+ backgroundColor: PALETTE.bgWhite,
2429
+ color: PALETTE.primary,
2430
+ borderRadius: "30px",
2431
+ border: `2px solid ${PALETTE.primary}`,
2432
+ padding: { left: "28px", right: "28px", top: "12px", bottom: "12px" }
2433
+ }
2434
+ ]
2435
+ }
2436
+ ]
2437
+ }
2438
+ };
2439
+ var appDownloadTemplate = {
2440
+ id: "app-download",
2441
+ name: "App Download",
2442
+ category: "content",
2443
+ description: "App store download badges",
2444
+ section: {
2445
+ id: "app-download-section",
2446
+ type: "section",
2447
+ backgroundColor: PALETTE.bgMuted,
2448
+ padding: { top: "40px", bottom: "40px" },
2449
+ columns: [
2450
+ {
2451
+ id: "app-download-col",
2452
+ blocks: [
2453
+ {
2454
+ id: "app-download-title",
2455
+ type: "text",
2456
+ content: `<p style="margin:0 0 20px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">Download our app:</p>`,
2457
+ align: "center"
2458
+ },
2459
+ {
2460
+ id: "app-download-badges",
2461
+ type: "image",
2462
+ src: placeholderImage(300, 44),
2463
+ alt: PLACEHOLDER_ALT,
2464
+ width: "300px",
2465
+ align: "center",
2466
+ href: PLACEHOLDER.website
2467
+ }
2468
+ ]
2469
+ }
2470
+ ]
2471
+ }
2472
+ };
2473
+ var footerStandardTemplate = {
2474
+ id: "footer-standard",
2475
+ name: "Footer - Standard",
2476
+ category: "footer",
2477
+ description: "Standard newsletter footer with unsubscribe",
2478
+ section: {
2479
+ id: "footer-standard-section",
2480
+ type: "section",
2481
+ backgroundColor: PALETTE.bgWhite,
2482
+ padding: { top: "40px", bottom: "40px", left: "40px", right: "40px" },
2483
+ columns: [
2484
+ {
2485
+ id: "footer-standard-col",
2486
+ blocks: [
2487
+ {
2488
+ id: "footer-standard-divider",
2489
+ type: "divider",
2490
+ borderColor: PALETTE.border,
2491
+ borderWidth: "1px",
2492
+ borderStyle: "solid",
2493
+ padding: { top: "0px", bottom: "24px" }
2494
+ },
2495
+ {
2496
+ id: "footer-standard-received",
2497
+ type: "text",
2498
+ content: `<p style="margin:0 0 16px 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">${PLACEHOLDER.footer.received}</p>`,
2499
+ align: "center"
2500
+ },
2501
+ {
2502
+ id: "footer-standard-unsubscribe",
2503
+ type: "text",
2504
+ content: `<p style="margin:0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textBody};">${PLACEHOLDER.footer.unsubscribe}<br><a href="{{unsubscribe_url}}" style="color:${PALETTE.primary};text-decoration:underline;">${PLACEHOLDER.footer.unsubscribeLink}</a>.</p>`,
2505
+ align: "center"
2506
+ }
2507
+ ]
2508
+ }
2509
+ ]
2510
+ }
2511
+ };
2512
+ var footerSocialTemplate = {
2513
+ id: "footer-social",
2514
+ name: "Footer - With Social",
2515
+ category: "footer",
2516
+ description: "Footer with social media icons",
2517
+ section: {
2518
+ id: "footer-social-section",
2519
+ type: "section",
2520
+ backgroundColor: PALETTE.bgMuted,
2521
+ padding: { top: "40px", bottom: "40px" },
2522
+ columns: [
2523
+ {
2524
+ id: "footer-social-col",
2525
+ blocks: [
2526
+ {
2527
+ id: "footer-social-icons",
2528
+ type: "social",
2529
+ mode: "horizontal",
2530
+ iconSize: "28px",
2531
+ iconPadding: "8px",
2532
+ links: [
2533
+ { platform: "facebook", url: "https://facebook.com" },
2534
+ { platform: "instagram", url: "https://instagram.com" },
2535
+ { platform: "youtube", url: "https://youtube.com" }
2536
+ ]
2537
+ },
2538
+ {
2539
+ id: "footer-social-divider",
2540
+ type: "divider",
2541
+ borderColor: PALETTE.border,
2542
+ borderWidth: "1px",
2543
+ borderStyle: "solid",
2544
+ padding: { top: "24px", bottom: "24px" }
2545
+ },
2546
+ {
2547
+ id: "footer-social-company",
2548
+ type: "text",
2549
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:${PALETTE.textLight};">${PLACEHOLDER.companyName}</p>`,
2550
+ align: "center"
2551
+ },
2552
+ {
2553
+ id: "footer-social-copyright",
2554
+ type: "text",
2555
+ content: `<p style="margin:8px 0 0 0;${TYPOGRAPHY.caption}color:${PALETTE.textLight};">\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} All rights reserved.</p>`,
2556
+ align: "center"
2557
+ }
2558
+ ]
2559
+ }
2560
+ ]
2561
+ }
2562
+ };
2563
+ var footerLinksTemplate = {
2564
+ id: "footer-links",
2565
+ name: "Footer - With Links",
2566
+ category: "footer",
2567
+ description: "Footer with navigation and contact info",
2568
+ section: {
2569
+ id: "footer-links-section",
2570
+ type: "section",
2571
+ backgroundColor: PALETTE.primaryDark,
2572
+ padding: { top: "40px", bottom: "40px" },
2573
+ noStack: true,
2574
+ columns: [
2575
+ {
2576
+ id: "footer-links-col-1",
2577
+ width: 50,
2578
+ padding: { left: "30px", right: "20px" },
2579
+ blocks: [
2580
+ {
2581
+ id: "footer-links-phone",
2582
+ type: "text",
2583
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:rgba(255,255,255,0.8);">Contact</p>`,
2584
+ align: "left"
2585
+ },
2586
+ {
2587
+ id: "footer-links-email",
2588
+ type: "text",
2589
+ content: `<p style="margin:8px 0 0 0;${TYPOGRAPHY.bodySmall}color:${PALETTE.textWhite};">${PLACEHOLDER.ownerContact}</p>`,
2590
+ align: "left"
2591
+ }
2592
+ ]
2593
+ },
2594
+ {
2595
+ id: "footer-links-col-2",
2596
+ width: 50,
2597
+ padding: { left: "20px", right: "30px" },
2598
+ blocks: [
2599
+ {
2600
+ id: "footer-links-copyright",
2601
+ type: "text",
2602
+ content: `<p style="margin:0;${TYPOGRAPHY.caption}color:rgba(255,255,255,0.6);">\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} ${PLACEHOLDER.companyName}</p>`,
2603
+ align: "right"
2604
+ },
2605
+ {
2606
+ id: "footer-links-legal",
2607
+ type: "text",
2608
+ content: `<p style="margin:8px 0 0 0;${TYPOGRAPHY.caption}color:rgba(255,255,255,0.8);"><a href="${PLACEHOLDER.website}" style="color:rgba(255,255,255,0.8);">Privacy</a> | <a href="{{unsubscribe_url}}" style="color:rgba(255,255,255,0.8);">Unsubscribe</a></p>`,
2609
+ align: "right"
2610
+ }
2611
+ ]
2612
+ }
2613
+ ]
2614
+ }
2615
+ };
2616
+ var utilityTemplates = [
2617
+ signature1Template,
2618
+ signature2Template,
2619
+ signature3Template,
2620
+ signature4Template,
2621
+ buttonsDualTemplate,
2622
+ appDownloadTemplate,
2623
+ footerStandardTemplate,
2624
+ footerSocialTemplate,
2625
+ footerLinksTemplate
2626
+ ];
2627
+
2628
+ // src/prebuilt/index.ts
2629
+ var allPrebuiltTemplates = [
2630
+ ...heroTemplates,
2631
+ ...contentTemplates,
2632
+ ...featureTemplates,
2633
+ ...marketingTemplates,
2634
+ ...utilityTemplates
2635
+ ];
2636
+ function getTemplatesByCategory(category) {
2637
+ return allPrebuiltTemplates.filter((t) => t.category === category);
2638
+ }
2639
+ var templateCategories = [
2640
+ { id: "hero", name: "Hero Sections", count: heroTemplates.length },
2641
+ { id: "content", name: "Content Blocks", count: contentTemplates.length + featureTemplates.length },
2642
+ { id: "products", name: "Services & Products", count: marketingTemplates.filter((t) => t.category === "products").length },
2643
+ { id: "footer", name: "Signatures & Footers", count: utilityTemplates.length }
2644
+ ];
2645
+ function createStandardPrebuiltRegistry(options = {}) {
2646
+ const registry = createPrebuiltTemplateRegistry();
2647
+ allPrebuiltTemplates.forEach((template) => {
2648
+ registry.register(withHostedPlaceholders(template, options.placeholderBase));
2649
+ });
2650
+ return registry;
2651
+ }
2652
+ export {
2653
+ PALETTE,
2654
+ PLACEHOLDER,
2655
+ PLACEHOLDER_ALT,
2656
+ SOCIAL_COLORS,
2657
+ TYPOGRAPHY,
2658
+ accordionBlockDefinition,
2659
+ allPrebuiltTemplates,
2660
+ appDownloadTemplate,
2661
+ buttonBlockDefinition,
2662
+ buttonsDualTemplate,
2663
+ carouselBlockDefinition,
2664
+ contentTemplates,
2665
+ couponBannerTemplate,
2666
+ couponDiscountTemplate,
2667
+ couponGiftCardTemplate,
2668
+ createStandardPrebuiltRegistry as createPrebuiltRegistry,
2669
+ createStandardBlockRegistry,
2670
+ createStandardPrebuiltRegistry,
2671
+ dividerBlockDefinition,
2672
+ dividerSectionTemplate,
2673
+ eventImageTemplate,
2674
+ eventSimpleTemplate,
2675
+ featureTemplates,
2676
+ features2ColTemplate,
2677
+ features3ColTemplate,
2678
+ features4ColRow2Template,
2679
+ features4ColTemplate,
2680
+ footerBlockDefinition,
2681
+ footerLinksTemplate,
2682
+ footerSocialTemplate,
2683
+ footerStandardTemplate,
2684
+ getTemplatesByCategory,
2685
+ headerBlockDefinition,
2686
+ heroBlockDefinition,
2687
+ heroMainTemplate,
2688
+ heroMinimalTemplate,
2689
+ heroNewsletterTemplate,
2690
+ heroSplitTemplate,
2691
+ heroTemplates,
2692
+ hostedPlaceholder,
2693
+ imageBlockDefinition,
2694
+ marketingTemplates,
2695
+ navbarBlockDefinition,
2696
+ placeholderImage,
2697
+ placeholderSize,
2698
+ productLeftTemplate,
2699
+ productRightTemplate,
2700
+ products2ColTemplate,
2701
+ products3ColTemplate,
2702
+ quoteBlockTemplate,
2703
+ rawBlockDefinition,
2704
+ sectionTitle1Template,
2705
+ sectionTitle2Template,
2706
+ sectionTitle3Template,
2707
+ signature1Template,
2708
+ signature2Template,
2709
+ signature3Template,
2710
+ signature4Template,
2711
+ socialBlockDefinition,
2712
+ spacerBlockDefinition,
2713
+ spacerSectionTemplate,
2714
+ styledBody,
2715
+ styledHeading,
2716
+ styledLabel,
2717
+ tableBlockDefinition,
2718
+ takeActionTemplate,
2719
+ templateCategories,
2720
+ textBlockDefinition,
2721
+ textImageLeftTemplate,
2722
+ textImageRightTemplate,
2723
+ utilityTemplates,
2724
+ withHostedPlaceholders
2725
+ };