Metadata-Version: 2.1
Name: ods-types-py
Version: 0.1.9
Summary: Core types and enums for ODS (Optikka Design System) - Python implementation
Author-email: Optikka <dev@optikka.com>
License: PROPRIETARY
Project-URL: Homepage, https://github.com/optikka/ods
Project-URL: Repository, https://github.com/optikka/ods
Keywords: ods,types,enums,renderer,optikka
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest==7.4.0; extra == "dev"
Requires-Dist: pytest-cov==4.1.0; extra == "dev"
Requires-Dist: black==23.0.0; extra == "dev"
Requires-Dist: ruff==0.1.0; extra == "dev"
Requires-Dist: mypy==1.5.0; extra == "dev"

# ods-types-py

Core types and enums for the ODS (Optikka Design System) renderer - Python implementation.

This is the Python equivalent of the `@optikka/ods-types` npm package, providing shared type definitions and enumerations used across ODS rendering services.

## Installation

```bash
pip install ods-types-py
```

## Usage

```python
from ods_types import (
    Kind,
    TargetKind,
    AspectMode,
    ScaleMode,
    Box,
    Target,
)

# Use enums
kind = Kind.CANVAS
aspect = AspectMode.CONTAIN

# Use type definitions
box: Box = {"x": 0, "y": 0, "w": 100, "h": 100}
target: Target = {"kind": TargetKind.LAYER, "id": "layer-1"}
```

## Package Contents

### Enums
- `Kind` - Canvas or layer types
- `TargetKind` - Target reference types (canvas, layer, guide, self)
- `AspectMode` - Aspect ratio modes (contain, cover, fitWidth, fitHeight)
- `ScaleMode` - Scaling modes for images and layers
- `AlignX`, `AlignY` - Alignment options
- `DropZoneMode` - Drop zone fit modes
- `StackDir`, `StackAlign` - Stack layout options
- `FadeKind`, `SlideKind` - Animation types
- `Easing` - Animation easing functions
- And more...

### Common Types
- `Box` - Rectangular region with x, y, w, h
- `Target` - Target reference with kind, id, and layerId
- `DrawImageParams` - Canvas drawImage parameters

## Development

```bash
# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black src/ tests/

# Lint
ruff check src/ tests/
```

## License

PROPRIETARY - Optikka
