weavetui_core
weavetui_core is the foundational library for the weavetui Text User Interface (TUI) framework. It provides the essential building blocks, traits, and utilities that enable the creation of robust and interactive terminal applications.
✨ Features
- Component-Oriented Design: Defines the
ComponentandComponentAccessortraits, promoting a modular and reusable approach to TUI development. - Comprehensive Event Handling: Offers a standardized mechanism for processing keyboard, mouse, tick, and paste events, ensuring smooth user interactions.
- Flexible TUI Primitives: Provides core types and functions for low-level terminal interaction, including managing terminal state, drawing elements, and handling raw input/output.
- Action Dispatch System: Facilitates inter-component communication through a clear and efficient action dispatching system.
🚀 Getting Started
This crate is primarily designed to be a dependency for weavetui applications and other weavetui-related crates. To use it in your project, add the following to your Cargo.toml:
[]
= "0.1.1" # Replace with the latest version or a path/git dependency for development
📚 Examples
While weavetui_core provides the underlying traits, its usage is best demonstrated within a weavetui application. For more comprehensive and runnable examples, please refer to the examples directory in the main weavetui repository. Here's a glimpse of how components interact:
use ;
use ;
use BTreeMap;
// A simple component implementing the core traits
;
🤝 Contributing
We welcome contributions to weavetui_core! Please refer to the main weavetui project's CONTRIBUTING.md for detailed guidelines on how to get involved, report issues, and submit pull requests.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.