release: WRNexusJS 0.5.14
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/ai",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Zero-dependency Claude (Anthropic) client for WrNexus apps.",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/auth",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"description": "Complete authentication, account security, MFA, passkeys, recovery, devices, risk, and audit system for WRNexusJS.",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/authz",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/captcha",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"description": "First-class CAPTCHA challenges, providers, verification guards, page gates, and WRNexusJS UI.",
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/cli",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1161,6 +1161,22 @@ const MIGRATIONS: Migration[] = [
|
||||
// Gateway, helper, validation, and UI improvements are package-managed.
|
||||
},
|
||||
},
|
||||
{
|
||||
version: "0.5.13",
|
||||
id: "preserve-theme-accent-during-hmr",
|
||||
description: "Preserves the user's active theme and accent palette during HMR morph updates.",
|
||||
apply() {
|
||||
// Runtime-only framework fix. No project files require migration.
|
||||
},
|
||||
},
|
||||
{
|
||||
version: "0.5.14",
|
||||
id: "preserve-theme-accent-during-hmr",
|
||||
description: "Preserves the user's active theme and accent palette during HMR morph updates.",
|
||||
apply() {
|
||||
// Runtime-only framework fix. No project files require migration.
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
/** Release tooling uses this to require an explicit migration entry per version. */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/compiler",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/core",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/csr",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/db",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/dev-server",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -594,15 +594,15 @@ export const HMR_CLIENT_JS = `
|
||||
document.title = doc.title;
|
||||
}
|
||||
|
||||
["data-theme", "data-accent", "lang"].forEach(function (name) {
|
||||
var value = doc.documentElement.getAttribute(name);
|
||||
// HMR morphs only #app. Keep the live browser theme and accent because
|
||||
// they represent the user's current selection. Language remains SSR-owned.
|
||||
var nextLang = doc.documentElement.getAttribute("lang");
|
||||
|
||||
if (value == null) {
|
||||
document.documentElement.removeAttribute(name);
|
||||
} else {
|
||||
document.documentElement.setAttribute(name, value);
|
||||
}
|
||||
});
|
||||
if (nextLang == null) {
|
||||
document.documentElement.removeAttribute("lang");
|
||||
} else {
|
||||
document.documentElement.setAttribute("lang", nextLang);
|
||||
}
|
||||
|
||||
var from = document.getElementById("app");
|
||||
var to = doc.getElementById("app");
|
||||
@@ -620,6 +620,22 @@ export const HMR_CLIENT_JS = `
|
||||
if (window.__wrnexusHydrateCsrFetches) {
|
||||
window.__wrnexusHydrateCsrFetches(document);
|
||||
}
|
||||
|
||||
if (
|
||||
window.wireTheme &&
|
||||
typeof window.wireTheme.bind === "function"
|
||||
) {
|
||||
window.wireTheme.bind(document);
|
||||
}
|
||||
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("wrnexus:hmr-updated", {
|
||||
detail: {
|
||||
theme: document.documentElement.getAttribute("data-theme"),
|
||||
accent: document.documentElement.getAttribute("data-accent"),
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// Minimal index-based DOM morph: preserve matching nodes (keeps state/focus),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { expect, test } from "bun:test";
|
||||
import { collectScripts } from "../src/runtime.ts";
|
||||
import { HMR_CLIENT_JS, collectScripts } from "../src/runtime.ts";
|
||||
|
||||
test("accent controls load the shared theme runtime", () => {
|
||||
expect(collectScripts('<button data-wire-accent-set="rose">Rose</button>')).toContain(
|
||||
@@ -12,3 +12,17 @@ test("accent clear controls load the shared theme runtime", () => {
|
||||
"/__wrnexus/theme.js",
|
||||
);
|
||||
});
|
||||
|
||||
test("HMR preserves the active browser theme and accent", () => {
|
||||
expect(HMR_CLIENT_JS).not.toContain('["data-theme", "data-accent", "lang"]');
|
||||
|
||||
expect(HMR_CLIENT_JS).not.toContain("document.documentElement.setAttribute(name, value)");
|
||||
|
||||
expect(HMR_CLIENT_JS).toMatch(/var nextLang\s*=\s*doc\.documentElement\.getAttribute\("lang"\)/);
|
||||
|
||||
expect(HMR_CLIENT_JS).toMatch(/typeof\s+window\.wireTheme\.bind\s*===\s*"function"/);
|
||||
|
||||
expect(HMR_CLIENT_JS).toMatch(/window\.wireTheme\.bind\(document\)/);
|
||||
|
||||
expect(HMR_CLIENT_JS).toContain('new CustomEvent("wrnexus:hmr-updated"');
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/dev-toolbar",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/encryption",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/helpers",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Safe convenience helpers for WrNexus request contexts and common application flows.",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/i18n",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/jwt",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/mobile",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/native",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/oauth",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/plugin",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/pubsub",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/queue",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/reactive",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/router",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/ssr",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/styles",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/syntax",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/test",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/tracking",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -257,6 +257,20 @@ component Footer {
|
||||
</slot>
|
||||
</div>
|
||||
|
||||
{#if copyright}
|
||||
<div
|
||||
class="wire-footer__bottom"
|
||||
>
|
||||
<div></div>
|
||||
<p
|
||||
class="wire-footer__copyright"
|
||||
>
|
||||
{copyright}
|
||||
</p>
|
||||
<div></div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div
|
||||
class="wire-footer__copyright-right"
|
||||
>
|
||||
@@ -266,18 +280,6 @@ component Footer {
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if copyright}
|
||||
<div
|
||||
class="wire-footer__bottom"
|
||||
>
|
||||
<div></div>
|
||||
<p class="wire-footer__copyright">
|
||||
{copyright}
|
||||
</p>
|
||||
<div></div>
|
||||
</div>
|
||||
{/if}
|
||||
</footer>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/ui",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/uploader",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/validation",
|
||||
"version": "0.5.13",
|
||||
"version": "0.5.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
Reference in New Issue
Block a user