@clay-design-system/email 0.0.0-stage → 0.2.1
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/README.md +48 -2
- package/dist/build/asset-scoring.d.ts +48 -0
- package/dist/build/asset-scoring.d.ts.map +1 -0
- package/dist/build/asset-scoring.js +58 -0
- package/dist/build/asset-scoring.js.map +1 -0
- package/dist/build/braze-transform.d.ts +20 -0
- package/dist/build/braze-transform.d.ts.map +1 -0
- package/dist/build/braze-transform.js +26 -0
- package/dist/build/braze-transform.js.map +1 -0
- package/dist/build/catalog.d.ts +25 -0
- package/dist/build/catalog.d.ts.map +1 -0
- package/dist/build/catalog.js +3 -0
- package/dist/build/catalog.js.map +1 -0
- package/dist/build/cloudinary-env.d.ts +15 -0
- package/dist/build/cloudinary-env.d.ts.map +1 -0
- package/dist/build/cloudinary-env.js +36 -0
- package/dist/build/cloudinary-env.js.map +1 -0
- package/dist/build/cloudinary-manifest.d.ts +33 -0
- package/dist/build/cloudinary-manifest.d.ts.map +1 -0
- package/dist/build/cloudinary-manifest.js +36 -0
- package/dist/build/cloudinary-manifest.js.map +1 -0
- package/dist/build/compile.d.ts +11 -0
- package/dist/build/compile.d.ts.map +1 -0
- package/dist/build/compile.js +234 -0
- package/dist/build/compile.js.map +1 -0
- package/dist/build/email-config.d.ts +26 -0
- package/dist/build/email-config.d.ts.map +1 -0
- package/dist/build/email-config.js +17 -0
- package/dist/build/email-config.js.map +1 -0
- package/dist/build/email-list.d.ts +6 -0
- package/dist/build/email-list.d.ts.map +1 -0
- package/dist/build/email-list.js +17 -0
- package/dist/build/email-list.js.map +1 -0
- package/dist/build/email-tree.d.ts +23 -0
- package/dist/build/email-tree.d.ts.map +1 -0
- package/dist/build/email-tree.js +46 -0
- package/dist/build/email-tree.js.map +1 -0
- package/dist/build/export-braze.d.ts +22 -0
- package/dist/build/export-braze.d.ts.map +1 -0
- package/dist/build/export-braze.js +92 -0
- package/dist/build/export-braze.js.map +1 -0
- package/dist/build/generate-stock-library-map.d.ts +13 -0
- package/dist/build/generate-stock-library-map.d.ts.map +1 -0
- package/dist/build/generate-stock-library-map.js +202 -0
- package/dist/build/generate-stock-library-map.js.map +1 -0
- package/dist/build/icon-registry-map.d.ts +34 -0
- package/dist/build/icon-registry-map.d.ts.map +1 -0
- package/dist/build/icon-registry-map.js +44 -0
- package/dist/build/icon-registry-map.js.map +1 -0
- package/dist/build/import-examples.d.ts +14 -0
- package/dist/build/import-examples.d.ts.map +1 -0
- package/dist/build/import-examples.js +65 -0
- package/dist/build/import-examples.js.map +1 -0
- package/dist/build/persona-character-map.d.ts +32 -0
- package/dist/build/persona-character-map.d.ts.map +1 -0
- package/dist/build/persona-character-map.js +90 -0
- package/dist/build/persona-character-map.js.map +1 -0
- package/dist/build/stock-library-map.d.ts +57 -0
- package/dist/build/stock-library-map.d.ts.map +1 -0
- package/dist/build/stock-library-map.js +1261 -0
- package/dist/build/stock-library-map.js.map +1 -0
- package/dist/build/upload-assets.d.ts +20 -0
- package/dist/build/upload-assets.d.ts.map +1 -0
- package/dist/build/upload-assets.js +153 -0
- package/dist/build/upload-assets.js.map +1 -0
- package/dist/build/upload-library-assets.d.ts +21 -0
- package/dist/build/upload-library-assets.d.ts.map +1 -0
- package/dist/build/upload-library-assets.js +182 -0
- package/dist/build/upload-library-assets.js.map +1 -0
- package/dist/build/visual-resolver.d.ts +70 -0
- package/dist/build/visual-resolver.d.ts.map +1 -0
- package/dist/build/visual-resolver.js +375 -0
- package/dist/build/visual-resolver.js.map +1 -0
- package/dist/catalog.json +467 -0
- package/dist/emails/component-buttons-icons.html +435 -0
- package/dist/emails/component-buttons-integration.html +256 -0
- package/dist/emails/component-buttons-primary.html +269 -0
- package/dist/emails/component-buttons-secondary.html +255 -0
- package/dist/emails/component-buttons-two-integrations.html +310 -0
- package/dist/emails/component-images-card-280h.html +281 -0
- package/dist/emails/component-images-card-320h.html +281 -0
- package/dist/emails/component-images-card.html +281 -0
- package/dist/emails/component-images-full-bleed-280h.html +279 -0
- package/dist/emails/component-images-full-bleed-400h.html +279 -0
- package/dist/emails/component-images-full-bleed.html +279 -0
- package/dist/emails/component-text-h1.html +254 -0
- package/dist/emails/component-text-h2.html +230 -0
- package/dist/emails/component-text-h3.html +255 -0
- package/dist/emails/component-text-h4.html +255 -0
- package/dist/emails/component-text-h5.html +254 -0
- package/dist/emails/component-text-p2.html +253 -0
- package/dist/emails/component-text-p3.html +254 -0
- package/dist/emails/component-text-p4.html +254 -0
- package/dist/emails/container.html +250 -0
- package/dist/emails/section-changelog-icon-list.html +1201 -0
- package/dist/emails/section-divider-line.html +340 -0
- package/dist/emails/section-feature-highlight-reversed.html +377 -0
- package/dist/emails/section-feature-highlight.html +384 -0
- package/dist/emails/section-feature-rows.html +328 -0
- package/dist/emails/section-feature-story-row-reversed.html +381 -0
- package/dist/emails/section-feature-story-row.html +382 -0
- package/dist/emails/section-footer-lifecycle.html +650 -0
- package/dist/emails/section-footer-two-column-minimal.html +318 -0
- package/dist/emails/section-footer.html +413 -0
- package/dist/emails/section-header.html +290 -0
- package/dist/emails/section-hero.html +276 -0
- package/dist/emails/section-icon-feature-list.html +554 -0
- package/dist/emails/section-image-caption-block.html +313 -0
- package/dist/emails/section-image-hero.html +341 -0
- package/dist/emails/section-lesson-card.html +628 -0
- package/dist/emails/section-list-action-items.html +590 -0
- package/dist/emails/section-list-feature-items.html +713 -0
- package/dist/emails/section-list-icon-items.html +701 -0
- package/dist/emails/section-list-numbered-items.html +733 -0
- package/dist/emails/section-logo-header.html +288 -0
- package/dist/emails/section-newsletter-hero.html +393 -0
- package/dist/emails/section-product-ui-hero.html +496 -0
- package/dist/emails/section-promo-banner.html +308 -0
- package/dist/emails/section-qa-block.html +440 -0
- package/dist/emails/section-resource-link-list.html +481 -0
- package/dist/emails/section-signoff.html +279 -0
- package/dist/emails/section-single-column-author.html +453 -0
- package/dist/emails/section-single-column-feature-card.html +312 -0
- package/dist/emails/section-single-column-product-card.html +393 -0
- package/dist/emails/section-single-column-promo-card.html +306 -0
- package/dist/emails/section-spacer-fill.html +281 -0
- package/dist/emails/section-testimonial-dark-card.html +363 -0
- package/dist/emails/section-text-h1-regular.html +254 -0
- package/dist/emails/section-text-h2-regular.html +254 -0
- package/dist/emails/section-text-h3-regular.html +254 -0
- package/dist/emails/section-text-h4-regular.html +254 -0
- package/dist/emails/section-text-h5-regular.html +254 -0
- package/dist/emails/section-text-mixed-heading.html +269 -0
- package/dist/emails/section-text-overline-heading.html +281 -0
- package/dist/emails/section-text-p1-bold.html +254 -0
- package/dist/emails/section-text-p1-regular.html +255 -0
- package/dist/emails/section-text-paragraph.html +358 -0
- package/dist/emails/section-text-quote-card.html +269 -0
- package/dist/emails/section-text-quote.html +313 -0
- package/dist/emails/section-text-small-headline.html +279 -0
- package/dist/emails/section-three-column-content-cards.html +499 -0
- package/dist/emails/section-three-column-icon-cards.html +510 -0
- package/dist/emails/section-three-column-image-grid.html +466 -0
- package/dist/emails/section-three-up-icon-benefits.html +464 -0
- package/dist/emails/section-two-column-feature-cards.html +708 -0
- package/dist/emails/section-two-column-grid.html +1131 -0
- package/dist/emails/section-two-column-img-text.html +331 -0
- package/dist/emails/section-two-column-live-tags.html +367 -0
- package/dist/emails/section-two-column-stacked.html +629 -0
- package/dist/emails/section-upsell-cta.html +597 -0
- package/dist/emails/section-value-bullet-list.html +313 -0
- package/dist/examples/manifest.d.ts +21 -0
- package/dist/examples/manifest.d.ts.map +1 -0
- package/dist/examples/manifest.js +84 -0
- package/dist/examples/manifest.js.map +1 -0
- package/dist/exports/contact-sales/Images/Contact_sales_Image_16f4175c-d08c-43f6-9d4c-a0606383271d.png +0 -0
- package/dist/exports/contact-sales/Images/Contact_sales_Image_659b3091-1da9-40c2-86b0-04250982e529.png +0 -0
- package/dist/exports/contact-sales/Images/Contact_sales_Image_79c651f4-5f0f-4a7f-8354-1f6f95ae86d9.png +0 -0
- package/dist/exports/contact-sales/index.braze.html +837 -0
- package/dist/exports/contact-sales/index.html +837 -0
- package/dist/exports/event-confirmation/Images/Confirmation_Image_11938de2-4161-4ae8-8969-90ea0d8b45cb.png +0 -0
- package/dist/exports/event-confirmation/Images/Confirmation_Image_3c52e81f-5d4f-452c-bad1-0471a27598f1.png +0 -0
- package/dist/exports/event-confirmation/Images/Confirmation_Image_3ec1fec8-bf46-4068-8835-633567a715f9.png +0 -0
- package/dist/exports/event-confirmation/Images/Confirmation_Image_c4980c01-c270-4384-a56c-0bae74814cf9.png +0 -0
- package/dist/exports/event-confirmation/Images/Confirmation_Image_cde93e8c-0f96-434d-acaf-1b86503c66f0.png +0 -0
- package/dist/exports/event-confirmation/index.braze.html +1055 -0
- package/dist/exports/event-confirmation/index.html +1055 -0
- package/dist/exports/legal-update/Images/v2_Image_07bbcc13-0ab8-46e4-ab94-98f215f85f69.png +0 -0
- package/dist/exports/legal-update/Images/v2_Image_34394d50-acdf-4375-b254-eef1f84aaacb.png +0 -0
- package/dist/exports/legal-update/Images/v2_Image_4a25f2bd-6270-439b-86c5-4a968a1b104f.png +0 -0
- package/dist/exports/legal-update/Images/v2_Image_7e8e814f-3112-4d8c-af5b-4f4616d84d9c.png +0 -0
- package/dist/exports/legal-update/Images/v2_Image_b24a04c8-4af0-42a1-be0f-cd3f66595e47.png +0 -0
- package/dist/exports/legal-update/Images/v2_Image_b709b9fb-836e-4c20-82e5-a9cb9d702392.png +0 -0
- package/dist/exports/legal-update/Images/v2_Image_ed7b924b-35e6-4536-be0c-92ddc8a34fc2.png +0 -0
- package/dist/exports/legal-update/index.braze.html +1731 -0
- package/dist/exports/legal-update/index.html +1731 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_09be22f6-1f30-4c58-bf33-1df0494b8fc2.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_2dfb595e-6fe2-4e6e-a73a-942a085b38ab.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_544c971b-b4b5-4c89-a25a-8f0d92644009.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_5b6a9576-1c33-40c5-81e3-637514fb6c78.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_680c6193-793a-4a24-8288-4bb4046f4f5e.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_75818ba9-026a-45d7-91e4-f992d4ee7690.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_785f18e6-816d-44d1-8efb-ecc82510b540.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_8bf9141d-9d63-4601-9e81-5c9d726e17f8.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_9097d6e0-65d0-4237-9661-963751812786.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_a4ef2f53-2eaf-438a-bfef-61455ac0915e.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_b7748f87-a7b7-4a91-981a-16567683e4b4.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_bc9830a4-2911-4768-808a-32cbbc39215e.png +0 -0
- package/dist/exports/newsletter/Images/Status_update_-_July_26_Image_ef0e8e92-9075-43a9-991f-09a77ef6d6d4.png +0 -0
- package/dist/exports/newsletter/index.braze.html +125 -0
- package/dist/exports/newsletter/index.html +125 -0
- package/dist/exports/newsletter-ai-june-july/Images/newsletter-ai-blocks.png +0 -0
- package/dist/exports/newsletter-ai-june-july/Images/newsletter-ai-hero-mcp.png +0 -0
- package/dist/exports/newsletter-ai-june-july/Images/newsletter-ai-magic.png +0 -0
- package/dist/exports/newsletter-ai-june-july/Images/newsletter-ai-mcp.png +0 -0
- package/dist/exports/newsletter-ai-june-july/Images/newsletter-ai-portfolio.png +0 -0
- package/dist/exports/newsletter-ai-june-july/index.braze.html +1640 -0
- package/dist/exports/newsletter-ai-june-july/index.html +1640 -0
- package/dist/exports/survey/Images/EmailLove_Image_3b6f4a6f-7f5f-418b-be71-9371b25c20ce.png +0 -0
- package/dist/exports/survey/Images/EmailLove_Image_f659c728-2401-485d-8d90-98c962d28c0c.png +0 -0
- package/dist/exports/survey/index.braze.html +515 -0
- package/dist/exports/survey/index.html +515 -0
- package/dist/exports/trial-01-welcome/Images/tp1_-_welcome_Before_115ccc58-a47f-4eca-a1f2-c0d86e1e1cf4.png +0 -0
- package/dist/exports/trial-01-welcome/Images/tp1_-_welcome_Before_aec4d0d3-6057-4b8a-8d8f-46fbd024f182.png +0 -0
- package/dist/exports/trial-01-welcome/Images/tp1_-_welcome_Before_d139966a-6051-4383-bf8f-1e5138e1b030.png +0 -0
- package/dist/exports/trial-01-welcome/Images/tp1_-_welcome_Image_080fa361-a3f2-4593-9ac0-03cf3a7972ff.png +0 -0
- package/dist/exports/trial-01-welcome/Images/tp1_-_welcome_Image_5ebade34-8f1d-4c2c-9d27-5f9e843ce502.png +0 -0
- package/dist/exports/trial-01-welcome/Images/tp1_-_welcome_Image_aa5e4144-9ec8-4525-b01e-077d72f0bab6.png +0 -0
- package/dist/exports/trial-01-welcome/index.braze.html +941 -0
- package/dist/exports/trial-01-welcome/index.html +941 -0
- package/dist/exports/trial-02/Images/tp2_Image_5b0d9bc4-2e38-4252-8f20-d9f27d471c21.png +0 -0
- package/dist/exports/trial-02/Images/tp2_Image_b3f77c7c-cc8e-4db8-a5d9-072f4f621e72.png +0 -0
- package/dist/exports/trial-02/Images/tp2_Image_cafd1a17-1915-47cd-80f2-1c2d0b133cfe.png +0 -0
- package/dist/exports/trial-02/index.braze.html +923 -0
- package/dist/exports/trial-02/index.html +923 -0
- package/dist/exports/trial-03/Images/tp3_Image_1b96630c-fc4d-4aec-91fb-3c1d4d8544b3.png +0 -0
- package/dist/exports/trial-03/Images/tp3_Image_58f3a342-2193-4b5c-b30a-96f7f3338dd8.png +0 -0
- package/dist/exports/trial-03/Images/tp3_Image_6c4f307a-bac2-40e7-b4f1-9aa623c9eb8e.png +0 -0
- package/dist/exports/trial-03/Images/tp3_Image_848917ce-3f89-4538-a826-558b21f5fea7.png +0 -0
- package/dist/exports/trial-03/Images/tp3_Image_aae8410f-556f-4fb9-88f9-f276d75bafd2.png +0 -0
- package/dist/exports/trial-03/Images/tp3_Image_b4d5be39-509e-4f22-9601-dd070e4c6561.png +0 -0
- package/dist/exports/trial-03/index.braze.html +1129 -0
- package/dist/exports/trial-03/index.html +1129 -0
- package/dist/exports/trial-04/Images/tp4_Image_03bd5a56-25e3-4dcc-bef5-143bf12312d5.png +0 -0
- package/dist/exports/trial-04/Images/tp4_Image_0facbfca-b735-4199-a0d9-05a59341a1e3.gif +0 -0
- package/dist/exports/trial-04/Images/tp4_Image_171cee5f-cd3d-42f0-a180-995893d3742a.png +0 -0
- package/dist/exports/trial-04/Images/tp4_Image_3509d89d-1825-4817-8c1e-130fa294d0e1.png +0 -0
- package/dist/exports/trial-04/Images/tp4_Image_763a0f40-2985-4140-859b-ddd34f20a520.png +0 -0
- package/dist/exports/trial-04/Images/tp4_Image_cc2db4f5-b41d-45d7-a798-7a79e7b8d4d8.png +0 -0
- package/dist/exports/trial-04/index.braze.html +885 -0
- package/dist/exports/trial-04/index.html +885 -0
- package/dist/exports/trial-05/Images/tp5_Image_0248a517-5c60-4e84-ad1c-449dcf4f6a64.png +0 -0
- package/dist/exports/trial-05/Images/tp5_Image_4c1a2d5a-47d3-4801-bb3a-01c22decc108.png +0 -0
- package/dist/exports/trial-05/Images/tp5_Image_63ae77e7-cec7-4b4a-91e0-603b5a80929f.png +0 -0
- package/dist/exports/trial-05/Images/tp5_Image_7aa43530-6707-4308-ab0e-e4c38fc1b77d.png +0 -0
- package/dist/exports/trial-05/Images/tp5_Image_7efe5b6d-b360-4179-bee1-72908ba569bc.png +0 -0
- package/dist/exports/trial-05/Images/tp5_Image_b142bd84-c40a-4a29-b9d5-715b52fdd937.png +0 -0
- package/dist/exports/trial-05/Images/tp5_Image_c0c896ea-5b68-4f58-9e27-cdb4a1f1b438.png +0 -0
- package/dist/exports/trial-05/index.braze.html +1023 -0
- package/dist/exports/trial-05/index.html +1023 -0
- package/dist/exports/trial-06/Images/tp6_Image_2267a268-8a80-4e0d-8813-d4c75dbab6f2.png +0 -0
- package/dist/exports/trial-06/Images/tp6_Image_637a97b7-837e-478d-8ed1-6e8c2739fdc7.png +0 -0
- package/dist/exports/trial-06/Images/tp6_Image_a78df270-ad6f-41e6-8822-ba8ec38313a3.png +0 -0
- package/dist/exports/trial-06/index.braze.html +773 -0
- package/dist/exports/trial-06/index.html +773 -0
- package/dist/exports/winback/Images/_managers_Image_4587ac22-460c-487a-bc37-9dbc487e95a4.png +0 -0
- package/dist/exports/winback/Images/_managers_Image_8a77ec2c-ed49-480d-a1a1-7a38abad232a.png +0 -0
- package/dist/exports/winback/Images/_managers_Image_bb643775-8a2f-4e28-9dfb-6d1838c3561f.png +0 -0
- package/dist/exports/winback/Images/_managers_Image_f7d1bca5-0fcb-4d4c-abcd-40ce2d453b07.png +0 -0
- package/dist/exports/winback/index.braze.html +605 -0
- package/dist/exports/winback/index.html +605 -0
- package/dist/generated/email-tokens.d.ts +101 -0
- package/dist/generated/email-tokens.d.ts.map +1 -0
- package/dist/generated/email-tokens.js +104 -0
- package/dist/generated/email-tokens.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/tokens/build-email-assets.d.ts +19 -0
- package/dist/tokens/build-email-assets.d.ts.map +1 -0
- package/dist/tokens/build-email-assets.js +186 -0
- package/dist/tokens/build-email-assets.js.map +1 -0
- package/dist/tokens/build-email-tokens.d.ts +17 -0
- package/dist/tokens/build-email-tokens.d.ts.map +1 -0
- package/dist/tokens/build-email-tokens.js +229 -0
- package/dist/tokens/build-email-tokens.js.map +1 -0
- package/package.json +41 -3
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token → email bridge.
|
|
3
|
+
*
|
|
4
|
+
* Emails cannot use CSS custom properties (`var(--clay-*)`) — Outlook and others strip them. So this
|
|
5
|
+
* script reads the RESOLVED LITERAL token values from `@clay-design-system/tokens` (the dist/tokens.js ES export)
|
|
6
|
+
* and materializes them into two generated artifacts consumed by the MJML sections:
|
|
7
|
+
*
|
|
8
|
+
* src/generated/base-head.mjml — <mj-head> fragment: fonts, mj-class roles, dark-mode <mj-style>
|
|
9
|
+
* src/generated/email-tokens.ts — inline-able constants + px() helper for section authoring/docs
|
|
10
|
+
*
|
|
11
|
+
* Both are GENERATED — never edit by hand. `pnpm --filter @clay-design-system/email tokens:check` regenerates
|
|
12
|
+
* and fails on drift (mirrors the repo-wide `docs:check` guard).
|
|
13
|
+
*
|
|
14
|
+
* Run as the first step of the package build (before compile.ts).
|
|
15
|
+
*/
|
|
16
|
+
import { writeFileSync, mkdirSync } from 'node:fs';
|
|
17
|
+
import { resolve, dirname } from 'node:path';
|
|
18
|
+
import { fileURLToPath } from 'node:url';
|
|
19
|
+
import * as tokens from '@clay-design-system/tokens';
|
|
20
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
21
|
+
const generatedDir = resolve(__dirname, '..', 'generated');
|
|
22
|
+
mkdirSync(generatedDir, { recursive: true });
|
|
23
|
+
/** Unitless number token → px string. Line-heights/weights stay unitless (valid + preferred in email). */
|
|
24
|
+
const px = (n) => `${n}px`;
|
|
25
|
+
// ── Resolved literals from the foundation (single source of truth) ──────────────────────────────
|
|
26
|
+
const color = {
|
|
27
|
+
page: tokens.ClayColorBackgroundDefaultSecondary, // #f3f4f5
|
|
28
|
+
surface: tokens.ClayColorBackgroundDefaultDefault, // #ffffff
|
|
29
|
+
text: tokens.ClayColorTextDefaultDefault, // #252526
|
|
30
|
+
textMuted: tokens.ClayColorTextDefaultSecondary, // #45454a (grey-700)
|
|
31
|
+
brand: tokens.ClayColorBackgroundBrandDefault, // #6161ff
|
|
32
|
+
brandLink: tokens.ClayColorTextBrandDefault, // #6161ff
|
|
33
|
+
onBrand: tokens.ClayColorTextOnDark, // #ffffff
|
|
34
|
+
// Stone / warm-beige palette (quote cards, warm editorial surfaces)
|
|
35
|
+
surfaceWarm: tokens.ClayColorStone100, // #f7f3ea
|
|
36
|
+
surfaceWarmBorder: tokens.ClayColorStone200, // #f2e7d6
|
|
37
|
+
// dark-mode surfaces (from the grey ramp)
|
|
38
|
+
pageDark: tokens.ClayFoundationBrandColorGrey950, // #000000
|
|
39
|
+
surfaceDark: tokens.ClayFoundationBrandColorGrey800, // #252526
|
|
40
|
+
textDark: tokens.ClayColorTextOnDark, // #ffffff
|
|
41
|
+
};
|
|
42
|
+
// Lifecycle email type scale — matches Life cycle DS Figma (Heading 1-5, Paragraph 1-4).
|
|
43
|
+
// All entries carry an explicit `weight` so email-tokens.ts is self-documenting without inference.
|
|
44
|
+
const type = {
|
|
45
|
+
family: tokens.ClayEmailTypeFamily,
|
|
46
|
+
weightRegular: tokens.ClayEmailTypeWeightRegular,
|
|
47
|
+
weightSemi: tokens.ClayEmailTypeWeightSemi,
|
|
48
|
+
// Headings h1–h4 shrink on mobile (emaillove @media step-down); h5 and below do not.
|
|
49
|
+
h1: { size: px(tokens.ClayEmailTypeH1Size), sizeMobile: px(tokens.ClayEmailTypeH1SizeMobile), weight: tokens.ClayEmailTypeWeightSemi, lineHeight: tokens.ClayEmailTypeH1LineHeight, letterSpacing: px(tokens.ClayEmailTypeH1LetterSpacing) },
|
|
50
|
+
h2: { size: px(tokens.ClayEmailTypeH2Size), sizeMobile: px(tokens.ClayEmailTypeH2SizeMobile), weight: tokens.ClayEmailTypeWeightSemi, lineHeight: tokens.ClayEmailTypeH2LineHeight, letterSpacing: px(tokens.ClayEmailTypeH2LetterSpacing) },
|
|
51
|
+
h3: { size: px(tokens.ClayEmailTypeH3Size), sizeMobile: px(tokens.ClayEmailTypeH3SizeMobile), weight: tokens.ClayEmailTypeWeightSemi, lineHeight: tokens.ClayEmailTypeH3LineHeight, letterSpacing: px(tokens.ClayEmailTypeH3LetterSpacing) },
|
|
52
|
+
h4: { size: px(tokens.ClayEmailTypeH4Size), sizeMobile: px(tokens.ClayEmailTypeH4SizeMobile), weight: tokens.ClayEmailTypeWeightSemi, lineHeight: tokens.ClayEmailTypeH4LineHeight },
|
|
53
|
+
h5: { size: px(tokens.ClayEmailTypeH5Size), sizeMobile: px(tokens.ClayEmailTypeH5SizeMobile), weight: tokens.ClayEmailTypeWeightSemi, lineHeight: tokens.ClayEmailTypeH5LineHeight },
|
|
54
|
+
p1: { size: px(tokens.ClayEmailTypeP1Size), sizeMobile: px(tokens.ClayEmailTypeP1SizeMobile), weight: tokens.ClayEmailTypeWeightRegular, lineHeight: tokens.ClayEmailTypeP1LineHeight },
|
|
55
|
+
p2: { size: px(tokens.ClayEmailTypeP2Size), sizeMobile: px(tokens.ClayEmailTypeP2SizeMobile), weight: tokens.ClayEmailTypeWeightRegular, lineHeight: tokens.ClayEmailTypeP2LineHeight },
|
|
56
|
+
p3: { size: px(tokens.ClayEmailTypeP3Size), sizeMobile: px(tokens.ClayEmailTypeP3SizeMobile), weight: tokens.ClayEmailTypeWeightRegular, lineHeight: tokens.ClayEmailTypeP3LineHeight },
|
|
57
|
+
p4: { size: px(tokens.ClayEmailTypeP4Size), sizeMobile: px(tokens.ClayEmailTypeP4SizeMobile), weight: tokens.ClayEmailTypeWeightRegular, lineHeight: tokens.ClayEmailTypeP4LineHeight },
|
|
58
|
+
button: { size: px(tokens.ClayEmailTypeButtonSize), weight: tokens.ClayEmailTypeButtonWeight, lineHeight: tokens.ClayEmailTypeButtonLineHeight },
|
|
59
|
+
};
|
|
60
|
+
const layout = {
|
|
61
|
+
canvasWidth: 640,
|
|
62
|
+
contentWidth: 560,
|
|
63
|
+
hPadding: px(tokens.ClaySizeSpace1000), // 40px
|
|
64
|
+
sectionY: px(tokens.ClaySizeSpace600), // 24px
|
|
65
|
+
gapMd: px(tokens.ClaySizeSpace400), // 16px
|
|
66
|
+
gapLg: px(tokens.ClaySizeSpace800), // 32px
|
|
67
|
+
cardRadius: px(tokens.ClayRadiusLg), // 16px
|
|
68
|
+
pillRadius: px(tokens.ClayRadiusFull), // 9999px
|
|
69
|
+
iconSize: px(tokens.ClaySizeSpace600), // 24px
|
|
70
|
+
};
|
|
71
|
+
// Effects (shadows) — from the foundation effect tokens. Emails are mostly flat; exposed for cards
|
|
72
|
+
// that need elevation. Values are already email-safe CSS box-shadow strings.
|
|
73
|
+
const effect = {
|
|
74
|
+
shadowLight: tokens.ClayEffectShadowLight,
|
|
75
|
+
shadowHard: tokens.ClayEffectShadowHard,
|
|
76
|
+
};
|
|
77
|
+
// The email fallback stack Poppins → system — email clients frequently lack the webfont.
|
|
78
|
+
const fontStack = `Poppins, 'Helvetica Neue', Helvetica, Arial, sans-serif`;
|
|
79
|
+
const BANNER = 'GENERATED by src/tokens/build-email-tokens.ts — do not edit. Run `pnpm --filter @clay-design-system/email tokens:check`.';
|
|
80
|
+
// ── 1. base-head.mjml — an <mj-head> FRAGMENT (included inside the container's <mj-head>) ─────────
|
|
81
|
+
const baseHead = `<!-- ${BANNER} -->
|
|
82
|
+
<mj-raw>
|
|
83
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
84
|
+
<meta name="x-apple-disable-message-reformatting" />
|
|
85
|
+
<meta name="color-scheme" content="light dark" />
|
|
86
|
+
<meta name="supported-color-schemes" content="light dark" />
|
|
87
|
+
</mj-raw>
|
|
88
|
+
<mj-font name="Poppins" href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" />
|
|
89
|
+
|
|
90
|
+
<mj-attributes>
|
|
91
|
+
<mj-all font-family="${fontStack}" />
|
|
92
|
+
<mj-text color="${color.text}" font-size="${type.p1.size}" line-height="${type.p1.lineHeight}" padding="0" />
|
|
93
|
+
<!-- Lifecycle heading scale (semi-bold default; override font-weight inline for regular variant) -->
|
|
94
|
+
<mj-class name="clay-h1" color="${color.text}" font-size="${type.h1.size}" font-weight="${type.weightSemi}" line-height="${type.h1.lineHeight}" letter-spacing="${type.h1.letterSpacing}" />
|
|
95
|
+
<mj-class name="clay-h2" color="${color.text}" font-size="${type.h2.size}" font-weight="${type.weightSemi}" line-height="${type.h2.lineHeight}" letter-spacing="${type.h2.letterSpacing}" />
|
|
96
|
+
<mj-class name="clay-h3" color="${color.text}" font-size="${type.h3.size}" font-weight="${type.weightSemi}" line-height="${type.h3.lineHeight}" letter-spacing="${type.h3.letterSpacing}" />
|
|
97
|
+
<mj-class name="clay-h4" color="${color.text}" font-size="${type.h4.size}" font-weight="${type.weightSemi}" line-height="${type.h4.lineHeight}" />
|
|
98
|
+
<mj-class name="clay-h5" color="${color.text}" font-size="${type.h5.size}" font-weight="${type.weightSemi}" line-height="${type.h5.lineHeight}" />
|
|
99
|
+
<!-- Lifecycle paragraph scale (regular-weight default) -->
|
|
100
|
+
<mj-class name="clay-p1" color="${color.text}" font-size="${type.p1.size}" font-weight="${type.weightRegular}" line-height="${type.p1.lineHeight}" />
|
|
101
|
+
<mj-class name="clay-p2" color="${color.text}" font-size="${type.p2.size}" font-weight="${type.weightRegular}" line-height="${type.p2.lineHeight}" />
|
|
102
|
+
<mj-class name="clay-p3" color="${color.textMuted}" font-size="${type.p3.size}" font-weight="${type.weightRegular}" line-height="${type.p3.lineHeight}" />
|
|
103
|
+
<mj-class name="clay-p4" color="${color.textMuted}" font-size="${type.p4.size}" font-weight="${type.weightRegular}" line-height="${type.p4.lineHeight}" />
|
|
104
|
+
<mj-class name="clay-button" background-color="${color.brand}" color="${color.onBrand}" border-radius="${layout.pillRadius}" font-size="${type.button.size}" font-weight="${type.button.weight}" inner-padding="12px 24px" />
|
|
105
|
+
</mj-attributes>
|
|
106
|
+
|
|
107
|
+
<mj-style>
|
|
108
|
+
/* Client resets emaillove ships that MJML omits (Outlook.com line-height, image gaps). */
|
|
109
|
+
img { display: block; }
|
|
110
|
+
.ExternalClass { width: 100%; }
|
|
111
|
+
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }
|
|
112
|
+
/* Dark-only images hidden in light mode; swapped in the dark block below. */
|
|
113
|
+
.dl { display: none; }
|
|
114
|
+
|
|
115
|
+
/* Mobile heading step-down — one-notch scale at the DS phone-only breakpoint
|
|
116
|
+
@media(max-width:479px) (h1 56→48, h2 48→40, h3 40→32, h4 32→24). Keyed off the clay-h*
|
|
117
|
+
css-class on the mj-text td; targets the inner div where MJML places font-size. Desktop
|
|
118
|
+
size is the inline fallback if style is dropped. Per production emails, only the primary/
|
|
119
|
+
hero heading opts in — add css-class="clay-hN" (alongside mj-class) to the hero heading's
|
|
120
|
+
mj-text; secondary content headings keep mj-class alone and stay at desktop size. */
|
|
121
|
+
@media only screen and (max-width: 479px) {
|
|
122
|
+
.clay-h1 > div { font-size: ${type.h1.sizeMobile} !important; }
|
|
123
|
+
.clay-h2 > div { font-size: ${type.h2.sizeMobile} !important; }
|
|
124
|
+
.clay-h3 > div { font-size: ${type.h3.sizeMobile} !important; }
|
|
125
|
+
.clay-h4 > div { font-size: ${type.h4.sizeMobile} !important; }
|
|
126
|
+
|
|
127
|
+
/* Mobile H-padding utilities — apply as css-class on mj-wrapper or mj-section to reduce
|
|
128
|
+
the 40px horizontal padding to the source breakpoint value when columns stack (below 480px).
|
|
129
|
+
Source: emaillove export mobile CSS (.b98-68 → 24px, .d9b-0c → 16px, .fb5-e8 → 24px).
|
|
130
|
+
Targets the outer td MJML generates with inline padding-left/padding-right. */
|
|
131
|
+
.email-mobile-px-24 > table > tbody > tr > td { padding-right: 24px !important; padding-left: 24px !important; }
|
|
132
|
+
.email-mobile-px-16 > table > tbody > tr > td { padding-right: 16px !important; padding-left: 16px !important; }
|
|
133
|
+
.email-mobile-px-0 > table > tbody > tr > td { padding-right: 0 !important; padding-left: 0 !important; }
|
|
134
|
+
.email-mobile-pt-0 > table > tbody > tr > td { padding-top: 0 !important; }
|
|
135
|
+
|
|
136
|
+
/* Mobile text centering — apply as css-class on mj-text elements whose content should be
|
|
137
|
+
center-aligned on mobile (below 480px). Matches the source emaillove .s0>div{text-align:center}.
|
|
138
|
+
Targets the inner div MJML wraps text content in. */
|
|
139
|
+
.email-mobile-center > div { text-align: center !important; }
|
|
140
|
+
|
|
141
|
+
/* Mobile image centering — apply css-class="email-mobile-center-img" on mj-image.
|
|
142
|
+
text-align on the td does not reposition its block-level child table (CSS text-align
|
|
143
|
+
only affects inline content), so the nested image-wrapper table also needs margin:auto
|
|
144
|
+
to actually override the mj-image align="left"/"right" attribute on mobile. */
|
|
145
|
+
.email-mobile-center-img { text-align: center !important; }
|
|
146
|
+
.email-mobile-center-img > table { margin: 0 auto !important; }
|
|
147
|
+
|
|
148
|
+
/* Full-width button on mobile — apply css-class="email-btn-full" to mj-button.
|
|
149
|
+
Makes the button's inner table fill the column width and centers it.
|
|
150
|
+
Matches emaillove .mj-b-full pattern. */
|
|
151
|
+
.email-btn-full > table { width: 100% !important; }
|
|
152
|
+
.email-btn-full > table > tbody > tr > td { text-align: center !important; }
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Left-aligned button content — apply css-class="email-btn-left" to mj-button.
|
|
156
|
+
Overrides MJML's default text-align:center on the inner td and anchor so
|
|
157
|
+
icon+text rows (e.g. buttons-icons) are left-aligned like the emaillove source. */
|
|
158
|
+
.email-btn-left > table > tbody > tr > td { text-align: left !important; }
|
|
159
|
+
.email-btn-left > table > tbody > tr > td > a { text-align: left !important; }
|
|
160
|
+
|
|
161
|
+
/* Decorative image tilt — apply css-class="email-tilt-1".."email-tilt-4" to mj-image for a
|
|
162
|
+
fanned photo-stack look (e.g. an avatar composite row). Webkit/Blink clients rotate the
|
|
163
|
+
image; Outlook and other non-supporting clients silently ignore the transform and show the
|
|
164
|
+
image unrotated — safe graceful degradation, never a broken layout. */
|
|
165
|
+
.email-tilt-1 { transform: rotate(-6deg); }
|
|
166
|
+
.email-tilt-2 { transform: rotate(4deg); }
|
|
167
|
+
.email-tilt-3 { transform: rotate(-4deg); }
|
|
168
|
+
.email-tilt-4 { transform: rotate(6deg); }
|
|
169
|
+
|
|
170
|
+
:root { color-scheme: light dark; supported-color-schemes: light dark; }
|
|
171
|
+
@media (prefers-color-scheme: dark) {
|
|
172
|
+
body, .email-page { background-color: ${color.pageDark} !important; }
|
|
173
|
+
/*
|
|
174
|
+
* email-card: flip a section or column's background to dark.
|
|
175
|
+
*
|
|
176
|
+
* Three selectors cover every compiled MJML structure:
|
|
177
|
+
* 1. .email-card — the outer div (mj-section or mj-column)
|
|
178
|
+
* 2. .email-card > table — the direct child table (mj-section has inline bg here)
|
|
179
|
+
* 3. .email-card > table > tbody > tr > td
|
|
180
|
+
* — the content td inside mj-column (carries inline bg-color
|
|
181
|
+
* + border-radius when background-color is set on mj-column)
|
|
182
|
+
*
|
|
183
|
+
* Apply css-class="email-card" to any mj-section or mj-column that should
|
|
184
|
+
* become dark. Works for grey inner cards (#f3f4f5), coloured panels, etc.
|
|
185
|
+
*/
|
|
186
|
+
.email-card,
|
|
187
|
+
.email-card > table,
|
|
188
|
+
.email-card > table > tbody > tr > td { background-color: ${color.surfaceDark} !important; }
|
|
189
|
+
.email-text, .email-text * { color: ${color.textDark} !important; }
|
|
190
|
+
.ll { display: none !important; }
|
|
191
|
+
.dl { display: block !important; }
|
|
192
|
+
/* Black CTA button invert — apply css-class="email-btn-invert-dark" to invert a black
|
|
193
|
+
mj-button to white background + black text in dark mode. Matches emaillove global
|
|
194
|
+
.mj-b>td { background-color:#ffffff } pattern for black CTA buttons. */
|
|
195
|
+
.email-btn-invert-dark > table > tbody > tr > td { background-color: #ffffff !important; }
|
|
196
|
+
.email-btn-invert-dark > table > tbody > tr > td > a { background-color: #ffffff !important; color: #000000 !important; }
|
|
197
|
+
}
|
|
198
|
+
/* Outlook.com + Gmail-app dark mode — these clients ignore prefers-color-scheme and instead
|
|
199
|
+
prefix overridden nodes with data-ogsc (foreground) / data-ogsb (background). */
|
|
200
|
+
[data-ogsb] body, [data-ogsb] .email-page { background-color: ${color.pageDark} !important; }
|
|
201
|
+
[data-ogsb] .email-card,
|
|
202
|
+
[data-ogsb] .email-card > table,
|
|
203
|
+
[data-ogsb] .email-card > table > tbody > tr > td { background-color: ${color.surfaceDark} !important; }
|
|
204
|
+
[data-ogsc] .email-text, [data-ogsc] .email-text * { color: ${color.textDark} !important; }
|
|
205
|
+
</mj-style>
|
|
206
|
+
`;
|
|
207
|
+
writeFileSync(resolve(generatedDir, 'base-head.mjml'), baseHead);
|
|
208
|
+
// ── 2. email-tokens.ts — inline-able constants for section authoring + docs ──────────────────────
|
|
209
|
+
const emailTokensTs = `// ${BANNER}
|
|
210
|
+
// Inline-able literal token values for MJML email authoring. Emails cannot use var(--clay-*),
|
|
211
|
+
// so sections copy these literals. Roles that mj-class carries (clay-h1…h5, clay-p1…p4, clay-button) live in base-head.mjml.
|
|
212
|
+
|
|
213
|
+
/** Unitless size/spacing token → px string. */
|
|
214
|
+
export const px = (n: number): string => \`\${n}px\`
|
|
215
|
+
|
|
216
|
+
export const emailColor = ${JSON.stringify(color, null, 2)} as const
|
|
217
|
+
|
|
218
|
+
export const emailType = ${JSON.stringify(type, null, 2)} as const
|
|
219
|
+
|
|
220
|
+
export const emailLayout = ${JSON.stringify(layout, null, 2)} as const
|
|
221
|
+
|
|
222
|
+
export const emailEffect = ${JSON.stringify(effect, null, 2)} as const
|
|
223
|
+
|
|
224
|
+
/** Poppins → system fallback stack (email webfonts are unreliable). */
|
|
225
|
+
export const emailFontStack = ${JSON.stringify(fontStack)}
|
|
226
|
+
`;
|
|
227
|
+
writeFileSync(resolve(generatedDir, 'email-tokens.ts'), emailTokensTs);
|
|
228
|
+
console.log('@clay-design-system/email: token bridge generated (base-head.mjml + email-tokens.ts)');
|
|
229
|
+
//# sourceMappingURL=build-email-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-email-tokens.js","sourceRoot":"","sources":["../../src/tokens/build-email-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,M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./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"./catalog.json": "./dist/catalog.json",
|
|
11
|
+
"./emails/*": "./dist/emails/*"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@clay-design-system/tokens": "0.12.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/mjml": "^4.7.4",
|
|
21
|
+
"@types/node": "^22.0.0",
|
|
22
|
+
"chokidar": "^4.0.0",
|
|
23
|
+
"cloudinary": "^2.5.1",
|
|
24
|
+
"mjml": "^4.15.3",
|
|
25
|
+
"tsx": "^4.0.0",
|
|
26
|
+
"typescript": "^5.7.0",
|
|
27
|
+
"vitest": "^2.1.0"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsx src/tokens/build-email-tokens.ts && tsx src/tokens/build-email-assets.ts && tsc && tsx src/build/compile.ts && tsx src/build/export-braze.ts",
|
|
31
|
+
"dev": "tsx src/build/compile.ts --watch",
|
|
32
|
+
"typecheck": "tsc --noEmit",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"tokens:check": "tsx src/tokens/build-email-tokens.ts && git diff --exit-code -- src/generated",
|
|
35
|
+
"export:braze": "tsx src/build/export-braze.ts",
|
|
36
|
+
"export:braze:cdn": "tsx src/build/export-braze.ts --cdn-base=https://assets.monday.com/email/",
|
|
37
|
+
"email:upload": "tsx src/build/upload-assets.ts",
|
|
38
|
+
"email:upload:dry-run": "tsx src/build/upload-assets.ts --dry-run",
|
|
39
|
+
"library:upload": "tsx src/build/upload-library-assets.ts",
|
|
40
|
+
"library:upload:dry-run": "tsx src/build/upload-library-assets.ts --dry-run",
|
|
41
|
+
"library:generate-map": "tsx src/build/generate-stock-library-map.ts",
|
|
42
|
+
"email:resolve-visuals": "tsx src/build/visual-resolver.ts"
|
|
43
|
+
}
|
|
6
44
|
}
|