Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 128 additions & 128 deletions Cargo.lock

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@ members = [
# CLI - Auto-Update
"src/cortex-update",

# CLI - OpenTUI Framework
"opentui-rs",
"opentui-rs/crates/opentui-core",
"opentui-rs/crates/opentui-buffer",
"opentui-rs/crates/opentui-terminal",
"opentui-rs/crates/opentui-layout",
"opentui-rs/crates/opentui-widgets",
"opentui-rs/crates/opentui-input",
"opentui-rs/crates/opentui-text",
"opentui-rs/crates/opentui-syntax",
# CLI - Cortex TUI Framework
"cortex-tui-framework",
"cortex-tui-framework/crates/cortex-tui-core",
"cortex-tui-framework/crates/cortex-tui-buffer",
"cortex-tui-framework/crates/cortex-tui-terminal",
"cortex-tui-framework/crates/cortex-tui-layout",
"cortex-tui-framework/crates/cortex-tui-widgets",
"cortex-tui-framework/crates/cortex-tui-input",
"cortex-tui-framework/crates/cortex-tui-text",
"cortex-tui-framework/crates/cortex-tui-syntax",

# ==========================================================================
# Desktop Application (GUI) - Tauri
Expand Down Expand Up @@ -236,16 +236,16 @@ cortex-shell-snapshot = { path = "src/cortex-shell-snapshot" }
# Integrations
cortex-slack = { path = "src/cortex-slack" }

# OpenTUI crates
opentui = { path = "opentui-rs" }
opentui-core = { path = "opentui-rs/crates/opentui-core" }
opentui-buffer = { path = "opentui-rs/crates/opentui-buffer" }
opentui-terminal = { path = "opentui-rs/crates/opentui-terminal" }
opentui-layout = { path = "opentui-rs/crates/opentui-layout" }
opentui-widgets = { path = "opentui-rs/crates/opentui-widgets" }
opentui-input = { path = "opentui-rs/crates/opentui-input" }
opentui-text = { path = "opentui-rs/crates/opentui-text" }
opentui-syntax = { path = "opentui-rs/crates/opentui-syntax" }
# Cortex TUI Framework crates
cortex-tui-framework = { path = "cortex-tui-framework" }
cortex-tui-core = { path = "cortex-tui-framework/crates/cortex-tui-core" }
cortex-tui-buffer = { path = "cortex-tui-framework/crates/cortex-tui-buffer" }
cortex-tui-terminal = { path = "cortex-tui-framework/crates/cortex-tui-terminal" }
cortex-tui-layout = { path = "cortex-tui-framework/crates/cortex-tui-layout" }
cortex-tui-widgets = { path = "cortex-tui-framework/crates/cortex-tui-widgets" }
cortex-tui-input = { path = "cortex-tui-framework/crates/cortex-tui-input" }
cortex-tui-text = { path = "cortex-tui-framework/crates/cortex-tui-text" }
cortex-tui-syntax = { path = "cortex-tui-framework/crates/cortex-tui-syntax" }

# CLI - Async & concurrency
tokio-stream = "0.1"
Expand Down
File renamed without changes.
25 changes: 25 additions & 0 deletions cortex-tui-framework/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "cortex-tui-framework"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "A high-performance terminal UI framework for Rust"
repository = "https://github.com/example/cortex-tui-framework"
authors = ["Cortex TUI Contributors"]

[dependencies]
cortex-tui-core = { path = "crates/cortex-tui-core" }
cortex-tui-buffer = { path = "crates/cortex-tui-buffer" }
cortex-tui-terminal = { path = "crates/cortex-tui-terminal" }
cortex-tui-layout = { path = "crates/cortex-tui-layout" }
cortex-tui-widgets = { path = "crates/cortex-tui-widgets" }
cortex-tui-input = { path = "crates/cortex-tui-input" }
cortex-tui-text = { path = "crates/cortex-tui-text" }
cortex-tui-syntax = { path = "crates/cortex-tui-syntax" }

# Part of parent orion workspace - no local [workspace] section

[profile.release]
lto = true
codegen-units = 1
opt-level = 3
10 changes: 10 additions & 0 deletions cortex-tui-framework/crates/cortex-tui-buffer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "cortex-tui-buffer"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Double-buffered terminal rendering for Cortex TUI"

[dependencies]
cortex-tui-core = { path = "../cortex-tui-core" }
smallvec = { workspace = true }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use smallvec::SmallVec;

use opentui_core::{Color, Rect, Style};
use cortex_tui_core::{Color, Rect, Style};

use crate::Cell;

Expand All @@ -32,8 +32,8 @@ use crate::Cell;
/// # Examples
///
/// ```
/// use opentui_buffer::Buffer;
/// use opentui_core::{Color, Rect, Style};
/// use cortex_tui_buffer::Buffer;
/// use cortex_tui_core::{Color, Rect, Style};
///
/// let mut buffer = Buffer::new(80, 24);
///
Expand Down Expand Up @@ -633,7 +633,7 @@ impl Clone for Buffer {
#[cfg(test)]
mod tests {
use super::*;
use opentui_core::TextAttributes;
use cortex_tui_core::TextAttributes;

#[test]
fn test_buffer_creation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! A [`Cell`] represents a single character position in a terminal buffer,
//! containing a character, colors, attributes, and display width information.

use opentui_core::{Color, Style, TextAttributes};
use cortex_tui_core::{Color, Style, TextAttributes};

/// A single cell in the terminal buffer.
///
Expand All @@ -22,8 +22,8 @@ use opentui_core::{Color, Style, TextAttributes};
/// # Examples
///
/// ```
/// use opentui_buffer::Cell;
/// use opentui_core::{Color, TextAttributes};
/// use cortex_tui_buffer::Cell;
/// use cortex_tui_core::{Color, TextAttributes};
///
/// let cell = Cell::new('A')
/// .with_fg(Color::WHITE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl Default for DiffOptions {
/// # Examples
///
/// ```
/// use opentui_buffer::{Buffer, diff};
/// use cortex_tui_buffer::{Buffer, diff};
///
/// let current = Buffer::new(80, 24);
/// let mut next = Buffer::new(80, 24);
Expand Down Expand Up @@ -341,7 +341,7 @@ pub fn apply(diff: &BufferDiff, buffer: &mut Buffer) {
#[cfg(test)]
mod tests {
use super::*;
use opentui_core::Color;
use cortex_tui_core::Color;

#[test]
fn test_empty_diff() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use crate::{diff, Buffer, BufferDiff, Cell, DiffOptions};

use opentui_core::Color;
use cortex_tui_core::Color;

/// Double-buffered terminal rendering.
///
Expand All @@ -21,8 +21,8 @@ use opentui_core::Color;
/// # Examples
///
/// ```
/// use opentui_buffer::{DoubleBuffer, diff::DiffOptions};
/// use opentui_core::{Color, Style};
/// use cortex_tui_buffer::{DoubleBuffer, diff::DiffOptions};
/// use cortex_tui_core::{Color, Style};
///
/// let mut db = DoubleBuffer::new(80, 24);
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Double-buffered terminal rendering for OpenTUI.
//! Double-buffered terminal rendering for Cortex TUI.
//!
//! This crate provides efficient buffer management for terminal UIs:
//!
Expand All @@ -18,7 +18,7 @@
//! with the front buffer and get a list of changes.
//!
//! 3. **Send to terminal**: Use the diff to emit ANSI escape sequences for
//! only the changed cells (handled by `opentui-terminal`).
//! only the changed cells (handled by `cortex-tui-terminal`).
//!
//! 4. **Swap buffers**: Call [`DoubleBuffer::swap`] to make the back buffer
//! the new front buffer.
Expand All @@ -28,8 +28,8 @@
//! Basic double-buffered rendering:
//!
//! ```
//! use opentui_buffer::{Buffer, Cell, DoubleBuffer, diff::DiffOptions};
//! use opentui_core::{Color, Style, TextAttributes};
//! use cortex_tui_buffer::{Buffer, Cell, DoubleBuffer, diff::DiffOptions};
//! use cortex_tui_core::{Color, Style, TextAttributes};
//!
//! // Create a double buffer for an 80x24 terminal
//! let mut db = DoubleBuffer::new(80, 24);
Expand All @@ -41,7 +41,7 @@
//! let title_style = Style::new()
//! .fg(Color::CYAN)
//! .bold();
//! db.back_mut().draw_str(10, 2, "Welcome to OpenTUI!", title_style);
//! db.back_mut().draw_str(10, 2, "Welcome to Cortex TUI!", title_style);
//!
//! // Draw a box
//! let border_style = Style::new().fg(Color::WHITE);
Expand All @@ -52,7 +52,7 @@
//! // Compute the changes
//! let diff = db.diff_default();
//!
//! // In real code: render diff to terminal via opentui-terminal
//! // In real code: render diff to terminal via cortex-tui-terminal
//! // terminal.render_diff(&diff);
//!
//! // Swap buffers for next frame
Expand All @@ -62,8 +62,8 @@
//! Using scissor rectangles for clipping:
//!
//! ```
//! use opentui_buffer::Buffer;
//! use opentui_core::{Rect, Style};
//! use cortex_tui_buffer::Buffer;
//! use cortex_tui_core::{Rect, Style};
//!
//! let mut buffer = Buffer::new(80, 24);
//!
Expand All @@ -88,4 +88,4 @@ pub use diff::{BufferDiff, CellChange, ChangeRun, DiffOptions};
pub use double_buffer::DoubleBuffer;

// Re-export core types for convenience
pub use opentui_core::{Color, Rect, Style, TextAttributes};
pub use cortex_tui_core::{Color, Rect, Style, TextAttributes};
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "opentui-core"
name = "cortex-tui-core"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "Core types and traits for OpenTUI"
description = "Core types and traits for Cortex TUI"

[lints.clippy]
cast_possible_truncation = "allow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//! # Examples
//!
//! ```
//! use opentui_core::color::Color;
//! use cortex_tui_core::color::Color;
//!
//! // From hex string
//! let red = Color::from_hex("#FF0000").unwrap();
Expand Down Expand Up @@ -281,7 +281,7 @@ impl Color {
/// # Examples
///
/// ```
/// use opentui_core::color::Color;
/// use cortex_tui_core::color::Color;
///
/// let red = Color::from_hex("#FF0000").unwrap();
/// let green = Color::from_hex("00FF00").unwrap();
Expand Down Expand Up @@ -358,7 +358,7 @@ impl Color {
/// # Examples
///
/// ```
/// use opentui_core::color::Color;
/// use cortex_tui_core::color::Color;
///
/// let red = Color::parse("red").unwrap();
/// let transparent = Color::parse("transparent").unwrap();
Expand Down Expand Up @@ -435,7 +435,7 @@ impl Color {
/// # Examples
///
/// ```
/// use opentui_core::color::Color;
/// use cortex_tui_core::color::Color;
///
/// let red = Color::from_hsv(0.0, 1.0, 1.0);
/// let green = Color::from_hsv(120.0, 1.0, 1.0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Error types for OpenTUI operations.
//! Error types for Cortex TUI operations.

use thiserror::Error;

/// Core error type for OpenTUI operations.
/// Core error type for Cortex TUI operations.
#[derive(Error, Debug)]
pub enum Error {
/// An I/O error occurred.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Geometry types for terminal UI layout and positioning.
//!
//! This module provides fundamental geometry primitives used throughout OpenTUI:
//! This module provides fundamental geometry primitives used throughout Cortex TUI:
//! - [`Point`]: A 2D point with signed coordinates
//! - [`Size`]: A 2D size with unsigned dimensions
//! - [`Rect`]: A rectangle combining position and size
Expand All @@ -18,7 +18,7 @@ use std::ops::{Add, AddAssign, Sub, SubAssign};
/// # Examples
///
/// ```
/// use opentui_core::geometry::Point;
/// use cortex_tui_core::geometry::Point;
///
/// let p1 = Point::new(10, 20);
/// let p2 = Point::new(5, 5);
Expand Down Expand Up @@ -188,7 +188,7 @@ impl From<Point> for (i32, i32) {
/// # Examples
///
/// ```
/// use opentui_core::geometry::Size;
/// use cortex_tui_core::geometry::Size;
///
/// let size = Size::new(80, 24);
/// assert_eq!(size.area(), 1920);
Expand Down Expand Up @@ -346,7 +346,7 @@ impl From<Size> for (u16, u16) {
/// # Examples
///
/// ```
/// use opentui_core::geometry::{Point, Size, Rect};
/// use cortex_tui_core::geometry::{Point, Size, Rect};
///
/// let rect = Rect::new(10, 20, 80, 24);
/// assert_eq!(rect.left(), 10);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Node identifier types for OpenTUI.
//! Node identifier types for Cortex TUI.

use std::sync::atomic::{AtomicU64, Ordering};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Core types and traits for `OpenTUI`.
//! Core types and traits for `Cortex TUI`.
//!
//! This crate provides the fundamental building blocks for the `OpenTUI` terminal UI framework:
//! This crate provides the fundamental building blocks for the `Cortex TUI` terminal UI framework:
//!
//! - [`color`]: RGBA color representation with alpha blending and ANSI conversion
//! - [`style`]: Text styling with colors and attributes (bold, italic, etc.)
Expand All @@ -12,7 +12,7 @@
//! ## Working with Colors
//!
//! ```
//! use opentui_core::color::Color;
//! use cortex_tui_core::color::Color;
//!
//! // Create colors from different sources
//! let red = Color::RED;
Expand All @@ -31,8 +31,8 @@
//! ## Working with Styles
//!
//! ```
//! use opentui_core::style::{Style, TextAttributes};
//! use opentui_core::color::Color;
//! use cortex_tui_core::style::{Style, TextAttributes};
//! use cortex_tui_core::color::Color;
//!
//! // Create styled text
//! let error_style = Style::new()
Expand All @@ -50,7 +50,7 @@
//! ## Working with Geometry
//!
//! ```
//! use opentui_core::geometry::{Point, Size, Rect};
//! use cortex_tui_core::geometry::{Point, Size, Rect};
//!
//! // Create geometric primitives
//! let origin = Point::new(0, 0);
Expand Down
Loading
Loading