release: WRNexusJS 0.5.14

This commit is contained in:
2026-07-30 21:29:25 +05:30
parent 9dffe83f32
commit 358a520bc5
123 changed files with 11646 additions and 461 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/styles",
"version": "0.5.13",
"version": "0.5.14",
"type": "module",
"main": "src/index.ts",
"exports": {
+20
View File
@@ -47,3 +47,23 @@ describe("theme accents", () => {
expect(runtime).not.toContain("style.setProperty");
});
});
test("live document accent has priority over cookie and default", () => {
const runtime = renderThemeRuntime(
resolveThemeConfig({
palette: "rose",
default: "light",
accent: {
default: "rose",
options: ["rose", "emerald", "cyan"],
},
}),
);
expect(runtime).toContain(
'el.getAttribute("data-accent")||readCookie(ACCENT_COOKIE)||DEFAULT_ACCENT',
);
expect(runtime).toContain(
'el.getAttribute("data-theme")||readCookie(THEME_COOKIE)||DEFAULT_THEME',
);
});