Releases: Krishanth-K/stencil
Releases · Krishanth-K/stencil
stencil v0.2.1
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
alertin HTML or aprintstatement in ImGui). stencil initCommand: A new command has been added to instantly generate a well-commentedstencil.yamlfile, 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.
--watchFunctionality 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 (
initandgenerate), making it more intuitive. - Numerous Bug Fixes:
- Resolved multiple critical bugs in the HTML backend that prevented JavaScript from executing (
ReferenceError,onclickhandler bugs). - Fixed a series of
NameError,IndentationError, andUnboundLocalErrorbugs in the ImGui code generation. - Corrected faulty command-line argument parsing.
- Resolved multiple critical bugs in the HTML backend that prevented JavaScript from executing (
- Updated Documentation: The
README.mdhas been overhauled to reflect all new features and usage instructions. - Modernized Packaging: The project now uses
pyproject.tomlas the single source of truth for dependencies, withrequirements.txtbeing removed.