Add type guards for variant and locale inputs at the WASM boundary and a js+wasm integration test suite for renderToString behavior.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace os.ReadFile in cmd/wasm/size_test.go with coreio.Local.Read().
Replace fmt.Errorf/errors.New with log.E() in codegen, cmd/wasm/register,
and cmd/codegen. Add forge.lthn.ai/core/go-io as a dependency.
Co-Authored-By: Virgil <virgil@lethean.io>
- Alias stdlib `io` as `goio` in cmd/codegen/main.go to follow project conventions
- Add compile-time Node interface checks for all node types in node.go
and Layout in layout.go
- Replace fmt.Fprintf stderr logging with go-log in cmd/codegen/main.go
- Replace fmt.Println with go-log in cmd/wasm/register.go
Co-Authored-By: Virgil <virgil@lethean.io>
The WASM main.go is gated behind //go:build js && wasm, leaving
register.go (//go:build !js) as the only file on native builds —
but it had no main(). Adds a stub that prints a usage hint.
Co-Authored-By: Virgil <virgil@lethean.io>
Exposes gohtml.registerComponents(slotsJSON) to browser context.
Pure-Go buildComponentJS is testable without WASM; WASM glue uses
Function constructor for browser-side execution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Escape variant name in Responsive.Render HTML attribute (XSS fix)
- Rewrite StripTags to single-pass O(n) space collapsing
- Document Raw() security contract in WASM entry point
- Add TestAttr_NonElement coverage
- Fix Makefile WASM target to rebuild on source changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>