Virgil
bf5ec80c8b
fix(codegen): reduce poll timer churn
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Use a ticker in watch mode and build registration strings without fmt.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 23:15:11 +00:00
Virgil
967182a676
feat(wasm): add component registration export
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 20:13:14 +00:00
Virgil
9b620cf673
refactor(html): add AX docs to helper wrappers
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 19:54:45 +00:00
Virgil
0716fe991f
docs(codegen): standardise AX examples
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 19:05:50 +00:00
Virgil
89d2870e20
fix(codegen): reject invalid slot keys
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 19:02:50 +00:00
Virgil
2b796e57eb
fix(html): remove mutable context setters
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 18:40:46 +00:00
Virgil
c240116c1d
fix(codegen): validate custom element tags
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 18:12:47 +00:00
Virgil
aa00f27db4
fix(codegen): ignore transient invalid watch input
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 18:01:45 +00:00
Virgil
a029931f76
fix(wasm): validate renderToString JS args
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 17:49:16 +00:00
Virgil
3d2fdf4e22
feat(codegen): restore watch mode
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:52:47 +00:00
Virgil
afa0337bbd
feat(html): add context locale setter
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:48:59 +00:00
Virgil
56bd6638db
feat(codegen): add TypeScript declarations
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Generate .d.ts output for Web Component bundles and add a CLI -dts mode.\n\nCo-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:42:41 +00:00
Snider
c525437ed6
refactor(module): migrate module path from forge.lthn.ai to dappco.re
...
Security Scan / security (pull_request) Successful in 9s
Test / test (pull_request) Failing after 20s
Update module path from forge.lthn.ai/core/go-html to dappco.re/go/core/html.
Migrate all .go import paths, update dependency versions (core v0.5.0,
log v0.1.0, io v0.2.0), and add replace directives for local development.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:28:30 +00:00
Snider
6e59bf8bf8
refactor(conventions): replace os.ReadFile with coreio.Local, fmt.Errorf with log.E
...
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 1m33s
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>
2026-03-16 19:17:34 +00:00
Snider
2d16ce9d69
fix(conventions): alias stdlib io, add interface checks, use go-log
...
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 1m34s
- 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>
2026-03-15 16:40:39 +00:00
Snider
3ea5041375
fix: bump WASM raw size limit to 3.5MB for Go 1.26 runtime growth
...
Security Scan / security (push) Successful in 15s
Test / test (push) Successful in 2m47s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 07:59:46 +00:00
Snider
29bd63d751
fix: add stub main() for non-WASM builds in cmd/wasm
...
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-02-23 06:31:14 +00:00
Snider
aae5d21ad4
test(wasm): add binary size gate test
...
TestWASMBinarySize builds WASM with -ldflags="-s -w", gzips the
binary, and asserts < 1MB gzip (842KB actual) and < 3MB raw (2.90MB
actual). Skipped in -short mode. Matches Makefile WASM_GZ_LIMIT.
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 08:42:58 +00:00
Snider
4c657377c4
fix(wasm): reduce binary from 1.56MB to 830KB gzip
...
Move heavyweight imports out of WASM build via //go:build !js tags:
- register.go: encoding/json + text/template (codegen)
- pipeline.go: go-i18n/reversal (grammar imprint)
- layout.go: replace fmt.Sprintf with string concat
Add cmd/codegen/ CLI as build-time replacement for in-browser
registerComponents(). Reads slot JSON from stdin, writes WC bundle
JS to stdout.
Result: 2.90MB raw / 830KB gzip (was 6.04MB / 1.56MB).
Makefile gate passes (limit 1MB gzip).
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 08:29:54 +00:00
Claude
dcd55a434c
feat(wasm): add registerComponents export for WC codegen
...
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>
2026-02-17 20:50:50 +00:00
Claude
9bc1fa7c69
fix: escape variant names, single-pass StripTags, WASM security contract
...
- 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>
2026-02-17 00:21:24 +00:00
Claude
e34c5c96c3
test: add WASM browser test harness
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 00:15:26 +00:00
Claude
5acf63cb4b
feat: add WASM entry point with renderToString
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 00:12:04 +00:00