- cmd/codegen/main.go: drop "errors" stdlib import, use core.Is per Core convention
(non-WASM path).
- layout.go, path.go, responsive.go: add header notes documenting why these files
use stdlib (errors/strings/strconv) instead of core — RFC §7 caps WASM at
3.5 MB raw / 1 MB gzip, and dappco.re/go/core transitively pulls fmt/os/log.
- README.md, docs/index.md: migrate stale forge.lthn.ai/core/go-html module path
to canonical dappco.re/go/core/html; refresh dependency diagram and Go version.
All spec features are already implemented; this is spec-parity maintenance.
Verified: go build ./..., go vet ./..., go test ./... all green (WASM size test
back to 2.12 MB raw / 630 KB gzip after short-lived core-import regression).
Co-Authored-By: Virgil <virgil@lethean.io>
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>