trellis 0.1.0 copy "trellis: ^0.1.0" to clipboard
trellis: ^0.1.0 copied to clipboard

A Thymeleaf-inspired HTML template engine for Dart. Natural HTML templates with tl:* attributes, fragment-first design for HTMX, AOT-compatible.

Changelog #

0.1.0 #

Added #

  • Core template engine with 15 tl:* attributes for natural HTML templating
  • Text substitution: tl:text (escaped) and tl:utext (unescaped HTML)
  • Conditionals: tl:if and tl:unless
  • Iteration: tl:each with status variables (index, count, size, first, last, odd, even, current)
  • Fragment system: tl:fragment, tl:insert, tl:replace with cross-file inclusion
  • Local variable binding: tl:with
  • Attribute setting: tl:attr, tl:href, tl:src, tl:value, tl:class, tl:id
  • Expression evaluator: ${var} variables, @{/url} URL expressions, string literals, ternary, Elvis, comparisons, boolean operators
  • Four public API methods: render(), renderFile(), renderFragment(), renderFileFragment()
  • DOM caching with deep-clone for performance
  • Configurable attribute prefix (default tl)
  • FileSystemLoader with security boundary enforcement (path traversal, symlink escape protection)
  • MapLoader for in-memory templates and testing
  • Typed exception hierarchy: TemplateException, ExpressionException, FragmentNotFoundException, TemplateNotFoundException, TemplateSecurityException
  • Benchmark harness: dart run benchmark/cache_benchmark.dart for cache on/off median latency and RSS probe

0.0.1-dev.1 #

  • Name reservation on pub.dev
2
likes
0
points
482
downloads

Publisher

verified publisherleafnode.se

Weekly Downloads

A Thymeleaf-inspired HTML template engine for Dart. Natural HTML templates with tl:* attributes, fragment-first design for HTMX, AOT-compatible.

Repository (GitHub)
View/report issues

Topics

#template #html #htmx #server-side-rendering

License

unknown (license)

Dependencies

html, string_scanner

More

Packages that depend on trellis