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;