Metadata-Version: 2.4
Name: rc-tui
Version: 0.1.3
Summary: High-performance React-inspired TUI library for Python
Author-email: Pomilon <pomilon@proton.me>
License: MIT License
        
        Copyright (c) 2026 Pomilon
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pybind11>=2.12.0
Requires-Dist: pyfiglet>=0.8.post1
Requires-Dist: tree-sitter<0.24.0,>=0.22.0
Requires-Dist: tree-sitter-python<0.24.0,>=0.22.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# rc-tui

**rc-tui** is a high-performance, React-inspired Terminal User Interface (TUI) library for Python. It combines the declarative power of modern web frameworks with a high-performance C++ rendering engine to create fluid, beautiful, and complex terminal applications.

## Key Features

-   **Declarative UI**: Build interfaces using components, props, and state, just like React.
-   **High-Performance Engine**: Core rendering, terminal management, and diffing logic implemented in C++ for maximum speed.
-   **Built-in Layout Engine**: Flexbox-like layout system for easy positioning and responsiveness.
-   **Rich Component Library**: Includes Box, Text, Button, Input, ScrollBox, Markdown, Code, Tables, and more.
-   **Hooks System**: `useState`, `useEffect`, `useMemo`, and `useCallback` for clean state management.
-   **Mouse Support**: Full support for clicking, scrolling, and move events.

## Platform Support

| Platform | Support Status | Notes |
| :--- | :--- | :--- |
| **Linux** | ✅ Fully Supported | Primary development and testing platform. |
| **macOS** | ⚠️ Build Only | Wheels are provided, but functionality is currently untested. |
| **Windows** | ❌ Not Supported | CI/CD and PyPI publishing are disabled. Local builds may work but are not officially supported. |

## Installation

```bash
pip install rc-tui
```

*Note: Since this library uses native extensions, binary wheels are provided for Linux and macOS. If no wheel is available for your architecture, you will need `cmake`, `ninja`, and a C++17 compiler installed.*

## Quick Start

```python
from rctui import App, Component, Box, Text, Button, useState

class Counter(Component):
    def render(self):
        count, set_count = useState(0)
        
        return Box(
            flex_direction="column",
            align_items="center",
            justify_content="center",
            border="single",
            children=[
                Text(f"Count: {count}", style={"bold": True}),
                Button(
                    "Increment", 
                    on_click=lambda _: set_count(count + 1)
                )
            ]
        )

if __name__ == "__main__":
    app = App(Counter)
    app.run()
```

## Documentation

For detailed information, see the [docs](./docs) folder:
- [Architecture](./docs/architecture.md)
- [Component Reference](./docs/components.md)
- [Hooks API](./docs/hooks.md)
- [Events & Input](./docs/events.md)

## License

MIT
