@samva/markup 0.2.0 → 0.4.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/catalog-Ck1tAGwO.d.ts +356 -0
- package/dist/compiler.d.ts +7 -5
- package/dist/compiler.js +7 -6
- package/dist/{corpus-Dz5irJ9x.d.ts → corpus-U2EeALvS.d.ts} +76 -3
- package/dist/{stylesheets-oDRAnYA3.d.ts → css-ar2lU3NC.d.ts} +2 -12
- package/dist/email/components.d.ts +8 -2
- package/dist/email/components.js +8 -5
- package/dist/email/render.d.ts +8 -1
- package/dist/email/render.js +2 -2
- package/dist/email/stylesheets.d.ts +15 -2
- package/dist/email/stylesheets.js +3 -1
- package/dist/email/text.js +9 -1
- package/dist/presets/category-mapping.d.ts +1 -1
- package/dist/presets/corpus.d.ts +2 -2
- package/dist/presets/corpus.js +55 -4
- package/dist/presets/public-gallery.d.ts +123 -129
- package/dist/presets/public-gallery.js +260 -215
- package/dist/presets/public-handoff.d.ts +31 -7
- package/dist/presets/public-handoff.js +107 -35
- package/dist/presets/public-preview-artifacts.d.ts +1 -1
- package/dist/presets/public-preview-artifacts.js +6 -6
- package/dist/presets/public-preview.d.ts +11 -6
- package/dist/presets/public-preview.js +48 -359
- package/dist/presets/showcase.d.ts +2 -0
- package/dist/presets/showcase.js +627 -0
- package/dist/presets/sources.d.ts +21 -3
- package/dist/presets/sources.js +6008 -1148
- package/dist/presets.d.ts +2 -350
- package/dist/presets.js +395 -765
- package/dist/{render-Cddsy_XF.js → render-ykQhtMs_.js} +13 -6
- package/dist/showcase-C_xgl6hz.d.ts +456 -0
- package/package.json +5 -1
|
@@ -2,7 +2,7 @@ import { EmailNode, drainEmailDiagnostics } from "./email/jsx-runtime.js";
|
|
|
2
2
|
import { declarationValue, kebab, serializeEmailHtml } from "./email/html.js";
|
|
3
3
|
import { PREHEADER_ATTRIBUTE, preheaderNode } from "./email/components.js";
|
|
4
4
|
import { EmailCompileError, hasBlockingDiagnostic } from "./email/diagnostics.js";
|
|
5
|
-
import {
|
|
5
|
+
import { snapshotStylesheets } from "./email/stylesheets.js";
|
|
6
6
|
import { deriveEmailText } from "./email/text.js";
|
|
7
7
|
import { Predicate } from "effect";
|
|
8
8
|
//#region src/email/css-values.ts
|
|
@@ -525,7 +525,14 @@ const withHeadCss = (node, css) => {
|
|
|
525
525
|
return insert(node);
|
|
526
526
|
};
|
|
527
527
|
/** Render one validated input through the template's only content function. Host isolation is required for untrusted source. */
|
|
528
|
-
const renderEmail = (template, data, options = {}) =>
|
|
528
|
+
const renderEmail = (template, data, options = {}) => renderEmailWith(snapshotStylesheets(), template, data, options);
|
|
529
|
+
/**
|
|
530
|
+
* A render bound to the sheets registered so far. A compiled project's wrapper
|
|
531
|
+
* calls this once its own stylesheet imports have run, so a later project
|
|
532
|
+
* loaded into the same process cannot restyle an entry that is rendered again.
|
|
533
|
+
*/
|
|
534
|
+
const bindStylesheets = (stylesheet = snapshotStylesheets()) => (template, data, options = {}) => renderEmailWith(stylesheet, template, data, options);
|
|
535
|
+
const renderEmailWith = (stylesheet, template, data, options) => {
|
|
529
536
|
if (!template.schema.validate(data)) throw new TypeError(`Invalid template input: ${JSON.stringify(template.schema.validate.errors)}`);
|
|
530
537
|
drainEmailDiagnostics();
|
|
531
538
|
const content = template.render(data);
|
|
@@ -543,11 +550,11 @@ const renderEmail = (template, data, options = {}) => {
|
|
|
543
550
|
if (content.preheader !== void 0 && declared !== void 0) fail("duplicate-preheader", "Preheader is set on both the template content and <Email preheader>; keep one.");
|
|
544
551
|
settle(invalid);
|
|
545
552
|
const base = content.preheader === void 0 ? content.body : withPreheader(content.body, content.preheader);
|
|
546
|
-
const styled =
|
|
553
|
+
const styled = stylesheet === void 0 ? {
|
|
547
554
|
tree: base,
|
|
548
555
|
headCss: "",
|
|
549
556
|
diagnostics: []
|
|
550
|
-
};
|
|
557
|
+
} : applyStylesheet(base, stylesheet);
|
|
551
558
|
const style = [...styled.diagnostics];
|
|
552
559
|
let tree = styled.tree;
|
|
553
560
|
if (styled.headCss !== "") {
|
|
@@ -580,6 +587,6 @@ const renderEmail = (template, data, options = {}) => {
|
|
|
580
587
|
};
|
|
581
588
|
};
|
|
582
589
|
//#endregion
|
|
583
|
-
export {
|
|
590
|
+
export { applyStylesheet as a, downlevelMediaQuery as c, renderHeadCss as d, resolveVariables as f, renderEmail as i, finalizeValue as l, bindStylesheets as n, classListOf as o, compileEmail as r, matchesSelector as s, EMAIL_DOCTYPE as t, foldCalc as u };
|
|
584
591
|
|
|
585
|
-
//# sourceMappingURL=render-
|
|
592
|
+
//# sourceMappingURL=render-ykQhtMs_.js.map
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import { r as PresetCategory } from "./catalog-Ck1tAGwO.js";
|
|
2
|
+
//#region presets/showcase.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The showcase projects: presets authored as complete editable projects under
|
|
5
|
+
* `examples/email-showcase` rather than as the single module `packages/markup/presets/<id>.tsx`.
|
|
6
|
+
*
|
|
7
|
+
* This registry is the one place a showcase project is declared. Codegen reads it to bundle the
|
|
8
|
+
* project's files, the corpus reads it for provenance and canonical source paths, and
|
|
9
|
+
* `showcase.test.ts` fails when an entry here is missing from the catalog, the public gallery or
|
|
10
|
+
* the previews — so a project cannot be half-registered.
|
|
11
|
+
*/
|
|
12
|
+
/** How a showcase project's design came about, and what a public surface must say about it. */
|
|
13
|
+
type ShowcaseProvenance = {
|
|
14
|
+
readonly kind: "owned";
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: "brand-recreation";
|
|
17
|
+
/** The brand whose own email is recreated, named on every public surface. */
|
|
18
|
+
readonly brand: string;
|
|
19
|
+
/** What that brand's email does, in the customer's words. */
|
|
20
|
+
readonly subject: string;
|
|
21
|
+
readonly reviewedNote: string;
|
|
22
|
+
};
|
|
23
|
+
interface ShowcaseProject {
|
|
24
|
+
/** The preset id, matching its catalog row and its entry file's stem. */
|
|
25
|
+
readonly id: string;
|
|
26
|
+
/** The project's TSX entry, relative to the showcase root. */
|
|
27
|
+
readonly entryPath: `emails/${string}.tsx`;
|
|
28
|
+
/** Every other file that travels with the entry: stylesheet, assets, retained notices. */
|
|
29
|
+
readonly files: ReadonlyArray<string>;
|
|
30
|
+
readonly provenance: ShowcaseProvenance;
|
|
31
|
+
/** Must equal the catalog row's category. */
|
|
32
|
+
readonly category: PresetCategory;
|
|
33
|
+
/** Must equal the public gallery entry's slug. */
|
|
34
|
+
readonly gallerySlug: string;
|
|
35
|
+
/** Stable ISO-8601 timestamp recorded on the corpus entry. */
|
|
36
|
+
readonly recordedAt: string;
|
|
37
|
+
}
|
|
38
|
+
/** Repository-relative root of the showcase project, used to build canonical source paths. */
|
|
39
|
+
declare const SHOWCASE_ROOT = "examples/email-showcase";
|
|
40
|
+
declare const showcaseProjects: readonly [{
|
|
41
|
+
readonly id: "data-sharing-review";
|
|
42
|
+
readonly entryPath: "emails/data-sharing-review.tsx";
|
|
43
|
+
readonly files: readonly ["emails/data-sharing-review.css", "emails/assets/data-sharing-review-connection.png", "emails/assets/data-sharing-review-wordmark.png"];
|
|
44
|
+
readonly provenance: {
|
|
45
|
+
readonly kind: "owned";
|
|
46
|
+
};
|
|
47
|
+
readonly category: "transactional";
|
|
48
|
+
readonly gallerySlug: "data-sharing-review";
|
|
49
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
50
|
+
}, {
|
|
51
|
+
readonly id: "editorial-newsletter";
|
|
52
|
+
readonly entryPath: "emails/editorial-newsletter.tsx";
|
|
53
|
+
readonly files: readonly ["emails/editorial-newsletter.css", "emails/assets/editorial-newsletter-author.png", "emails/assets/editorial-newsletter-hero.png", "emails/assets/editorial-newsletter-sponsor.png", "emails/assets/editorial-newsletter-wordmark.png"];
|
|
54
|
+
readonly provenance: {
|
|
55
|
+
readonly kind: "owned";
|
|
56
|
+
};
|
|
57
|
+
readonly category: "digest";
|
|
58
|
+
readonly gallerySlug: "editorial-newsletter";
|
|
59
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
60
|
+
}, {
|
|
61
|
+
readonly id: "email-verification";
|
|
62
|
+
readonly entryPath: "emails/email-verification.tsx";
|
|
63
|
+
readonly files: readonly ["emails/email-verification.css", "emails/assets/email-verification-badge.png", "emails/assets/email-verification-wordmark.png"];
|
|
64
|
+
readonly provenance: {
|
|
65
|
+
readonly kind: "owned";
|
|
66
|
+
};
|
|
67
|
+
readonly category: "transactional";
|
|
68
|
+
readonly gallerySlug: "email-verification";
|
|
69
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: "events-roundup";
|
|
72
|
+
readonly entryPath: "emails/events-roundup.tsx";
|
|
73
|
+
readonly files: readonly ["emails/events-roundup.css", "emails/assets/events-roundup-spotlight.png", "emails/assets/events-roundup-tile-five.png", "emails/assets/events-roundup-tile-four.png", "emails/assets/events-roundup-tile-one.png", "emails/assets/events-roundup-tile-six.png", "emails/assets/events-roundup-tile-three.png", "emails/assets/events-roundup-tile-two.png", "emails/assets/events-roundup-wordmark.png"];
|
|
74
|
+
readonly provenance: {
|
|
75
|
+
readonly kind: "owned";
|
|
76
|
+
};
|
|
77
|
+
readonly category: "digest";
|
|
78
|
+
readonly gallerySlug: "events-roundup";
|
|
79
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
80
|
+
}, {
|
|
81
|
+
readonly id: "feature-release-roundup";
|
|
82
|
+
readonly entryPath: "emails/feature-release-roundup.tsx";
|
|
83
|
+
readonly files: readonly ["emails/feature-release-roundup.css", "emails/assets/feature-release-roundup-release-activity.png", "emails/assets/feature-release-roundup-release-branching.png", "emails/assets/feature-release-roundup-release-keys.png", "emails/assets/feature-release-roundup-release-nodes.png", "emails/assets/feature-release-roundup-release-regions.png", "emails/assets/feature-release-roundup-wordmark.png"];
|
|
84
|
+
readonly provenance: {
|
|
85
|
+
readonly kind: "owned";
|
|
86
|
+
};
|
|
87
|
+
readonly category: "marketing";
|
|
88
|
+
readonly gallerySlug: "feature-release-roundup";
|
|
89
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
90
|
+
}, {
|
|
91
|
+
readonly id: "feedback-request";
|
|
92
|
+
readonly entryPath: "emails/feedback-request.tsx";
|
|
93
|
+
readonly files: readonly ["emails/feedback-request.css", "emails/assets/feedback-request-avatar.png", "emails/assets/feedback-request-wordmark.png"];
|
|
94
|
+
readonly provenance: {
|
|
95
|
+
readonly kind: "owned";
|
|
96
|
+
};
|
|
97
|
+
readonly category: "lifecycle";
|
|
98
|
+
readonly gallerySlug: "feedback-request";
|
|
99
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
100
|
+
}, {
|
|
101
|
+
readonly id: "flash-getaway-offer";
|
|
102
|
+
readonly entryPath: "emails/flash-getaway-offer.tsx";
|
|
103
|
+
readonly files: readonly ["emails/flash-getaway-offer.css", "emails/assets/flash-getaway-offer-banner.png", "emails/assets/flash-getaway-offer-city-harbour.png", "emails/assets/flash-getaway-offer-desert-canyon.png", "emails/assets/flash-getaway-offer-reef-bay.png", "emails/assets/flash-getaway-offer-snow-ridge.png", "emails/assets/flash-getaway-offer-wordmark.png"];
|
|
104
|
+
readonly provenance: {
|
|
105
|
+
readonly kind: "owned";
|
|
106
|
+
};
|
|
107
|
+
readonly category: "marketing";
|
|
108
|
+
readonly gallerySlug: "flash-getaway-offer";
|
|
109
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
110
|
+
}, {
|
|
111
|
+
readonly id: "industry-news-digest";
|
|
112
|
+
readonly entryPath: "emails/industry-news-digest.tsx";
|
|
113
|
+
readonly files: readonly ["emails/industry-news-digest.css", "emails/assets/industry-news-digest-lead.png", "emails/assets/industry-news-digest-sponsor.png", "emails/assets/industry-news-digest-wordmark.png"];
|
|
114
|
+
readonly provenance: {
|
|
115
|
+
readonly kind: "owned";
|
|
116
|
+
};
|
|
117
|
+
readonly category: "digest";
|
|
118
|
+
readonly gallerySlug: "industry-news-digest";
|
|
119
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
120
|
+
}, {
|
|
121
|
+
readonly id: "rewards-milestone";
|
|
122
|
+
readonly entryPath: "emails/rewards-milestone.tsx";
|
|
123
|
+
readonly files: readonly ["emails/assets/rewards-milestone-banner.png", "emails/assets/rewards-milestone-tier-amber.png", "emails/assets/rewards-milestone-tier-brass.png", "emails/assets/rewards-milestone-tier-copper.png", "emails/assets/rewards-milestone-tier-slate.png", "emails/assets/rewards-milestone-wordmark.png", "emails/rewards-milestone.css"];
|
|
124
|
+
readonly provenance: {
|
|
125
|
+
readonly kind: "owned";
|
|
126
|
+
};
|
|
127
|
+
readonly category: "marketing";
|
|
128
|
+
readonly gallerySlug: "rewards-milestone";
|
|
129
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
130
|
+
}, {
|
|
131
|
+
readonly id: "member-referral-offer";
|
|
132
|
+
readonly entryPath: "emails/member-referral-offer.tsx";
|
|
133
|
+
readonly files: readonly ["emails/assets/member-referral-offer-hero.png", "emails/assets/member-referral-offer-step-earn.png", "emails/assets/member-referral-offer-step-join.png", "emails/assets/member-referral-offer-step-share.png", "emails/assets/member-referral-offer-wordmark.png", "emails/member-referral-offer.css"];
|
|
134
|
+
readonly provenance: {
|
|
135
|
+
readonly kind: "owned";
|
|
136
|
+
};
|
|
137
|
+
readonly category: "marketing";
|
|
138
|
+
readonly gallerySlug: "member-referral-offer";
|
|
139
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
140
|
+
}, {
|
|
141
|
+
readonly id: "catalog-sale-newsletter";
|
|
142
|
+
readonly entryPath: "emails/catalog-sale-newsletter.tsx";
|
|
143
|
+
readonly files: readonly ["emails/assets/catalog-sale-newsletter-banner.png", "emails/assets/catalog-sale-newsletter-item-blanket.png", "emails/assets/catalog-sale-newsletter-item-crate.png", "emails/assets/catalog-sale-newsletter-item-kettle.png", "emails/assets/catalog-sale-newsletter-item-lantern.png", "emails/assets/catalog-sale-newsletter-wordmark.png", "emails/catalog-sale-newsletter.css"];
|
|
144
|
+
readonly provenance: {
|
|
145
|
+
readonly kind: "owned";
|
|
146
|
+
};
|
|
147
|
+
readonly category: "marketing";
|
|
148
|
+
readonly gallerySlug: "catalog-sale-newsletter";
|
|
149
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
150
|
+
}, {
|
|
151
|
+
readonly id: "event-invite";
|
|
152
|
+
readonly entryPath: "emails/event-invite.tsx";
|
|
153
|
+
readonly files: readonly ["emails/assets/event-invite-hero.png", "emails/assets/event-invite-wordmark.png", "emails/event-invite.css"];
|
|
154
|
+
readonly provenance: {
|
|
155
|
+
readonly kind: "owned";
|
|
156
|
+
};
|
|
157
|
+
readonly category: "marketing";
|
|
158
|
+
readonly gallerySlug: "event-invite";
|
|
159
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
160
|
+
}, {
|
|
161
|
+
readonly id: "limited-time-savings";
|
|
162
|
+
readonly entryPath: "emails/limited-time-savings.tsx";
|
|
163
|
+
readonly files: readonly ["emails/assets/limited-time-savings-banner.png", "emails/assets/limited-time-savings-wordmark.png", "emails/limited-time-savings.css"];
|
|
164
|
+
readonly provenance: {
|
|
165
|
+
readonly kind: "owned";
|
|
166
|
+
};
|
|
167
|
+
readonly category: "marketing";
|
|
168
|
+
readonly gallerySlug: "limited-time-savings";
|
|
169
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
170
|
+
}, {
|
|
171
|
+
readonly id: "membership-promo";
|
|
172
|
+
readonly entryPath: "emails/membership-promo.tsx";
|
|
173
|
+
readonly files: readonly ["emails/assets/membership-promo-hero.png", "emails/assets/membership-promo-tier-cellar.png", "emails/assets/membership-promo-tier-market.png", "emails/assets/membership-promo-tier-pantry.png", "emails/assets/membership-promo-wordmark.png", "emails/membership-promo.css"];
|
|
174
|
+
readonly provenance: {
|
|
175
|
+
readonly kind: "owned";
|
|
176
|
+
};
|
|
177
|
+
readonly category: "marketing";
|
|
178
|
+
readonly gallerySlug: "membership-promotion";
|
|
179
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
180
|
+
}, {
|
|
181
|
+
readonly id: "announcement";
|
|
182
|
+
readonly entryPath: "emails/announcement.tsx";
|
|
183
|
+
readonly files: readonly ["emails/announcement.css", "emails/assets/announcement-hero.png", "emails/assets/announcement-wordmark.png"];
|
|
184
|
+
readonly provenance: {
|
|
185
|
+
readonly kind: "owned";
|
|
186
|
+
};
|
|
187
|
+
readonly category: "marketing";
|
|
188
|
+
readonly gallerySlug: "feature-announcement";
|
|
189
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
190
|
+
}, {
|
|
191
|
+
readonly id: "linear-login-code";
|
|
192
|
+
readonly entryPath: "emails/linear-login-code.tsx";
|
|
193
|
+
readonly files: readonly ["emails/linear-login-code.css", "README.md", "emails/assets/linear-logo.png"];
|
|
194
|
+
readonly provenance: {
|
|
195
|
+
readonly kind: "brand-recreation";
|
|
196
|
+
readonly brand: "Linear";
|
|
197
|
+
readonly subject: "login code";
|
|
198
|
+
readonly reviewedNote: "Reviewed recreation of Linear's login code email, its canonical project assets, and its brand attribution.";
|
|
199
|
+
};
|
|
200
|
+
readonly category: "transactional";
|
|
201
|
+
readonly gallerySlug: "linear-login-code";
|
|
202
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
203
|
+
}, {
|
|
204
|
+
readonly id: "membership-benefits-promo";
|
|
205
|
+
readonly entryPath: "emails/membership-benefits-promo.tsx";
|
|
206
|
+
readonly files: readonly ["emails/membership-benefits-promo.css", "emails/assets/membership-benefits-promo-icon-concierge.png", "emails/assets/membership-benefits-promo-icon-lounge.png", "emails/assets/membership-benefits-promo-icon-shield.png", "emails/assets/membership-benefits-promo-icon-suitcase.png", "emails/assets/membership-benefits-promo-icon-table.png", "emails/assets/membership-benefits-promo-icon-ticket.png", "emails/assets/membership-benefits-promo-panel.png", "emails/assets/membership-benefits-promo-wordmark.png"];
|
|
207
|
+
readonly provenance: {
|
|
208
|
+
readonly kind: "owned";
|
|
209
|
+
};
|
|
210
|
+
readonly category: "marketing";
|
|
211
|
+
readonly gallerySlug: "membership-benefits-promo";
|
|
212
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
213
|
+
}, {
|
|
214
|
+
readonly id: "notification";
|
|
215
|
+
readonly entryPath: "emails/notification.tsx";
|
|
216
|
+
readonly files: readonly ["emails/notification.css", "emails/assets/notification-avatar-one.png", "emails/assets/notification-avatar-three.png", "emails/assets/notification-avatar-two.png", "emails/assets/notification-wordmark.png"];
|
|
217
|
+
readonly provenance: {
|
|
218
|
+
readonly kind: "owned";
|
|
219
|
+
};
|
|
220
|
+
readonly category: "transactional";
|
|
221
|
+
readonly gallerySlug: "activity-notification";
|
|
222
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
223
|
+
}, {
|
|
224
|
+
readonly id: "onboarding-step";
|
|
225
|
+
readonly entryPath: "emails/onboarding-step.tsx";
|
|
226
|
+
readonly files: readonly ["emails/onboarding-step.css", "emails/assets/onboarding-step-illustration.png", "emails/assets/onboarding-step-wordmark.png"];
|
|
227
|
+
readonly provenance: {
|
|
228
|
+
readonly kind: "owned";
|
|
229
|
+
};
|
|
230
|
+
readonly category: "lifecycle";
|
|
231
|
+
readonly gallerySlug: "onboarding-step";
|
|
232
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
233
|
+
}, {
|
|
234
|
+
readonly id: "order-receipt";
|
|
235
|
+
readonly entryPath: "emails/order-receipt.tsx";
|
|
236
|
+
readonly files: readonly ["emails/order-receipt.css", "emails/assets/order-receipt-candles.png", "emails/assets/order-receipt-mug.png", "emails/assets/order-receipt-napkins.png", "emails/assets/order-receipt-throw.png", "emails/assets/order-receipt-wordmark.png"];
|
|
237
|
+
readonly provenance: {
|
|
238
|
+
readonly kind: "owned";
|
|
239
|
+
};
|
|
240
|
+
readonly category: "transactional";
|
|
241
|
+
readonly gallerySlug: "order-receipt";
|
|
242
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
243
|
+
}, {
|
|
244
|
+
readonly id: "otp";
|
|
245
|
+
readonly entryPath: "emails/otp.tsx";
|
|
246
|
+
readonly files: readonly ["emails/otp.css", "emails/assets/otp-wordmark.png"];
|
|
247
|
+
readonly provenance: {
|
|
248
|
+
readonly kind: "owned";
|
|
249
|
+
};
|
|
250
|
+
readonly category: "transactional";
|
|
251
|
+
readonly gallerySlug: "one-time-passcode";
|
|
252
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
253
|
+
}, {
|
|
254
|
+
readonly id: "password-reset";
|
|
255
|
+
readonly entryPath: "emails/password-reset.tsx";
|
|
256
|
+
readonly files: readonly ["emails/password-reset.css", "emails/assets/password-reset-lock.png", "emails/assets/password-reset-wordmark.png"];
|
|
257
|
+
readonly provenance: {
|
|
258
|
+
readonly kind: "owned";
|
|
259
|
+
};
|
|
260
|
+
readonly category: "transactional";
|
|
261
|
+
readonly gallerySlug: "password-reset";
|
|
262
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
263
|
+
}, {
|
|
264
|
+
readonly id: "payment-failed";
|
|
265
|
+
readonly entryPath: "emails/payment-failed.tsx";
|
|
266
|
+
readonly files: readonly ["emails/payment-failed.css", "emails/assets/payment-failed-bowls.png", "emails/assets/payment-failed-kettle.png", "emails/assets/payment-failed-tray.png", "emails/assets/payment-failed-wordmark.png"];
|
|
267
|
+
readonly provenance: {
|
|
268
|
+
readonly kind: "owned";
|
|
269
|
+
};
|
|
270
|
+
readonly category: "transactional";
|
|
271
|
+
readonly gallerySlug: "payment-failed";
|
|
272
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
273
|
+
}, {
|
|
274
|
+
readonly id: "product-digest";
|
|
275
|
+
readonly entryPath: "emails/product-digest.tsx";
|
|
276
|
+
readonly files: readonly ["emails/product-digest.css", "emails/assets/product-digest-podcast.png", "emails/assets/product-digest-wordmark.png"];
|
|
277
|
+
readonly provenance: {
|
|
278
|
+
readonly kind: "owned";
|
|
279
|
+
};
|
|
280
|
+
readonly category: "digest";
|
|
281
|
+
readonly gallerySlug: "product-digest";
|
|
282
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
283
|
+
}, {
|
|
284
|
+
readonly id: "product-launch-promo";
|
|
285
|
+
readonly entryPath: "emails/product-launch-promo.tsx";
|
|
286
|
+
readonly files: readonly ["emails/product-launch-promo.css", "emails/assets/oakline-hero.png", "emails/assets/oakline-wordmark.png", "emails/assets/product-chair.png", "emails/assets/product-lamp.png", "emails/assets/product-mirror.png", "emails/assets/product-stool.png", "emails/assets/product-throw.png", "emails/assets/product-vase.png"];
|
|
287
|
+
readonly provenance: {
|
|
288
|
+
readonly kind: "owned";
|
|
289
|
+
};
|
|
290
|
+
readonly category: "marketing";
|
|
291
|
+
readonly gallerySlug: "product-launch-promotion";
|
|
292
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
293
|
+
}, {
|
|
294
|
+
readonly id: "product-newsletter";
|
|
295
|
+
readonly entryPath: "emails/product-newsletter.tsx";
|
|
296
|
+
readonly files: readonly ["emails/product-newsletter.css", "emails/assets/newsletter-lead.png", "emails/assets/newsletter-story-five.png", "emails/assets/newsletter-story-four.png", "emails/assets/newsletter-story-one.png", "emails/assets/newsletter-story-three.png", "emails/assets/newsletter-story-two.png", "emails/assets/newsletter-wordmark.png"];
|
|
297
|
+
readonly provenance: {
|
|
298
|
+
readonly kind: "owned";
|
|
299
|
+
};
|
|
300
|
+
readonly category: "digest";
|
|
301
|
+
readonly gallerySlug: "product-newsletter";
|
|
302
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
303
|
+
}, {
|
|
304
|
+
readonly id: "product-onboarding-tour";
|
|
305
|
+
readonly entryPath: "emails/product-onboarding-tour.tsx";
|
|
306
|
+
readonly files: readonly ["emails/product-onboarding-tour.css", "emails/assets/product-onboarding-tour-feature-alerts.png", "emails/assets/product-onboarding-tour-feature-digest.png", "emails/assets/product-onboarding-tour-feature-questions.png", "emails/assets/product-onboarding-tour-read-alerts.png", "emails/assets/product-onboarding-tour-read-metrics.png", "emails/assets/product-onboarding-tour-wordmark.png"];
|
|
307
|
+
readonly provenance: {
|
|
308
|
+
readonly kind: "owned";
|
|
309
|
+
};
|
|
310
|
+
readonly category: "lifecycle";
|
|
311
|
+
readonly gallerySlug: "product-onboarding-tour";
|
|
312
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
313
|
+
}, {
|
|
314
|
+
readonly id: "product-updates-roundup";
|
|
315
|
+
readonly entryPath: "emails/product-updates-roundup.tsx";
|
|
316
|
+
readonly files: readonly ["emails/product-updates-roundup.css", "emails/assets/product-updates-roundup-access-matrix.png", "emails/assets/product-updates-roundup-import-pipeline.png", "emails/assets/product-updates-roundup-query-timeline.png", "emails/assets/product-updates-roundup-status-board.png", "emails/assets/product-updates-roundup-usage-chart.png", "emails/assets/product-updates-roundup-webhook-retry.png", "emails/assets/product-updates-roundup-wordmark.png"];
|
|
317
|
+
readonly provenance: {
|
|
318
|
+
readonly kind: "owned";
|
|
319
|
+
};
|
|
320
|
+
readonly category: "marketing";
|
|
321
|
+
readonly gallerySlug: "product-updates-roundup";
|
|
322
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
323
|
+
}, {
|
|
324
|
+
readonly id: "season-clearance-promo";
|
|
325
|
+
readonly entryPath: "emails/season-clearance-promo.tsx";
|
|
326
|
+
readonly files: readonly ["emails/season-clearance-promo.css", "emails/assets/season-clearance-promo-banner.png", "emails/assets/season-clearance-promo-cushions.png", "emails/assets/season-clearance-promo-planter.png", "emails/assets/season-clearance-promo-secondary.png", "emails/assets/season-clearance-promo-side-table.png", "emails/assets/season-clearance-promo-wall-clock.png", "emails/assets/season-clearance-promo-wordmark.png"];
|
|
327
|
+
readonly provenance: {
|
|
328
|
+
readonly kind: "owned";
|
|
329
|
+
};
|
|
330
|
+
readonly category: "marketing";
|
|
331
|
+
readonly gallerySlug: "season-clearance-promo";
|
|
332
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
333
|
+
}, {
|
|
334
|
+
readonly id: "seasonal-sale-flyer";
|
|
335
|
+
readonly entryPath: "emails/seasonal-sale-flyer.tsx";
|
|
336
|
+
readonly files: readonly ["emails/seasonal-sale-flyer.css", "emails/assets/seasonal-sale-flyer-bedding.png", "emails/assets/seasonal-sale-flyer-cookware.png", "emails/assets/seasonal-sale-flyer-hero.png", "emails/assets/seasonal-sale-flyer-lighting.png", "emails/assets/seasonal-sale-flyer-outdoor.png", "emails/assets/seasonal-sale-flyer-storage.png", "emails/assets/seasonal-sale-flyer-tableware.png", "emails/assets/seasonal-sale-flyer-wordmark.png"];
|
|
337
|
+
readonly provenance: {
|
|
338
|
+
readonly kind: "owned";
|
|
339
|
+
};
|
|
340
|
+
readonly category: "marketing";
|
|
341
|
+
readonly gallerySlug: "seasonal-sale-flyer";
|
|
342
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
343
|
+
}, {
|
|
344
|
+
readonly id: "setup-checklist";
|
|
345
|
+
readonly entryPath: "emails/setup-checklist.tsx";
|
|
346
|
+
readonly files: readonly ["emails/setup-checklist.css", "emails/assets/setup-checklist-step-invite.png", "emails/assets/setup-checklist-step-publish.png", "emails/assets/setup-checklist-step-source.png", "emails/assets/setup-checklist-wordmark.png"];
|
|
347
|
+
readonly provenance: {
|
|
348
|
+
readonly kind: "owned";
|
|
349
|
+
};
|
|
350
|
+
readonly category: "lifecycle";
|
|
351
|
+
readonly gallerySlug: "setup-checklist";
|
|
352
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
353
|
+
}, {
|
|
354
|
+
readonly id: "shipping-update";
|
|
355
|
+
readonly entryPath: "emails/shipping-update.tsx";
|
|
356
|
+
readonly files: readonly ["emails/shipping-update.css", "emails/assets/shipping-update-runner.png", "emails/assets/shipping-update-teapot.png", "emails/assets/shipping-update-tumblers.png", "emails/assets/shipping-update-wordmark.png"];
|
|
357
|
+
readonly provenance: {
|
|
358
|
+
readonly kind: "owned";
|
|
359
|
+
};
|
|
360
|
+
readonly category: "transactional";
|
|
361
|
+
readonly gallerySlug: "shipping-update";
|
|
362
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
363
|
+
}, {
|
|
364
|
+
readonly id: "team-invite";
|
|
365
|
+
readonly entryPath: "emails/team-invite.tsx";
|
|
366
|
+
readonly files: readonly ["emails/team-invite.css", "emails/assets/team-invite-inviter.png", "emails/assets/team-invite-teammate-one.png", "emails/assets/team-invite-teammate-three.png", "emails/assets/team-invite-teammate-two.png", "emails/assets/team-invite-wordmark.png"];
|
|
367
|
+
readonly provenance: {
|
|
368
|
+
readonly kind: "owned";
|
|
369
|
+
};
|
|
370
|
+
readonly category: "transactional";
|
|
371
|
+
readonly gallerySlug: "team-invite";
|
|
372
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
373
|
+
}, {
|
|
374
|
+
readonly id: "travel-rewards-promo";
|
|
375
|
+
readonly entryPath: "emails/travel-rewards-promo.tsx";
|
|
376
|
+
readonly files: readonly ["emails/travel-rewards-promo.css", "emails/assets/travel-rewards-promo-hero.png", "emails/assets/travel-rewards-promo-partner-dining.png", "emails/assets/travel-rewards-promo-partner-drives.png", "emails/assets/travel-rewards-promo-partner-lounges.png", "emails/assets/travel-rewards-promo-partner-stays.png", "emails/assets/travel-rewards-promo-wordmark.png"];
|
|
377
|
+
readonly provenance: {
|
|
378
|
+
readonly kind: "owned";
|
|
379
|
+
};
|
|
380
|
+
readonly category: "marketing";
|
|
381
|
+
readonly gallerySlug: "travel-rewards-promo";
|
|
382
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
383
|
+
}, {
|
|
384
|
+
readonly id: "trial-ending";
|
|
385
|
+
readonly entryPath: "emails/trial-ending.tsx";
|
|
386
|
+
readonly files: readonly ["emails/trial-ending.css", "emails/assets/trial-ending-countdown.png", "emails/assets/trial-ending-wordmark.png"];
|
|
387
|
+
readonly provenance: {
|
|
388
|
+
readonly kind: "owned";
|
|
389
|
+
};
|
|
390
|
+
readonly category: "lifecycle";
|
|
391
|
+
readonly gallerySlug: "trial-ending";
|
|
392
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
393
|
+
}, {
|
|
394
|
+
readonly id: "vercel-invitation";
|
|
395
|
+
readonly entryPath: "emails/vercel-invitation.tsx";
|
|
396
|
+
readonly files: readonly ["emails/vercel-invitation.css", "README.md", "emails/assets/vercel-arrow.png", "emails/assets/vercel-logo.png", "emails/assets/vercel-team.png", "emails/assets/vercel-user.png"];
|
|
397
|
+
readonly provenance: {
|
|
398
|
+
readonly kind: "brand-recreation";
|
|
399
|
+
readonly brand: "Vercel";
|
|
400
|
+
readonly subject: "team invitation";
|
|
401
|
+
readonly reviewedNote: "Reviewed recreation of Vercel's team invitation email, its canonical project assets, and its brand attribution.";
|
|
402
|
+
};
|
|
403
|
+
readonly category: "transactional";
|
|
404
|
+
readonly gallerySlug: "vercel-team-invitation";
|
|
405
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
406
|
+
}, {
|
|
407
|
+
readonly id: "weekly-deals-circular";
|
|
408
|
+
readonly entryPath: "emails/weekly-deals-circular.tsx";
|
|
409
|
+
readonly files: readonly ["emails/weekly-deals-circular.css", "emails/assets/weekly-deals-circular-banner.png", "emails/assets/weekly-deals-circular-basket.png", "emails/assets/weekly-deals-circular-board.png", "emails/assets/weekly-deals-circular-bowls.png", "emails/assets/weekly-deals-circular-duvet.png", "emails/assets/weekly-deals-circular-kettle.png", "emails/assets/weekly-deals-circular-rug.png", "emails/assets/weekly-deals-circular-wordmark.png"];
|
|
410
|
+
readonly provenance: {
|
|
411
|
+
readonly kind: "owned";
|
|
412
|
+
};
|
|
413
|
+
readonly category: "marketing";
|
|
414
|
+
readonly gallerySlug: "weekly-deals-circular";
|
|
415
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
416
|
+
}, {
|
|
417
|
+
readonly id: "welcome";
|
|
418
|
+
readonly entryPath: "emails/welcome.tsx";
|
|
419
|
+
readonly files: readonly ["emails/welcome.css", "emails/assets/welcome-hero.png", "emails/assets/welcome-wordmark.png"];
|
|
420
|
+
readonly provenance: {
|
|
421
|
+
readonly kind: "owned";
|
|
422
|
+
};
|
|
423
|
+
readonly category: "transactional";
|
|
424
|
+
readonly gallerySlug: "welcome-email";
|
|
425
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
426
|
+
}, {
|
|
427
|
+
readonly id: "win-back";
|
|
428
|
+
readonly entryPath: "emails/win-back.tsx";
|
|
429
|
+
readonly files: readonly ["emails/win-back.css", "emails/assets/win-back-update-alerts.png", "emails/assets/win-back-update-exports.png", "emails/assets/win-back-update-mobile.png", "emails/assets/win-back-update-speed.png", "emails/assets/win-back-update-workspaces.png", "emails/assets/win-back-wordmark.png"];
|
|
430
|
+
readonly provenance: {
|
|
431
|
+
readonly kind: "owned";
|
|
432
|
+
};
|
|
433
|
+
readonly category: "lifecycle";
|
|
434
|
+
readonly gallerySlug: "win-back";
|
|
435
|
+
readonly recordedAt: "2026-09-08T00:00:00.000Z";
|
|
436
|
+
}];
|
|
437
|
+
type ShowcaseProjectId = (typeof showcaseProjects)[number]["id"];
|
|
438
|
+
type BrandRecreationShowcaseId = Extract<(typeof showcaseProjects)[number], {
|
|
439
|
+
readonly provenance: {
|
|
440
|
+
readonly kind: "brand-recreation";
|
|
441
|
+
};
|
|
442
|
+
}>["id"];
|
|
443
|
+
type OwnedShowcaseId = Extract<(typeof showcaseProjects)[number], {
|
|
444
|
+
readonly provenance: {
|
|
445
|
+
readonly kind: "owned";
|
|
446
|
+
};
|
|
447
|
+
}>["id"];
|
|
448
|
+
declare const isShowcaseProjectId: (id: string) => id is ShowcaseProjectId;
|
|
449
|
+
declare const showcaseProject: (id: string) => ShowcaseProject | undefined;
|
|
450
|
+
/** Repository-relative path of a showcase project's TSX entry. */
|
|
451
|
+
declare const showcaseSourcePath: (project: ShowcaseProject) => string;
|
|
452
|
+
/** Every file the project bundles, entry first in sorted order — the shape codegen writes. */
|
|
453
|
+
declare const showcaseProjectPaths: (project: ShowcaseProject) => ReadonlyArray<string>;
|
|
454
|
+
//#endregion
|
|
455
|
+
export { ShowcaseProjectId as a, showcaseProject as c, showcaseSourcePath as d, ShowcaseProject as i, showcaseProjectPaths as l, OwnedShowcaseId as n, ShowcaseProvenance as o, SHOWCASE_ROOT as r, isShowcaseProjectId as s, BrandRecreationShowcaseId as t, showcaseProjects as u };
|
|
456
|
+
//# sourceMappingURL=showcase-C_xgl6hz.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samva/markup",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Type-safe authoring and compilation primitives for Samva templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -152,6 +152,10 @@
|
|
|
152
152
|
"types": "./dist/presets/public-preview-artifacts.d.ts",
|
|
153
153
|
"import": "./dist/presets/public-preview-artifacts.js"
|
|
154
154
|
},
|
|
155
|
+
"./presets/showcase": {
|
|
156
|
+
"types": "./dist/presets/showcase.d.ts",
|
|
157
|
+
"import": "./dist/presets/showcase.js"
|
|
158
|
+
},
|
|
155
159
|
"./presets/sources": {
|
|
156
160
|
"types": "./dist/presets/sources.d.ts",
|
|
157
161
|
"import": "./dist/presets/sources.js"
|