termcinema_cli/lib.rs
1//! ๐ฌ Termcinema SDK โ Programmatic SVG renderer for cinematic terminals
2//!
3//! This crate exposes the **SDK layer** of [`termcinema`](https://github.com/...) as a reusable Rust API.
4//! It's designed for integrations beyond CLI, with a pure functional interface that avoids all I/O.
5//!
6//! ๐ง Use this crate if you want to:
7//!
8//! - Embed terminal-style animations into **WASM apps** or **GUI frontends** ๐ธ
9//! - Build **Python bindings** or other FFI-based scripting integrations ๐
10//! - Render SVGs in **TUI playgrounds**, editors, or pipelines ๐งช
11//! - Treat the CLI layer as optional and just use the core logic ๐
12//!
13//! # โจ Features
14//!
15//! - โ
Stateless rendering (pure functions, no side effects)
16//! - ๐จ Full control over style, layout, themes, and animation
17//! - ๐งฉ Based on `termcinema-engine`, with layout and theme adapters
18//! - ๐งฑ Designed for sandboxed runtimes like WASM, FFI, embedded
19//!
20//! # ๐ Quick Start
21//!
22//! ```rust
23//! use termcinema_cli::{CliArgs, render_svg_direct};
24//!
25//! let args = CliArgs {
26//! theme: Some("retro_tty".into()),
27//! ..Default::default()
28//! };
29//!
30//! let svg = render_svg_direct("echo Hello", &args).unwrap();
31//! assert!(svg.contains("<svg"));
32//! ```
33//!
34//! See [`CliArgs`] for all customization options and usage patterns.
35
36mod args;
37mod layout;
38mod render;
39mod style;
40mod utils;
41
42//
43// ๐งฉ Public API Exports
44//
45
46/// Style, layout, theme, and animation configuration.
47pub use args::CliArgs;
48
49/// Returns a default `CliArgs` instance.
50pub use args::default_args;
51
52/// Renders SVG output from raw text and configuration.
53pub use render::render_svg_direct;
54
55/// Lists all built-in theme names.
56pub use render::available_theme_names;