fix(runtime): remove false browser diagnostics
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/cli",
|
||||
"version": "0.8.11",
|
||||
"version": "0.8.12",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/csr",
|
||||
"version": "0.8.9",
|
||||
"version": "0.8.10",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -4075,15 +4075,6 @@ export const REACTIVE_RUNTIME = String.raw`
|
||||
? Promise.all(values)
|
||||
: values[values.length - 1];
|
||||
}
|
||||
/*__WRNEXUS_DEV_START__*/
|
||||
warnOnce(
|
||||
"WRN-DEV-OUTPUT-UNHANDLED",
|
||||
"Output '" + name + "' has no parent binding. Registered bindings: " +
|
||||
(registry ? Object.keys(registry).join(", ") || "none" : "none") + ".",
|
||||
root,
|
||||
{ output: name, registeredBindings: registry ? Object.keys(registry) : [] },
|
||||
);
|
||||
/*__WRNEXUS_DEV_END__*/
|
||||
return dispatchComponentEvent(root, name, payload);
|
||||
}
|
||||
|
||||
|
||||
@@ -704,7 +704,7 @@ test("a camelCase output reaches a parent binding despite attribute lowercasing"
|
||||
expect(win.document.querySelector("#out")?.textContent).toBe("yes");
|
||||
});
|
||||
|
||||
test("development runtime warns once for an output with no parent binding", () => {
|
||||
test("development runtime allows an output with no parent binding", () => {
|
||||
const win = new Window() as unknown as Window & Record<string, unknown>;
|
||||
win.document.body.innerHTML = `<div data-scope="" data-wrn-events="complete"><button data-on-click="output.complete({})">go</button></div>`;
|
||||
(globalThis as Record<string, unknown>).window = win;
|
||||
@@ -732,8 +732,7 @@ test("development runtime warns once for an output with no parent binding", () =
|
||||
} finally {
|
||||
console.warn = originalWarn;
|
||||
}
|
||||
expect(warnings).toHaveLength(1);
|
||||
expect(String(warnings[0]?.[0])).toContain("WRN-DEV-OUTPUT-UNHANDLED");
|
||||
expect(warnings).toHaveLength(0);
|
||||
});
|
||||
|
||||
test("development runtime warns when a component binding names a missing function", () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/dev-server",
|
||||
"version": "0.8.10",
|
||||
"version": "0.8.11",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/styles",
|
||||
"version": "0.8.8",
|
||||
"version": "0.8.9",
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"exports": {
|
||||
|
||||
@@ -40,6 +40,8 @@ export type ThemeToken =
|
||||
| "radius"
|
||||
| "radius-sm"
|
||||
| "shadow-1"
|
||||
| "shadow-2"
|
||||
| "shadow-3"
|
||||
| "shadow-sm"
|
||||
| "shadow-md"
|
||||
| "shadow-lg"
|
||||
@@ -416,6 +418,8 @@ export const DEFAULT_THEMES: Record<string, ThemeTokens> = {
|
||||
"radius-sm": "5px",
|
||||
"font-sans": '"Plus Jakarta Sans",ui-sans-serif,system-ui,sans-serif',
|
||||
"shadow-1": "0 1px 2px rgba(16,24,40,0.06), 0 1px 3px rgba(16,24,40,0.1)",
|
||||
"shadow-2": "0 8px 24px rgba(16,24,40,0.10)",
|
||||
"shadow-3": "0 20px 50px rgba(16,24,40,0.14)",
|
||||
},
|
||||
dark: {
|
||||
"color-scheme": "dark",
|
||||
@@ -449,6 +453,8 @@ export const DEFAULT_THEMES: Record<string, ThemeTokens> = {
|
||||
"radius-sm": "6px",
|
||||
"font-sans": '"Plus Jakarta Sans",ui-sans-serif,system-ui,sans-serif',
|
||||
"shadow-1": "0 1px 2px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.35)",
|
||||
"shadow-2": "0 10px 30px rgba(0,0,0,0.35)",
|
||||
"shadow-3": "0 24px 64px rgba(0,0,0,0.45)",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -525,7 +531,9 @@ function globalThemeCss(): string {
|
||||
'\nhtml,body{font-family:var(--wire-font-sans,"Plus Jakarta Sans",ui-sans-serif,system-ui,sans-serif);}\n' +
|
||||
":root{--wire-radius-sm:0.55rem;--wire-radius-md:0.9rem;--wire-radius-lg:1.35rem;" +
|
||||
"--wire-shadow-1:0 1px 2px color-mix(in srgb, black 22%, transparent)," +
|
||||
"0 10px 30px color-mix(in srgb, black 14%, transparent);}\n" +
|
||||
"0 10px 30px color-mix(in srgb, black 14%, transparent);" +
|
||||
"--wire-shadow-2:0 10px 30px color-mix(in srgb, black 18%, transparent);" +
|
||||
"--wire-shadow-3:0 24px 64px color-mix(in srgb, black 24%, transparent);}\n" +
|
||||
"wrn-slot{display:contents;}\n" +
|
||||
"[data-for]{display:none !important;}\n"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user