Pre Release New Changes

This commit is contained in:
2026-07-31 16:30:13 +05:30
parent 358a520bc5
commit 3e565e8d03
189 changed files with 36727 additions and 17249 deletions
+23
View File
@@ -1343,3 +1343,26 @@ page Pricing {
expect(code).toContain('billingCycle === "annual"');
});
test("style blocks compile with stable page/component/layout metadata", () => {
const page = compileWireFile(`page StyledPage {
style { .shared { color: red; } }
view { <main class="shared">Page</main> }
}`);
const component = compileWireFile(`component StyledCard {
style { .shared { color: blue; } }
view { <article class="shared">Card</article> }
}`);
const layout = compileWireFile(`layout StyledLayout {
style { .shared { color: green; } }
view { <div class="shared"><slot></slot></div> }
}`);
expect(page).toContain('data-wrnexus-style-kind="page"');
expect(component).toContain('data-wrnexus-style-kind="component"');
expect(layout).toContain('data-wrnexus-style-kind="layout"');
expect(page).toContain("export const __wrnexusStyles");
expect(component).toContain("export const __wrnexusStyles");
expect(layout).toContain("export const __wrnexusStyles");
expect(page).toMatch(/data-wrnexus-style-id="wrn-page-[a-z0-9]+"/);
});