Skip to content

Releases: Krishanth-K/stencil

stencil v0.2.1

31 Dec 10:39

Choose a tag to compare

Release Notes: Stencil v0.2.1

This release marks a major milestone for Stencil, evolving it from a simple HTML generator into a more robust, multi-backend UI generation tool. The core logic has been significantly refactored for better stability and extensibility.

✨ New Features

  • ImGui Backend: Stencil can now generate standalone desktop UIs using the ImGui backend. Run with stencil generate --backend imgui.
  • New UI Elements: Added support for interactive <input> fields and visual <separator> lines.
  • Interactive Components: The generated UI now supports basic interactivity. For example, a "Submit" button can now read from an input field and trigger an action (a JavaScript alert in HTML or a print statement in ImGui).
  • stencil init Command: A new command has been added to instantly generate a well-commented stencil.yaml file, greatly improving the onboarding experience for new users.
  • Optional Dependencies: The heavy dependencies for the ImGui backend are now optional. Users can install them with pip install stencil-ui[imgui], keeping the core package lightweight.

🛠️ Fixes & Improvements

  • Core Refactoring (AST): The entire generation process was refactored to use an Abstract Syntax Tree (AST). This makes the codebase much more robust, stable, and easier to extend with new features in the future.
  • --watch Functionality Restored: The hot-reload feature (stencil generate --watch) was completely rewritten and is now functional again.
  • Improved CLI: The command-line interface was updated to use modern subcommands (init and generate), making it more intuitive.
  • Numerous Bug Fixes:
    • Resolved multiple critical bugs in the HTML backend that prevented JavaScript from executing (ReferenceError, onclick handler bugs).
    • Fixed a series of NameError, IndentationError, and UnboundLocalError bugs in the ImGui code generation.
    • Corrected faulty command-line argument parsing.
  • Updated Documentation: The README.md has been overhauled to reflect all new features and usage instructions.
  • Modernized Packaging: The project now uses pyproject.toml as the single source of truth for dependencies, with requirements.txt being removed.