feat: release design system engine, studio and component contracts

This commit is contained in:
Clintchiz committed 2026-10-19 13:09:03 +05:30
1 parent ff1065fb27
commit 3943b946d6
693 files changed
+175546 -3894

No files matched your search

@@ -2,8 +2,19 @@ import { expect, test } from "bun:test";
import { buttonBlock, ampLayoutCss } from "../src/blocks.ts";
test("button visuals target the clickable surface rather than the full-width wrapper", async () => {
const node = {id:"cta",type:"content.button",version:1,props:{label:"Act",href:"https://example.com"},styles:{backgroundColor:{base:"#123456"},padding:{base:"8px 32px"},borderRadius:{base:"20px"}},slots:{}};
const context = {node,context:{},slots:{}} as never;
const node = {
id: "cta",
type: "content.button",
version: 1,
props: { label: "Act", href: "https://example.com" },
styles: {
backgroundColor: { base: "#123456" },
padding: { base: "8px 32px" },
borderRadius: { base: "20px" },
},
slots: {},
};
const context = { node, context: {}, slots: {} } as never;
const html = String(await buttonBlock.renderers!.emailHtml!(context));
const wrapper = html.match(/<td data-block-id="cta"[^>]*>/)![0];
expect(wrapper).not.toContain("#123456");