Metadata-Version: 2.1
Name: decklib
Version: 1.4.4
Summary: Lightweight tkinter UI framework with widgets, layout, animation, theming, and crypto
Author: kandee
Author-email: kandee.ntech@gmail.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorama
Requires-Dist: mincrypt
Requires-Dist: PySide6

Lightweight UI framework with built-in encryption.

Composable widgets, automatic layout, animation, dialogs, clipboard helpers, dark/light theming.

## Install

```bash
pip install decklib
```

## Quick start

```python
from decklib import App, Button, Column, Label, Theme

app = App("Hello", size=(360, 180), theme=Theme.dark())
app.set_view(Column(
    Label("Hello decklib", role="title", theme=app.theme),
    Button("Close", on_click=app.close, theme=app.theme),
    theme=app.theme, padding=24, gap=12,
))
app.run()
```

## Encryption

Encrypt and decrypt text with several classic ciphers:

```python
from decklib import encrypt, decrypt

encrypt("Hello", "caesar", shift=3)        # "Khoor"
encrypt("Hello", "vigenere", key="key")    # "Rijvs"
encrypt("Hello", "xor", key="secret")      # Base64 token
encrypt("Hello", "rail_fence", rails=3)    # "HoeLl"

decrypt("Khoor", "caesar", shift=3)        # "Hello"
```

Supported algorithms: `caesar`, `vigenere`, `xor`, `rail_fence`, `rail-fence`, `railfence`.

## Widgets

| Widget | Description |
|--------|-------------|
| `Label` | Text with role-based styling (title, subtitle, muted, success, etc.) |
| `Button` | Clickable button with role (primary, secondary, danger, ghost) |
| `Entry` | Single-line text input with placeholder |
| `TextBox` | Multi-line text area |
| `Select` | Dropdown menu |
| `CheckBox` | Boolean toggle |
| `Switch` | Boolean toggle |
| `Slider` | Numeric slider |
| `ProgressBar` | Animated progress bar |
| `ListBox` | Selectable list of strings |
| `Card` | Grouped container with title/subtitle |
| `Badge` | Small labeled tag |
| `Divider` | Horizontal separator |

## Layout

| Component | Description |
|-----------|-------------|
| `Row` | Horizontal layout |
| `Column` | Vertical layout |
| `ScrollColumn` | Scrollable vertical layout |
| `Spacer` | Fixed-size spacer |

## Theme

```python
Theme.light()   # Light appearance
Theme.dark()    # Dark appearance
Theme.system()  # Reads decklib_APPEARANCE env var
```

## Dialogs

```python
info("Title", "Message")
warning("Title", "Message")
error("Title", "Message")
confirm("Title", "Question")  # -> bool
ask_text("Title", "Prompt")   # -> str | None
open_file()                   # -> Path | None
save_file()                   # -> Path | None
```

## Clipboard

```python
set_clipboard("text")
get_clipboard()  # -> str
```

## Console (colorama)

```python
from decklib import Console
c = Console()
c.info("Info message")
c.success("Success message")
c.warning("Warning")
c.danger("Error")
c.muted("Note")
c.title("Heading")
```

## Examples

```bash
python examples/hello.py
python examples/counter.py
python examples/form.py
python examples/crypto_gui.py
python demo.py
```

## License

This project is licensed under the MIT License. See the LICENSE file for details.
