Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aybanda
Copy link

@aybanda aybanda commented Oct 1, 2025

Hi — this PR implements a minimal TXML (Trema-style XML) + TSS (Trema Stylesheet) layer that renders to Dear ImGui via jsimgui, per the discussion in issue #53.

What's included

  • TXML parser → maps tags like Window, Text, Button, InputText, SliderFloat, Checkbox, Separator to the corresponding ImGui calls.
  • TSS parser → basic CSS-like rules for colors and a handful of layout/style props used by those widgets.
  • Renderer + widget layer → applies computed styles, handles state, and logs ImGui calls to the console for visibility.
  • Security + error handling → input validation, sanitized text/attrs, safe fallbacks; meaningful errors rather than hard failures.
  • JSX runtime support → optional: converts simple JSX to TXML for folks who prefer that syntax.

What you can try

  • Render the included demos or call renderer.render(txml, tss) in your loop; the ImGui canvas shows live output and logs the generated ImGui JS.

Notes

  • Error handling is graceful (safeParse/safeRender); bad inputs don't break the render loop.
  • Security defaults are strict, with a test/dev mode toggle to avoid noisy failures during iteration.

Happy to address any feedback and adjust naming, file locations, or boundaries to match project conventions.

References

- Implements minimal TXML (Trema XML) + TSS (Trema Stylesheet) layer
- Renders to Dear ImGui via jsimgui
- Includes core parsers, renderer, widget implementations
- Security validation and error handling
- JSX runtime support
- Working demos and tests
- Addresses issue mori2003#53
@aybanda aybanda force-pushed the txml-tss-renderer branch from d8382ca to 6ddab06 Compare October 1, 2025 07:26
- Keep original jsimgui generator/build intact
- Add txml-tss/src with parsers, renderer, style engine, security, widgets
- Add examples/working-imgui-demo.html for demoing the layer
- Docs: TXML_TSS_README.md

refs mori2003#53
@aybanda aybanda changed the title TXML/TSS: Minimal XML + stylesheet layer rendering to ImGui (refs issue #53) feat(examples): add TXML/TSS minimal XML + stylesheet layer (refs #53) Oct 1, 2025
@aybanda aybanda changed the title feat(examples): add TXML/TSS minimal XML + stylesheet layer (refs #53) feat(examples): add TXML/TSS integration (refs #53) Oct 1, 2025
@md84419
Copy link

md84419 commented Oct 4, 2025

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants