No description
Find a file
Claude 7598b0e568
chore: refresh go.sum after upstream tag updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 23:36:25 +00:00
cmd test(wasm): add binary size gate test 2026-02-20 08:42:58 +00:00
codegen test: add benchmarks, Unicode edge cases, and stress tests 2026-02-20 05:33:15 +00:00
docs docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
.gitignore build: add Makefile with WASM build target and size check 2026-02-17 00:15:08 +00:00
bench_test.go test: add benchmarks, Unicode edge cases, and stress tests 2026-02-20 05:33:15 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
context.go feat: add Text node with go-i18n grammar pipeline 2026-02-16 23:35:50 +00:00
edge_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
go.mod chore: sync workspace dependency versions 2026-02-22 21:41:54 +00:00
go.sum chore: refresh go.sum after upstream tag updates 2026-02-22 23:36:25 +00:00
integration_test.go refactor: integration tests use Imprint pipeline 2026-02-17 00:14:04 +00:00
layout.go fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
layout_test.go feat: add HLCRF Layout type with semantic elements 2026-02-16 23:39:43 +00:00
Makefile fix: escape variant names, single-pass StripTags, WASM security contract 2026-02-17 00:21:24 +00:00
node.go feat: add Attr() helper for setting element attributes 2026-02-17 00:08:17 +00:00
node_test.go fix: escape variant names, single-pass StripTags, WASM security contract 2026-02-17 00:21:24 +00:00
path.go feat: add nested layout path chains 2026-02-16 23:40:40 +00:00
path_test.go feat: add nested layout path chains 2026-02-16 23:40:40 +00:00
pipeline.go fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
pipeline_test.go fix(wasm): reduce binary from 1.56MB to 830KB gzip 2026-02-20 08:29:54 +00:00
README.md docs: add README with quick start and docs links 2026-02-20 15:11:20 +00:00
render.go feat: add render pipeline and validation tests 2026-02-16 23:43:05 +00:00
render_test.go feat: add render pipeline and validation tests 2026-02-16 23:43:05 +00:00
responsive.go fix: escape variant names, single-pass StripTags, WASM security contract 2026-02-17 00:21:24 +00:00
responsive_test.go test: verify responsive variant path isolation 2026-02-17 00:10:33 +00:00
SESSION-BRIEF.md docs: add session brief for expert agent work 2026-02-19 17:38:47 +00:00

go-html

HLCRF DOM compositor with grammar pipeline integration for server-side HTML generation and optional WASM client rendering. Provides a type-safe node tree (El, Text, Raw, If, Each, Switch, Entitled), a five-slot Header/Left/Content/Right/Footer layout compositor with deterministic data-block path IDs and ARIA roles, a responsive multi-variant wrapper, a server-side grammar pipeline (StripTags, GrammarImprint via go-i18n reversal, CompareVariants), a build-time Web Component codegen CLI, and a WASM module (2.90 MB raw, 842 KB gzip) exposing renderToString().

Module: forge.lthn.ai/core/go-html Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import "forge.lthn.ai/core/go-html"

page := html.NewLayout("HCF").
    H(html.El("nav", html.Text("i18n.label.navigation"))).
    C(html.El("main",
        html.El("h1", html.Text("i18n.label.welcome")),
        html.Each(items, func(item Item) html.Node {
            return html.El("li", html.Text(item.Name))
        }),
    )).
    F(html.El("footer", html.Text("i18n.label.copyright")))

rendered := page.Render(html.NewContext("en-GB"))

Documentation

  • Architecture — node interface, HLCRF layout, responsive compositor, grammar pipeline, WASM module, codegen CLI
  • Development Guide — building, testing, WASM build, server/client split rules
  • Project History — completed phases and known limitations

Build & Test

go test ./...
go test -bench . ./...
GOOS=js GOARCH=wasm go build -ldflags="-s -w" -o gohtml.wasm ./cmd/wasm/
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.