1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! # termpulse
//!
//! Native terminal progress indicators via OSC 9;4 — with smart terminal
//! detection, graceful fallback, throttling, and stall detection.
//!
//! ## Quick Start
//!
//! ```no_run
//! use termpulse::Controller;
//!
//! let mut ctrl = Controller::auto();
//! ctrl.set(50, "Building");
//! // ... do work ...
//! ctrl.done("Complete");
//! ```
//!
//! ## Architecture
//!
//! ```text
//! termpulse (this crate)
//! ├── Controller — stateful progress management
//! ├── detect — terminal capability detection
//! ├── backend/ — output strategy (osc, ascii, silent)
//! ├── throttle — rate limiting & deduplication
//! └── estimate — ETA & throughput calculation
//!
//! termpulse-core (dependency)
//! └── OSC 9;4 sequence build/parse/sanitize
//! ```
//!
//! ## Design Principles
//!
//! 1. **Zero-config**: `Controller::auto()` detects the best backend
//! 2. **Safe by default**: Labels are sanitized, percentages clamped
//! 3. **Graceful degradation**: OSC → ASCII → Silent (three-tier fallback)
//! 4. **No panic**: All operations are infallible from the caller's perspective
//! 5. **Dependency injection**: All I/O is injectable for testing
pub use Controller;
pub use ;
// Re-export core types for convenience
pub use ;