diff --git a/packages/email-renderer/package.json b/packages/email-renderer/package.json index cb9f6494..9a91f986 100644 --- a/packages/email-renderer/package.json +++ b/packages/email-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/email-renderer", - "version": "0.1.4", + "version": "0.1.5", "type": "module", "description": "WRNexus block email renderers with HTML, text, AMP Email, and MJML interoperability.", "exports": { diff --git a/packages/email-renderer/src/blocks.ts b/packages/email-renderer/src/blocks.ts index b67c6c1c..6ab6b7ac 100644 --- a/packages/email-renderer/src/blocks.ts +++ b/packages/email-renderer/src/blocks.ts @@ -435,7 +435,7 @@ export const feedItemBlock = leaf( "content.feed-item", "RSS article", "icon-[lucide--rss]", - object({ title: string({ min: 1, max: 500 }), summary: string({ max: 2_000, default: "" }), href: safeUrl({ schemes: ["https"] }), image: safeUrl({ schemes: ["https"], optional: true }) }) as never, + object({ feedUrl: safeUrl({ schemes: ["https"], optional: true }), title: string({ min: 1, max: 500 }), summary: string({ max: 2_000, default: "" }), href: safeUrl({ schemes: ["https"] }), image: safeUrl({ schemes: ["https"], optional: true }) }) as never, { emailHtml: ({ node }) => emailCell(`${attrs(node).image ? `` : ""}

${html(attrs(node).title)}

${html(attrs(node).summary)}

`, node), ampEmail: ({ node }) => emailCell(`

${html(attrs(node).title)}

${html(attrs(node).summary)}

`, node), @@ -448,7 +448,7 @@ export const productBlock = leaf( "commerce.product", "Product", "icon-[lucide--shopping-bag]", - object({ provider: choice(["shopify", "woocommerce", "manual"] as const, { default: "manual" }), productId: string({ max: 300, default: "" }), title: string({ min: 1, max: 500 }), price: string({ max: 100 }), image: safeUrl({ schemes: ["https"] }), href: safeUrl({ schemes: ["https"] }), buttonLabel: string({ max: 200, default: "Shop now" }) }) as never, + object({ provider: choice(["shopify", "woocommerce", "manual"] as const, { default: "manual" }), storeUrl: safeUrl({ schemes: ["https"], optional: true }), productId: string({ max: 300, default: "" }), title: string({ min: 1, max: 500 }), price: string({ max: 100 }), image: safeUrl({ schemes: ["https"] }), href: safeUrl({ schemes: ["https"] }), buttonLabel: string({ max: 200, default: "Shop now" }) }) as never, { emailHtml: ({ node }) => emailCell(`${html(attrs(node).title)}

${html(attrs(node).title)}

${html(attrs(node).price)}

${html(attrs(node).buttonLabel)}

`, node), ampEmail: ({ node }) => emailCell(`

${html(attrs(node).title)}

${html(attrs(node).price)}

${html(attrs(node).buttonLabel)}

`, node),