Commit graph

151 commits

Author SHA1 Message Date
Snider
2e7559b257 chore(html): record RFC verification
Some checks failed
Security Scan / security (push) Has been cancelled
Test / test (push) Has been cancelled
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 03:22:28 +01:00
Snider
6e254de9ba Fix locale forwarding for translators
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 03:17:19 +01:00
Codex
0d361e537e fix(html): restore full tree and stabilize nested layout block ids
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 03:11:36 +01:00
Codex
3b2900838b fix(html): stabilize nested layout block ids
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 03:11:19 +01:00
Snider
9757d661ed Harden Attr against typed nil wrappers
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 03:05:26 +01:00
Snider
57952b8a6a feat(html): harden recursive attr coverage
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 03:00:13 +01:00
Snider
dd68c6d0d7 feat(html): canonicalize compare variant keys
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 02:53:37 +01:00
Snider
e95c059412 Harden HTML tag stripping
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 02:47:57 +01:00
Snider
a02843a5ad fix(wasm): render empty slot content
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Preserve empty string slot values in renderToString so explicit empty slots still render as empty containers.\n\nCo-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:42:50 +01:00
Snider
6369ec4405 fix(codegen): align custom element validation with spec
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Broaden valid custom element names to match the HTML standard, add JS/TS string escaping for generated output, and cover dotted plus Unicode tag names in tests.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:37:39 +01:00
Snider
1c2b2c532b feat(html): recurse attr through layout trees
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:30:05 +01:00
Snider
dc5edcfb3d fix(path): tighten block id parsing
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:25:33 +01:00
Snider
871b29582f fix(codegen): render template content safely
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:20:00 +01:00
Snider
4bbdb10080 Harden StripTags against stray angle brackets
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 02:15:12 +01:00
Codex
b1ff334c85 fix: preserve comparison operators in strip tags
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:08:01 +01:00
Snider
5fa28ca64b docs: sync html docs with RFC examples
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 02:01:13 +01:00
Snider
7dd14c7755 fix: align layout validation with RFC
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 01:55:23 +01:00
Codex
7013cc3658 docs: sync session brief with current html implementation
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 01:48:52 +01:00
Snider
4e5c3fd921 fix(layout): stabilise block id numbering
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Make root-level duplicate slot IDs use stable per-slot numbering.

Add a regression test for root duplicate block IDs.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 01:44:15 +01:00
Snider
691d504f01 fix: retain wasm callback and normalize codegen class names
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 01:39:31 +01:00
Snider
b08a226202 feat(html): keep Each layout paths unique
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 01:34:26 +01:00
Snider
0020f26582 test(html): add helper coverage and refresh docs
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 01:28:56 +01:00
Snider
ebbd050df4 Stabilize repeated layout block IDs
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 01:23:12 +01:00
Snider
066bb8e92d Implement dotted block coordinates
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 01:18:48 +01:00
Snider
bfecee9685 fix: preserve context map aliasing
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 01:10:44 +01:00
Snider
fb13048db2 fix(html): share pluralisation args across builds
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 01:04:48 +01:00
Snider
fc4bae09cc feat(responsive): surface media hints on variant containers
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 00:59:26 +01:00
Snider
2d8ddb4523 fix(html): preserve each item paths through wrappers
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 00:55:02 +01:00
Snider
480a6457ce fix(html): preserve responsive layout paths
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 00:48:56 +01:00
Snider
f6bdc0959e feat(html): add RFC block-path rendering
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 00:43:07 +01:00
Snider
0c19ccf7cc fix(html): honour Metadata alias for text counts
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Text() count/pluralisation now reads from either Context.Data or Context.Metadata, matching the alias contract when callers populate only one field.\n\nCo-Authored-By: Virgil <virgil@lethean.io>
2026-04-15 00:29:05 +01:00
Snider
7679d2ded5 feat(html): support count context in Text
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 00:24:17 +01:00
Snider
61adbd55c5 fix(html): align left slot with navigation semantics
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-15 00:16:01 +01:00
Snider
09b48e00dc chore(html): swap errors.Is for core.Is in codegen CLI, document WASM size guard-rails
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
- 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>
2026-04-14 20:01:28 +01:00
Snider
286731e398 feat(html): Metadata alias on Context + Responsive.Add with media-query hint
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Brings the portable pieces of mini's feat/main-session-work onto dev:

- context.go: Context.Metadata field — alias for Data, references the same
  underlying map. Both fields interchangeable at read/write sites.
- responsive.go: responsiveVariant gains an optional media field for CSS
  media-query hints (e.g. "(min-width: 1024px)"); new Responsive.Add(name,
  layout, media...) method. Existing Variant(name, layout) becomes a thin
  alias over Add.
- go.mod: drop stale dappco.re/go/core/{inference,log} indirect requires
  (refreshed by go mod tidy — forge.lthn.ai/core/{go-inference,go-log}).

Mini's local deps/go-i18n/reversal grammar-vector rewrite does not apply to
dev: dev consumes reversal as an external package (dappco.re/go/core/i18n/reversal)
rather than an internal fork. That portion of the branch is left on
feat/main-session-work for future re-integration.

Verified: GOWORK=off go build ./... + go test ./... passes.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-14 19:22:17 +01:00
Snider
4a924b0be4 fix: migrate module paths from forge.lthn.ai to dappco.re
Some checks failed
Security Scan / security (push) Has been cancelled
Test / test (push) Has been cancelled
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-04 16:21:12 +01:00
Virgil
f543f02cc1 feat(html): add layout variant validation helper
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:19:30 +00:00
Virgil
8402485489 fix(html): use locale setter in render path
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-03 16:16:47 +00:00
Virgil
5784b76990 fix(wasm): harden renderToString arg handling
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
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>
2026-04-03 07:51:45 +00:00
Virgil
70a3096518 chore: improve CSS selector escaping for control chars
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
2026-04-03 07:37:07 +00:00
Virgil
8abd428227 fix(codegen): validate custom element tags
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 54s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 09:49:42 +00:00
Virgil
c088e5a5ac feat(codegen): emit module boundary in TypeScript definitions
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 58s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:54:40 +00:00
Virgil
1d11472136 feat(html): add role accessibility helper
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:51:01 +00:00
Virgil
2e2af31c1d feat(html): add locale setter for context translators
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 1m1s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:48:08 +00:00
Virgil
b9e2630da3 feat(html): allow swapping context translators
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 59s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:44:15 +00:00
Virgil
c2ff591ec9 feat(html): apply attrs through iterator wrappers
All checks were successful
Security Scan / security (push) Successful in 10s
Test / test (push) Successful in 59s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:40:44 +00:00
Virgil
60d8225a83 feat(html): preserve layout paths in iterators
All checks were successful
Security Scan / security (push) Successful in 11s
Test / test (push) Successful in 59s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:27:50 +00:00
Virgil
8e9ca0091c feat(html): apply locale to context translators
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 1m1s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:25:09 +00:00
Virgil
cb901dbb71 feat(html): allow locale in context constructors
All checks were successful
Security Scan / security (push) Successful in 10s
Test / test (push) Successful in 56s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:20:19 +00:00
Virgil
4a3a69e8b7 fix(html): preserve switch wrapper paths
All checks were successful
Security Scan / security (push) Successful in 9s
Test / test (push) Successful in 59s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-31 20:07:35 +00:00