Commit graph

6 commits

Author SHA1 Message Date
Virgil
8a3f28aff3 fix(conventions): isolate banned imports and clarify tests
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:15:24 +00:00
Snider
c525437ed6 refactor(module): migrate module path from forge.lthn.ai to dappco.re
Some checks failed
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
All checks were successful
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
78d5b45b0c feat: modernise to Go 1.26 — iterators, slices/maps, EachSeq
Some checks failed
Security Scan / security (push) Successful in 10s
Test / test (push) Failing after 36s
- Add EachSeq[T](iter.Seq[T], fn) for iterator-based template rendering
- Use slices.Collect(maps.Keys()) + slices.Sort for deterministic attr output
- Use strings.SplitSeq in codegen TagToClassName and path parsing
- Use range over int in layout and pipeline loops
- Refresh go.sum

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 05:11:22 +00:00
Snider
7efd2ab93a test: add benchmarks, Unicode edge cases, and stress tests
Performance benchmarks across all major APIs:
- BenchmarkRender (depth 1/3/5/7 tree, full page)
- BenchmarkImprint (small/large pipeline)
- BenchmarkCompareVariants (2/3 variants)
- BenchmarkLayout (C, HCF, HLCRF, nested, many children)
- BenchmarkEach (10/100/1000 items)
- BenchmarkResponsive, BenchmarkStripTags
- Codegen: GenerateClass, TagToClassName, GenerateBundle, GenerateRegistration

Edge case tests:
- Unicode: emoji, RTL (Arabic/Hebrew), zero-width chars, mixed scripts
- Deep nesting: 10/20 levels, mixed slot types
- Large Each iterations: 1000/5000 items, nested Each
- Layout variant validation: invalid chars, lowercase, duplicates, empty
- Nil context handling for Render, Imprint, CompareVariants
- Switch no-match, Entitled nil context, empty tag El

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 05:33:15 +00:00
Claude
937c08d9ed
feat(codegen): Web Component class generation from HLCRF slots
Generates Custom Element v1 classes with closed Shadow DOM from manifest
slot assignments. Includes tag validation, PascalCase conversion, and
bundle generation for full HLCRF layout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 20:49:45 +00:00