@samva/markup 0.7.0 → 0.8.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/AGENTS.md +14 -0
- package/dist/brand-DcoVkh_S.d.ts +88 -0
- package/dist/{catalog-60eaYC7b.d.ts → catalog-CKuOooB8.d.ts} +13 -15
- package/dist/{checks-DBweSIPN.js → checks-D73Xizbw.js} +414 -2
- package/dist/checks.js +1 -1
- package/dist/classes.d.ts +2 -3
- package/dist/compiler.d.ts +62 -45
- package/dist/compiler.js +179 -857
- package/dist/{corpus-BjYMqOoY.d.ts → corpus-CPPfgAHN.d.ts} +14 -14
- package/dist/{css-COcFOT1y.d.ts → css-CS2jLID6.d.ts} +28 -2
- package/dist/email/assets.d.ts +40 -0
- package/dist/email/assets.js +63 -0
- package/dist/email/brand-footer.d.ts +34 -0
- package/dist/email/brand-footer.js +62 -0
- package/dist/email/brand.d.ts +2 -0
- package/dist/email/brand.js +148 -0
- package/dist/email/html.d.ts +2 -42
- package/dist/email/html.js +11 -0
- package/dist/email/render.d.ts +12 -5
- package/dist/email/render.js +2 -5
- package/dist/email/selection.d.ts +2 -91
- package/dist/email/stylesheets.d.ts +1 -1
- package/dist/email/stylesheets.js +3 -0
- package/dist/html-Bl9BAdqc.d.ts +42 -0
- package/dist/{ops-2aiiYO7m.js → ops-BvwqHl7V.js} +2 -2
- package/dist/ops.js +1 -1
- package/dist/registry-Dcp6QEK_.d.ts +73 -0
- package/dist/registry.d.ts +2 -42
- package/dist/{render-aaJBnsXK.js → render-vAv_4r9v.js} +174 -17
- package/dist/selection-CCArx9lU.d.ts +91 -0
- package/dist/{showcase-DGZAWn4Z.d.ts → showcase-egkusQBf.d.ts} +15 -56
- package/dist/{presets → starters}/category-mapping.d.ts +5 -5
- package/dist/{presets → starters}/category-mapping.js +5 -5
- package/dist/starters/corpus.d.ts +2 -0
- package/dist/{presets → starters}/corpus.js +15 -15
- package/dist/starters/library.d.ts +18 -0
- package/dist/starters/library.js +692 -0
- package/dist/{presets → starters}/public-gallery.d.ts +47 -47
- package/dist/{presets → starters}/public-gallery.js +92 -92
- package/dist/{presets → starters}/public-handoff.d.ts +14 -14
- package/dist/{presets → starters}/public-handoff.js +40 -40
- package/dist/{presets → starters}/public-preview-artifacts.d.ts +4 -4
- package/dist/{presets → starters}/public-preview-artifacts.js +15 -15
- package/dist/{presets → starters}/public-preview.d.ts +1 -1
- package/dist/{presets → starters}/public-preview.js +3 -3
- package/dist/starters/showcase.d.ts +2 -0
- package/dist/starters/showcase.js +335 -0
- package/dist/starters/sources.d.ts +45 -0
- package/dist/{presets → starters}/sources.js +1951 -272
- package/dist/starters/theme.d.ts +45 -0
- package/dist/starters/theme.js +77 -0
- package/dist/starters.d.ts +2 -0
- package/dist/{presets.js → starters.js} +4 -11
- package/dist/tailwind-BYq7Lo6u.js +727 -0
- package/dist/theme-css-hFqcPSar.js +587 -0
- package/dist/theme-css.d.ts +56 -15
- package/dist/theme-css.js +2 -509
- package/dist/tsx-tracer.js +1 -1
- package/dist/unsubscribe-link-CoesnQDU.js +26 -0
- package/package.json +53 -41
- package/samva-brand.d.ts +14 -0
- package/dist/footer.d.ts +0 -66
- package/dist/footer.js +0 -93
- package/dist/presets/corpus.d.ts +0 -2
- package/dist/presets/showcase.d.ts +0 -2
- package/dist/presets/showcase.js +0 -627
- package/dist/presets/sources.d.ts +0 -38
- package/dist/presets.d.ts +0 -2
- package/dist/theme-6ApjjiBo.d.ts +0 -116
- package/dist/theme.d.ts +0 -2
- package/dist/theme.js +0 -118
- package/dist/tokens.d.ts +0 -6
- package/dist/tokens.js +0 -417
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samva/markup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Type-safe authoring and compilation primitives for Samva templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
|
28
28
|
"!dist/**/*.map",
|
|
29
|
+
"samva-brand.d.ts",
|
|
29
30
|
"generated",
|
|
30
31
|
"package.json",
|
|
31
32
|
"README.md",
|
|
@@ -88,10 +89,6 @@
|
|
|
88
89
|
"types": "./dist/checks.d.ts",
|
|
89
90
|
"import": "./dist/checks.js"
|
|
90
91
|
},
|
|
91
|
-
"./footer": {
|
|
92
|
-
"types": "./dist/footer.d.ts",
|
|
93
|
-
"import": "./dist/footer.js"
|
|
94
|
-
},
|
|
95
92
|
"./conditionals": {
|
|
96
93
|
"types": "./dist/conditionals.d.ts",
|
|
97
94
|
"import": "./dist/conditionals.js"
|
|
@@ -124,41 +121,49 @@
|
|
|
124
121
|
"types": "./dist/predicate.d.ts",
|
|
125
122
|
"import": "./dist/predicate.js"
|
|
126
123
|
},
|
|
127
|
-
"./
|
|
128
|
-
"types": "./dist/
|
|
129
|
-
"import": "./dist/
|
|
124
|
+
"./starters": {
|
|
125
|
+
"types": "./dist/starters.d.ts",
|
|
126
|
+
"import": "./dist/starters.js"
|
|
127
|
+
},
|
|
128
|
+
"./starters/category-mapping": {
|
|
129
|
+
"types": "./dist/starters/category-mapping.d.ts",
|
|
130
|
+
"import": "./dist/starters/category-mapping.js"
|
|
131
|
+
},
|
|
132
|
+
"./starters/corpus": {
|
|
133
|
+
"types": "./dist/starters/corpus.d.ts",
|
|
134
|
+
"import": "./dist/starters/corpus.js"
|
|
130
135
|
},
|
|
131
|
-
"./
|
|
132
|
-
"types": "./dist/
|
|
133
|
-
"import": "./dist/
|
|
136
|
+
"./starters/library": {
|
|
137
|
+
"types": "./dist/starters/library.d.ts",
|
|
138
|
+
"import": "./dist/starters/library.js"
|
|
134
139
|
},
|
|
135
|
-
"./
|
|
136
|
-
"types": "./dist/
|
|
137
|
-
"import": "./dist/
|
|
140
|
+
"./starters/public-gallery": {
|
|
141
|
+
"types": "./dist/starters/public-gallery.d.ts",
|
|
142
|
+
"import": "./dist/starters/public-gallery.js"
|
|
138
143
|
},
|
|
139
|
-
"./
|
|
140
|
-
"types": "./dist/
|
|
141
|
-
"import": "./dist/
|
|
144
|
+
"./starters/public-handoff": {
|
|
145
|
+
"types": "./dist/starters/public-handoff.d.ts",
|
|
146
|
+
"import": "./dist/starters/public-handoff.js"
|
|
142
147
|
},
|
|
143
|
-
"./
|
|
144
|
-
"types": "./dist/
|
|
145
|
-
"import": "./dist/
|
|
148
|
+
"./starters/public-preview": {
|
|
149
|
+
"types": "./dist/starters/public-preview.d.ts",
|
|
150
|
+
"import": "./dist/starters/public-preview.js"
|
|
146
151
|
},
|
|
147
|
-
"./
|
|
148
|
-
"types": "./dist/
|
|
149
|
-
"import": "./dist/
|
|
152
|
+
"./starters/public-preview-artifacts": {
|
|
153
|
+
"types": "./dist/starters/public-preview-artifacts.d.ts",
|
|
154
|
+
"import": "./dist/starters/public-preview-artifacts.js"
|
|
150
155
|
},
|
|
151
|
-
"./
|
|
152
|
-
"types": "./dist/
|
|
153
|
-
"import": "./dist/
|
|
156
|
+
"./starters/showcase": {
|
|
157
|
+
"types": "./dist/starters/showcase.d.ts",
|
|
158
|
+
"import": "./dist/starters/showcase.js"
|
|
154
159
|
},
|
|
155
|
-
"./
|
|
156
|
-
"types": "./dist/
|
|
157
|
-
"import": "./dist/
|
|
160
|
+
"./starters/sources": {
|
|
161
|
+
"types": "./dist/starters/sources.d.ts",
|
|
162
|
+
"import": "./dist/starters/sources.js"
|
|
158
163
|
},
|
|
159
|
-
"./
|
|
160
|
-
"types": "./dist/
|
|
161
|
-
"import": "./dist/
|
|
164
|
+
"./starters/theme": {
|
|
165
|
+
"types": "./dist/starters/theme.d.ts",
|
|
166
|
+
"import": "./dist/starters/theme.js"
|
|
162
167
|
},
|
|
163
168
|
"./printer": {
|
|
164
169
|
"types": "./dist/printer.d.ts",
|
|
@@ -176,10 +181,6 @@
|
|
|
176
181
|
"types": "./dist/source-locations.d.ts",
|
|
177
182
|
"import": "./dist/source-locations.js"
|
|
178
183
|
},
|
|
179
|
-
"./theme": {
|
|
180
|
-
"types": "./dist/theme.d.ts",
|
|
181
|
-
"import": "./dist/theme.js"
|
|
182
|
-
},
|
|
183
184
|
"./theme-css": {
|
|
184
185
|
"types": "./dist/theme-css.d.ts",
|
|
185
186
|
"import": "./dist/theme-css.js"
|
|
@@ -192,10 +193,6 @@
|
|
|
192
193
|
"types": "./dist/tsx-source-instrumentation.d.ts",
|
|
193
194
|
"import": "./dist/tsx-source-instrumentation.js"
|
|
194
195
|
},
|
|
195
|
-
"./tokens": {
|
|
196
|
-
"types": "./dist/tokens.d.ts",
|
|
197
|
-
"import": "./dist/tokens.js"
|
|
198
|
-
},
|
|
199
196
|
"./variables": {
|
|
200
197
|
"types": "./dist/variables.d.ts",
|
|
201
198
|
"import": "./dist/variables.js"
|
|
@@ -233,6 +230,10 @@
|
|
|
233
230
|
"types": "./dist/email/diagnostics.d.ts",
|
|
234
231
|
"import": "./dist/email/diagnostics.js"
|
|
235
232
|
},
|
|
233
|
+
"./email/assets": {
|
|
234
|
+
"types": "./dist/email/assets.d.ts",
|
|
235
|
+
"import": "./dist/email/assets.js"
|
|
236
|
+
},
|
|
236
237
|
"./email/source-edit": {
|
|
237
238
|
"types": "./dist/email/source-edit.d.ts",
|
|
238
239
|
"import": "./dist/email/source-edit.js"
|
|
@@ -249,6 +250,17 @@
|
|
|
249
250
|
"types": "./dist/email/text.d.ts",
|
|
250
251
|
"import": "./dist/email/text.js"
|
|
251
252
|
},
|
|
253
|
+
"./samva-brand": {
|
|
254
|
+
"types": "./samva-brand.d.ts"
|
|
255
|
+
},
|
|
256
|
+
"./email/brand-footer": {
|
|
257
|
+
"types": "./dist/email/brand-footer.d.ts",
|
|
258
|
+
"import": "./dist/email/brand-footer.js"
|
|
259
|
+
},
|
|
260
|
+
"./email/brand": {
|
|
261
|
+
"types": "./dist/email/brand.d.ts",
|
|
262
|
+
"import": "./dist/email/brand.js"
|
|
263
|
+
},
|
|
252
264
|
"./email/stylesheets": {
|
|
253
265
|
"types": "./dist/email/stylesheets.d.ts",
|
|
254
266
|
"import": "./dist/email/stylesheets.js"
|
|
@@ -260,7 +272,7 @@
|
|
|
260
272
|
"scripts": {
|
|
261
273
|
"build": "tsdown",
|
|
262
274
|
"prepack": "bun run build",
|
|
263
|
-
"codegen:
|
|
275
|
+
"codegen:starters": "bun run ../vite/scripts/codegen-starters.ts && oxfmt starters/sources.gen.ts starters/library.gen.ts",
|
|
264
276
|
"import:public-handoff": "bun run ../vite/scripts/import-public-template-handoff.ts",
|
|
265
277
|
"corpus:render": "bun run scripts/render-compatibility-corpus.ts",
|
|
266
278
|
"codegen:tailwind": "bun run scripts/codegen-tailwind.ts && oxfmt src/email/tailwind-stylesheets.gen.ts",
|
package/samva-brand.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// The `samva:brand` module a template imports its brand components from. The
|
|
2
|
+
// compiler resolves the specifier to a generated module bound to the build's
|
|
3
|
+
// brand; this declaration is what a project's own `tsc` sees. Add
|
|
4
|
+
// `"types": ["@samva/markup/samva-brand"]` to the project's tsconfig.
|
|
5
|
+
|
|
6
|
+
declare module "samva:brand" {
|
|
7
|
+
export const BrandLogo: import("@samva/markup/email/brand").BrandComponents["BrandLogo"];
|
|
8
|
+
export const BrandFooter: import("@samva/markup/email/brand").BrandComponents["BrandFooter"];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module "samva:brand/*" {
|
|
12
|
+
export const BrandLogo: import("@samva/markup/email/brand").BrandComponents["BrandLogo"];
|
|
13
|
+
export const BrandFooter: import("@samva/markup/email/brand").BrandComponents["BrandFooter"];
|
|
14
|
+
}
|
package/dist/footer.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { s as TokenTable } from "./theme-6ApjjiBo.js";
|
|
2
|
-
//#region src/footer.d.ts
|
|
3
|
-
/** The per-recipient unsubscribe URL is not known at accept time (the body is
|
|
4
|
-
* shared across a send's deliveries), so the footer is composed with this
|
|
5
|
-
* placeholder in the unsubscribe href and the plain-text tail. The email queue
|
|
6
|
-
* processor substitutes each delivery's minted token URL at dispatch. The link
|
|
7
|
-
* carries `ses:no-track` so click tracking never rewrites (and thereby breaks)
|
|
8
|
-
* the placeholder. */
|
|
9
|
-
declare const FOOTER_UNSUBSCRIBE_PLACEHOLDER = "%samva:unsubscribe-url%";
|
|
10
|
-
/** One labelled social link. Structurally mirrors `DesignSocialLink`. */
|
|
11
|
-
interface FooterSocialLink {
|
|
12
|
-
readonly label: string;
|
|
13
|
-
readonly url: string;
|
|
14
|
-
}
|
|
15
|
-
/** A structured postal address. Structurally mirrors `DesignAddress`. */
|
|
16
|
-
interface FooterAddress {
|
|
17
|
-
readonly street1: string;
|
|
18
|
-
readonly street2?: string | undefined;
|
|
19
|
-
readonly city: string;
|
|
20
|
-
readonly region: string;
|
|
21
|
-
readonly postalCode: string;
|
|
22
|
-
readonly country: string;
|
|
23
|
-
}
|
|
24
|
-
/** The effective footer content. Structurally mirrors `DesignFooter`. */
|
|
25
|
-
interface FooterContent {
|
|
26
|
-
readonly companyName?: string | undefined;
|
|
27
|
-
readonly address?: FooterAddress | undefined;
|
|
28
|
-
readonly socialLinks?: ReadonlyArray<FooterSocialLink> | undefined;
|
|
29
|
-
readonly customHtml?: string | undefined;
|
|
30
|
-
}
|
|
31
|
-
/** Which compliance-relevant footer fields the effective content is missing,
|
|
32
|
-
* surfaced on the design read path for the dashboard's footer nudge. */
|
|
33
|
-
interface FooterCompleteness {
|
|
34
|
-
/** No physical mailing address is set anywhere in the cascade (CAN-SPAM). */
|
|
35
|
-
readonly missingAddress: boolean;
|
|
36
|
-
}
|
|
37
|
-
interface RenderedFooter {
|
|
38
|
-
/** Table-based footer block, ready to inject before the body's `</body>`. */
|
|
39
|
-
readonly html: string;
|
|
40
|
-
/** Plain-text footer tail, appended to the text alternative. */
|
|
41
|
-
readonly text: string;
|
|
42
|
-
readonly completeness: FooterCompleteness;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Which compliance-relevant fields the footer content lacks — the signal the
|
|
46
|
-
* dashboard's footer nudge reads. Derivable from `design.footer` alone (no token table),
|
|
47
|
-
* so the design read path can report it without composing the block. A
|
|
48
|
-
* `customHtml` footer is treated as complete (the org owns its own content).
|
|
49
|
-
*/
|
|
50
|
-
declare const footerCompleteness: (footer: FooterContent | undefined) => FooterCompleteness;
|
|
51
|
-
/**
|
|
52
|
-
* Compose the injected footer for one send. `unsubscribeUrl` is the placeholder
|
|
53
|
-
* (`FOOTER_UNSUBSCRIBE_PLACEHOLDER`) when a group resolved and dispatch will
|
|
54
|
-
* mint the per-recipient link, or `null` to omit the unsubscribe row entirely
|
|
55
|
-
* (no group resolved). Never throws and never blocks: whatever content exists
|
|
56
|
-
* renders, and the missing pieces are reported via `completeness`.
|
|
57
|
-
*/
|
|
58
|
-
declare const renderFooterBlock: (input: {
|
|
59
|
-
readonly footer: FooterContent;
|
|
60
|
-
readonly tokens: TokenTable;
|
|
61
|
-
readonly unsubscribeUrl: string | null;
|
|
62
|
-
readonly unsubscribeLabel?: string | undefined;
|
|
63
|
-
}) => RenderedFooter;
|
|
64
|
-
//#endregion
|
|
65
|
-
export { FOOTER_UNSUBSCRIBE_PLACEHOLDER, FooterAddress, FooterCompleteness, FooterContent, FooterSocialLink, RenderedFooter, footerCompleteness, renderFooterBlock };
|
|
66
|
-
//# sourceMappingURL=footer.d.ts.map
|
package/dist/footer.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
//#region src/footer.ts
|
|
2
|
-
/** The per-recipient unsubscribe URL is not known at accept time (the body is
|
|
3
|
-
* shared across a send's deliveries), so the footer is composed with this
|
|
4
|
-
* placeholder in the unsubscribe href and the plain-text tail. The email queue
|
|
5
|
-
* processor substitutes each delivery's minted token URL at dispatch. The link
|
|
6
|
-
* carries `ses:no-track` so click tracking never rewrites (and thereby breaks)
|
|
7
|
-
* the placeholder. */
|
|
8
|
-
const FOOTER_UNSUBSCRIBE_PLACEHOLDER = "%samva:unsubscribe-url%";
|
|
9
|
-
const escapeText = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
10
|
-
const escapeAttribute = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
11
|
-
const isSafeUrl = (url) => /^(https?:|mailto:)/i.test(url.trim());
|
|
12
|
-
const addressLines = (address) => {
|
|
13
|
-
const region = [
|
|
14
|
-
address.city,
|
|
15
|
-
address.region,
|
|
16
|
-
address.postalCode
|
|
17
|
-
].filter(Boolean).join(", ");
|
|
18
|
-
return [
|
|
19
|
-
address.street1,
|
|
20
|
-
address.street2,
|
|
21
|
-
region,
|
|
22
|
-
address.country
|
|
23
|
-
].filter((line) => typeof line === "string" && line.trim().length > 0);
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Which compliance-relevant fields the footer content lacks — the signal the
|
|
27
|
-
* dashboard's footer nudge reads. Derivable from `design.footer` alone (no token table),
|
|
28
|
-
* so the design read path can report it without composing the block. A
|
|
29
|
-
* `customHtml` footer is treated as complete (the org owns its own content).
|
|
30
|
-
*/
|
|
31
|
-
const footerCompleteness = (footer) => ({ missingAddress: footer?.customHtml === void 0 && (footer?.address === void 0 || addressLines(footer.address).length === 0) });
|
|
32
|
-
/**
|
|
33
|
-
* Compose the injected footer for one send. `unsubscribeUrl` is the placeholder
|
|
34
|
-
* (`FOOTER_UNSUBSCRIBE_PLACEHOLDER`) when a group resolved and dispatch will
|
|
35
|
-
* mint the per-recipient link, or `null` to omit the unsubscribe row entirely
|
|
36
|
-
* (no group resolved). Never throws and never blocks: whatever content exists
|
|
37
|
-
* renders, and the missing pieces are reported via `completeness`.
|
|
38
|
-
*/
|
|
39
|
-
const renderFooterBlock = (input) => {
|
|
40
|
-
const { footer, tokens, unsubscribeUrl } = input;
|
|
41
|
-
const unsubscribeLabel = input.unsubscribeLabel ?? "Unsubscribe";
|
|
42
|
-
const fontFamily = tokens.fontFamilies["body"] ?? tokens.fontFamilies["sans"] ?? "sans-serif";
|
|
43
|
-
const mutedColor = tokens.colors["gray-500"] ?? tokens.colors["neutral-500"] ?? "#6a7282";
|
|
44
|
-
const linkColor = tokens.colors["brand"] ?? mutedColor;
|
|
45
|
-
const containerPx = tokens.containerPx["xl"] ?? 600;
|
|
46
|
-
const fontSizePx = tokens.text["xs"]?.sizePx ?? 12;
|
|
47
|
-
const lineHeightPx = tokens.text["xs"]?.lineHeightPx ?? 18;
|
|
48
|
-
const fontFamilyAttribute = escapeAttribute(fontFamily);
|
|
49
|
-
const mutedColorAttribute = escapeAttribute(mutedColor);
|
|
50
|
-
const linkColorAttribute = escapeAttribute(linkColor);
|
|
51
|
-
const rows = [];
|
|
52
|
-
const textLines = [];
|
|
53
|
-
if (typeof footer.customHtml === "string" && footer.customHtml.trim().length > 0) rows.push(`<tr><td style="padding:0 0 12px 0;">${footer.customHtml}</td></tr>`);
|
|
54
|
-
else {
|
|
55
|
-
if (typeof footer.companyName === "string" && footer.companyName.trim().length > 0) {
|
|
56
|
-
rows.push(`<tr><td style="padding:0 0 4px 0;font-weight:600;">${escapeText(footer.companyName)}</td></tr>`);
|
|
57
|
-
textLines.push(footer.companyName);
|
|
58
|
-
}
|
|
59
|
-
if (footer.address !== void 0) {
|
|
60
|
-
const lines = addressLines(footer.address);
|
|
61
|
-
if (lines.length > 0) {
|
|
62
|
-
rows.push(`<tr><td style="padding:0 0 8px 0;">${lines.map(escapeText).join("<br />")}</td></tr>`);
|
|
63
|
-
textLines.push(lines.join(", "));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (footer.socialLinks !== void 0 && footer.socialLinks.length > 0) {
|
|
67
|
-
const links = footer.socialLinks.map((link) => isSafeUrl(link.url) ? `<a href="${escapeAttribute(link.url.trim())}" style="color:${linkColorAttribute};text-decoration:underline;" ses:no-track>${escapeText(link.label)}</a>` : escapeText(link.label));
|
|
68
|
-
rows.push(`<tr><td style="padding:0 0 8px 0;">${links.join("<span style=\"padding:0 6px;\">·</span>")}</td></tr>`);
|
|
69
|
-
textLines.push(footer.socialLinks.map((link) => `${link.label}: ${link.url}`).join(" "));
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (unsubscribeUrl !== null) {
|
|
73
|
-
rows.push(`<tr><td style="padding:0;"><a href="${escapeAttribute(unsubscribeUrl)}" style="color:${mutedColorAttribute};text-decoration:underline;" ses:no-track>${escapeText(unsubscribeLabel)}</a></td></tr>`);
|
|
74
|
-
textLines.push(`${unsubscribeLabel}: ${unsubscribeUrl}`);
|
|
75
|
-
}
|
|
76
|
-
return {
|
|
77
|
-
html: rows.length === 0 ? "" : [
|
|
78
|
-
`<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="width:100%;border-collapse:collapse;">`,
|
|
79
|
-
`<tr><td align="center" style="padding:32px 16px;">`,
|
|
80
|
-
`<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="${containerPx}" style="width:100%;max-width:${containerPx}px;border-collapse:collapse;font-family:${fontFamilyAttribute};font-size:${fontSizePx}px;line-height:${lineHeightPx}px;color:${mutedColorAttribute};text-align:center;">`,
|
|
81
|
-
...rows,
|
|
82
|
-
`</table>`,
|
|
83
|
-
`</td></tr>`,
|
|
84
|
-
`</table>`
|
|
85
|
-
].join(""),
|
|
86
|
-
text: textLines.length === 0 ? "" : `\n\n---\n${textLines.join("\n")}`,
|
|
87
|
-
completeness: footerCompleteness(footer)
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
//#endregion
|
|
91
|
-
export { FOOTER_UNSUBSCRIBE_PLACEHOLDER, footerCompleteness, renderFooterBlock };
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=footer.js.map
|
package/dist/presets/corpus.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as PublicCorpusRegistrationIssue, c as TemplateFacetQuery, d as matchesTemplateFacets, f as ownedPresetSourcePath, h as templateFacetOptions, i as PublicCorpusRegistration, l as TemplateFacetSet, m as registerPublicCorpusEntry, n as InspirationReference, o as TemplateCorpusKind, p as ownedShowcasePresetSources, r as OwnedEditablePreset, s as TemplateCorpusRecord, t as BrandRecreationPreset, u as brandRecreationProvenance } from "../corpus-BjYMqOoY.js";
|
|
2
|
-
export { BrandRecreationPreset, InspirationReference, OwnedEditablePreset, PublicCorpusRegistration, PublicCorpusRegistrationIssue, TemplateCorpusKind, TemplateCorpusRecord, TemplateFacetQuery, TemplateFacetSet, brandRecreationProvenance, matchesTemplateFacets, ownedPresetSourcePath, ownedShowcasePresetSources, registerPublicCorpusEntry, templateFacetOptions };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { a as ShowcaseProjectId, c as showcaseProject, d as showcaseSourcePath, i as ShowcaseProject, l as showcaseProjectPaths, n as OwnedShowcaseId, o as ShowcaseProvenance, r as SHOWCASE_ROOT, s as isShowcaseProjectId, t as BrandRecreationShowcaseId, u as showcaseProjects } from "../showcase-DGZAWn4Z.js";
|
|
2
|
-
export { BrandRecreationShowcaseId, OwnedShowcaseId, SHOWCASE_ROOT, ShowcaseProject, ShowcaseProjectId, ShowcaseProvenance, isShowcaseProjectId, showcaseProject, showcaseProjectPaths, showcaseProjects, showcaseSourcePath };
|