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

@@ -7,7 +7,9 @@ test("deep conditional components render each branch once with bounded document
let view = "<p>Leaf</p>";
for (let i = 0; i < 12; i++) view = `{#if open}${view}{:else}<i>Closed</i>{/if}`;
const source = `component Nested {\n state open = true\n view { ${view} }\n }`;
const code = new Bun.Transpiler({ loader: "ts" }).transformSync(compile(source, "Nested.wrn").code);
const code = new Bun.Transpiler({ loader: "ts" }).transformSync(
compile(source, "Nested.wrn").code,
);
const mod = await import("data:text/javascript;base64," + Buffer.from(code).toString("base64"));
runWithRequestContext({} as never, () => {
const body = mod.render({});
@@ -15,6 +17,6 @@ test("deep conditional components render each branch once with bounded document
expect(body).toContain("<p>Leaf</p>");
expect(document.length).toBeLessThan(30000);
const registry = JSON.parse(document.match(/data-wrn-controls[^>]*>(.*?)<\/script>/s)![1]!);
expect(registry).toHaveLength(12);
expect(registry.filter(Array.isArray)).toHaveLength(12);
});
});