cotis-interactivity 0.1.0-alpha

Higher-level input managers for Cotis applications
Documentation
# cotis-extras

Optional extension crates for [Cotis](https://docs.rs/cotis): accessibility bridge traits and higher-level input managers.

> **Status:** Early `0.1.0-alpha` release. APIs are still evolving alongside the core Cotis crates.

This repository contains **accessibility and interactivity helpers** only. It does not open a window, run layout, or draw pixels. Combine these crates with core Cotis crates, a layout engine, a pipe, and a renderer from the [ecosystem](#ecosystem) below.

## Workspace crates

| Crate | Role |
|-------|------|
| [`cotis-accessibility`]https://docs.rs/cotis-accessibility | AccessKit bridge traits (`AccessKitProvider`, `AccessibilityConfig`) |
| [`cotis-interactivity`]https://docs.rs/cotis-interactivity | Mouse, keyboard, and scroll managers built on `cotis-utils` providers |

## Architecture

```mermaid
flowchart LR
    Renderer[Renderer_MouseProvider] --> Managers[cotis_interactivity_managers]
    LayoutMgr[cotis_layout_ElementBoundingBox] --> Managers
    Managers --> UI[UI_closure]
    Elements[Accessible_elements] --> AccessKit[cotis_accessibility_AccessKitProvider]
    AccessKit --> Platform[Platform_adapter]
```

1. Render backends expose per-frame raw input through `cotis-utils` providers (`MouseProvider`, `SimpleKeyboardProvider`, etc.).
2. `cotis-interactivity` managers turn that state into UI-friendly signals: hover, click edges, key edges, scroll offsets.
3. `cotis-accessibility` defines the contract between Cotis elements and platform accessibility adapters backed by [AccessKit]https://github.com/AccessKit/accesskit. No platform adapter ships in this repo.

## Installation

Add the crates you need to your `Cargo.toml`:

```toml
cotis-accessibility = "0.1.0-alpha"
cotis-interactivity = "0.1.0-alpha"
cotis = "0.1.0-alpha"
cotis-utils = "0.1.0-alpha"
```

`cotis-accessibility` also depends on `accesskit` directly for `Role`, `Action`, and related types.

A full desktop application also needs a layout engine, a pipe, and a renderer. See [Quick start](#quick-start) and [Ecosystem](#ecosystem).

## Quick start

Clone a renderer backend and run its example:

```bash
git clone https://github.com/igna-778/cotis-wgpu
cd cotis-wgpu
cargo run --example basic_example -p cotis-wgpu
```

Wire interactivity managers in your application state and call `update(...)` each frame after layout. Implement `AccessKitProvider` on your renderer or app shell for accessibility integration. See the crate-level docs for integration patterns.

## Ecosystem

Cotis is split across several repositories. This repo provides optional accessibility and input helpers; sibling repos provide core traits, layout, pipes, and render backends.

| Repository | Role |
|------------|------|
| [`cotis`]https://github.com/igna-778/cotis | Core traits and `CotisApp` orchestration |
| [`cotis-layout`]https://github.com/igna-778/cotis-layout | Flexbox-style layout engine (`CotisLayoutManager`) |
| [`cotis-pipes`]https://github.com/igna-778/cotis-pipes | Layout output to render commands (`CotisLayoutToRenderListPipeForGenerics`) |
| [**cotis-extras**]https://github.com/igna-778/cotis-extras (this repo) | Accessibility bridge traits and input managers |
| [`cotis-wgpu`]https://github.com/igna-778/cotis-wgpu | Desktop renderer (wgpu + winit + glyphon) |
| [`cotis-raylib`]https://github.com/igna-778/cotis-raylib | Desktop renderer (raylib) |
| [`cotis-renderer-template`]https://github.com/igna-778/cotis-renderer-template | Scaffold for authoring a custom render backend |
| [`cotis-cli`]https://github.com/igna-778/cotis-cli | Plugin host for installable build and run routines |

Pick a renderer backend and swap it without changing layout or UI code. Use `cotis-renderer-template` to implement a new backend.

## Documentation

- API reference: `cargo doc --open -p cotis-interactivity`
- Published docs: [cotis-accessibility]https://docs.rs/cotis-accessibility, [cotis-interactivity]https://docs.rs/cotis-interactivity
- Core crate docs: [cotis]https://docs.rs/cotis, [cotis-utils]https://docs.rs/cotis-utils