feat: close application architecture gaps
This commit is contained in:
@@ -211,6 +211,10 @@ function __wrnRaw(v: unknown): string {
|
||||
return String(v == null ? "" : v);
|
||||
}
|
||||
|
||||
function __wrnexusEncodeControl(value: unknown): string {
|
||||
return __WrnexusBuffer.from(JSON.stringify(value), "utf8").toString("base64");
|
||||
}
|
||||
|
||||
function __wrnexusSerializeScopeValue(value: unknown): string {
|
||||
if (value === undefined) {
|
||||
return "undefined";
|
||||
|
||||
@@ -1070,6 +1070,25 @@ component Banner {
|
||||
expect(output).toContain("visible");
|
||||
expect(output).toContain("Visible");
|
||||
expect(output).toContain("Hidden");
|
||||
expect(output).toContain("__wrnexusEncodeControl");
|
||||
});
|
||||
|
||||
test("bind directives compile to reactive values and assignment handlers", () => {
|
||||
const output = generate(
|
||||
parse(`page FormPage {
|
||||
state name = ""
|
||||
state active = false
|
||||
view {
|
||||
<Input bind:value={name} />
|
||||
<input bind:value={name} />
|
||||
<Switch bind:checked={active} />
|
||||
}
|
||||
}`),
|
||||
);
|
||||
expect(output).not.toContain("bind:value");
|
||||
expect(output).not.toContain("bind:checked");
|
||||
expect(output).toContain("name = payload.value");
|
||||
expect(output).toContain("active = payload.checked");
|
||||
});
|
||||
|
||||
test("if and each blocks emit browser control metadata while preserving SSR", () => {
|
||||
|
||||
Reference in New Issue
Block a user